Previous Thread
Next Thread
Print Thread
#123448 05/13/24 06:23 AM
Joined: Feb 2014
Posts: 1,150
Likes: 205
G
Very Senior Member
Very Senior Member
G Offline
Joined: Feb 2014
Posts: 1,150
Likes: 205
So I got inspired to fiddle with the Imagewriter II and hooked it up with the upd7807 and it would go off into the weeds.

After implementing the upd7807 bit instructions, it worked much better.

With the switches hooked up, I can coax it into the self test with a little help from the debugger since it gets hung up.


[Linked Image from i.imgur.com]


I don't know if this will come to anything working since the gate array seems pretty mysterious.

Viewing the bit patterns of the rom shows the font.

[Linked Image from i.imgur.com]


When the high bit is set, it means shift the pixels down by 2. However, the mouse text characters don't have descenders.

[Linked Image from i.imgur.com]


A little basic256 program to render the font:

Code
graphsize 800,800
color white
rect 0,0,800,1600
color black
openb "im2.bin"
xpos = 0
ypos = 0
st0 = 0x73fb
st1 = 0x79de
st2 = (st1-st0)+st1

st10 = 0x5f07
st11 = 0x68c7
st10end = 0x66c0
st11end = st11 + (st10end - st10)

for j = 0 to 32767
b = readbyte
if j > 16384 then
call dofont(b,j, st0, st1, 0, 1, 2)
call dofont(b,j, st1, st2, 0, 2, 2)

call dofont(b,j, st10, st10end, 100, 1, 2)
call dofont(b,j, st11, st11end, 100, 2, 2)

call dofont(b,j, 0x52d0, 0x56b0, 200, 1, 1)
call dofont(b,j, 0x4b80, 0x5140, 300, 1, 1)

call dofont(b,j, 0x5925, 0x5f00, 400, 1, 1)
end if

if j % 512 = 0 then print j+" "+tohex(j)
next j

subroutine dofont(b, pos, st0, en0, vertoffset, intergroup, intergap)
#print string(b)+" "+string(pos)
if pos >= st0 and pos < en0 then
xpos = (pos - st0) % 512
ypos = (pos - st0) \ 512 * 25 + intergroup - 1 + vertoffset
call drawhead(xpos, ypos, b, intergap)
end if
end subroutine

subroutine drawhead(xpos,ypos,b,interleave)
if b & 128 then
        for i = 0 to 6
          if b & (2^i) then plot xpos+60 , ypos + (i+2) * interleave
        next i
else
        for i = 0 to 7
          if b & (2^i) then plot xpos+60 , ypos + (i) * interleave
        next i
end if
end subroutine


The fonts in the rom pretty much match the bit patterns shown in the Apple Image Writer II Technical Reference Manual, though I think there's a K that doesn't match.

3 members like this: exidyboy, sairuk, robcfg
Joined: Feb 2014
Posts: 1,150
Likes: 205
G
Very Senior Member
Very Senior Member
G Offline
Joined: Feb 2014
Posts: 1,150
Likes: 205
One thing I just noticed was that the ON and OFF instructions for the special registers/ports are supposed to affect the Z flag according to the upd7810 datasheet.

Last edited by Golden Child; 05/14/24 10:32 AM.
Joined: Feb 2014
Posts: 1,150
Likes: 205
G
Very Senior Member
Very Senior Member
G Offline
Joined: Feb 2014
Posts: 1,150
Likes: 205
If you want to decipher the 7807 assembly you're welcome to try:

https://github.com/goldnchild/mame/tree/imagewriter2_experiment


It hits a bunch of addresses in the FE00-FEFF range that go to the gate array and the clock control chip.

It doesn't do too much since I can't figure out how it moves the carriage or fires the printhead, but you can coax it into the self-test.


[Linked Image from i.imgur.com]


Link Copied to Clipboard
Who's Online Now
1 members (1 invisible), 198 guests, and 2 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,344
Posts122,330
Members5,077
Most Online1,283
Dec 21st, 2022
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Powered by UBB.threads™ PHP Forum Software 8.0.0