|
Joined: Mar 2001
Posts: 17,217 Likes: 234
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,217 Likes: 234 |
That looks right, yeah. And bitswap is a MAME utility thing, it's not something you'd know generally from C++ :-)
|
|
|
|
Joined: Feb 2014
Posts: 1,102 Likes: 173
Very Senior Member
|
Very Senior Member
Joined: Feb 2014
Posts: 1,102 Likes: 173 |
That got me thinking, I was using this routine to get a range of bits:
uint32_t BITS(uint32_t x, u8 m, u8 n) {return ( ((x) >> (n)) & ( ((uint32_t) 1 << ((m) - (n) + 1)) - 1));}
but I see now that if you use BIT(T x, U n, V w) from src/lib/util/coretmpl.h
so I can change:
/* m_silentype_printer->update_cr_stepper(BITS(m_parallel_reg, 3, 0)); m_silentype_printer->update_pf_stepper(BITS(m_parallel_reg, 7, 4)); m_silentype_printer->update_printhead (BITS(m_parallel_reg, 15, 9)); */
into this:
m_silentype_printer->update_cr_stepper(BIT(m_parallel_reg, 0, 4)); m_silentype_printer->update_pf_stepper(BIT(m_parallel_reg, 4, 4)); m_silentype_printer->update_printhead (BIT(m_parallel_reg, 9, 7));
"I did not know that." 8-)
|
|
|
|
Joined: Mar 2001
Posts: 17,217 Likes: 234
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,217 Likes: 234 |
Rob Justice emailed me mostly complete support for two 68008 cards for the Apple II, and here's CP/M-68K running after I cleaned things up a bit.
|
2 members like this:
mixmaster, Duke |
|
|
|
Joined: Feb 2014
Posts: 1,102 Likes: 173
Very Senior Member
|
Very Senior Member
Joined: Feb 2014
Posts: 1,102 Likes: 173 |
Recently I found an ImageWriter dump and also found a schematic. I've been looking for those for a long time. One thing which puzzled me was exactly how the address decoding worked, so why not model it in Logisim? It uses a 74155 piped into a 74156 and once modeled it gives the expected results: Logisim is cool, I just learned how to do splitters. Modeling the 74155
|
|
|
|
Joined: Mar 2001
Posts: 17,217 Likes: 234
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,217 Likes: 234 |
That's *really* cool. Looks like original Logisim suspended development in 2011, but it's GPL so it got picked up by a new team under the Github logisim-evolution repo. The latest version lets you define new chips in VHDL, which is super cool.
|
|
|
|
Joined: Feb 2014
Posts: 1,102 Likes: 173
Very Senior Member
|
Very Senior Member
Joined: Feb 2014
Posts: 1,102 Likes: 173 |
After studying the schematics and datasheets for awhile, I was able to get the imagewriter to do its self test. It's not quite right and a little hacky, but I'm happy to get something working.
|
1 member likes this:
R. Belmont |
|
|
|
Joined: Mar 2001
Posts: 17,217 Likes: 234
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,217 Likes: 234 |
That's faster progress than I was expecting, even if it's got some issues still. Really cool!
|
|
|
|
Joined: Feb 2014
Posts: 1,102 Likes: 173
Very Senior Member
|
Very Senior Member
Joined: Feb 2014
Posts: 1,102 Likes: 173 |
Thanks, RB! If I pay attention to the transitions of PB7 going from 0 to 1 making the print head fire, it looks much better.
|
|
|
|
Joined: Mar 2001
Posts: 17,217 Likes: 234
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,217 Likes: 234 |
Yup, that looks like an ImageWriter now
|
|
|
|
Joined: Feb 2014
Posts: 1,102 Likes: 173
Very Senior Member
|
Very Senior Member
Joined: Feb 2014
Posts: 1,102 Likes: 173 |
I decided to just hardcode a timer to for 9600 baud because I haven't quite got the counters completely figured out. And after much fiddling... The flow control isn't quite right, so it will drop characters while printing in zoom grafix, but if I set the line delay long enough it will print.
|
|
|
3 members (AJR, Olivier Galibert, 1 invisible),
380
guests, and
6
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
Forums9
Topics9,320
Posts121,944
Members5,074
|
Most Online1,283 Dec 21st, 2022
|
|
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!
|
|
|
|