|
Joined: Mar 2001
Posts: 17,263 Likes: 267
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,263 Likes: 267 |
That's quite possible, I haven't looked at that code in a while 
|
|
|
|
Joined: Feb 2014
Posts: 1,184 Likes: 218
Very Senior Member
|
Very Senior Member
Joined: Feb 2014
Posts: 1,184 Likes: 218 |
Testing my theory, if I put a debugger guard for fetching the x byte the 100 GOTO 100 program seems to run without incident.
if (!machine().side_effects_disabled())
// fetch the "X byte"
m_indir_bank = *apple3_bankaddr(~0, m_zpa ^ 0x0C00) & 0x8f;
The Apple /// is truly weird and wonderful.
|
|
|
|
Joined: Mar 2001
Posts: 17,263 Likes: 267
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,263 Likes: 267 |
Yup. What's surprising is how much of it made it into the //e without anyone noticing.
|
|
|
|
Joined: Feb 2014
Posts: 1,184 Likes: 218
Very Senior Member
|
Very Senior Member
Joined: Feb 2014
Posts: 1,184 Likes: 218 |
So I happened to read an article today by Andy Hertzfeld on folklore.org and it got me thinking, maybe I should look at the 6522 VIA registers for silentype activity. https://www.folklore.org/StoryView.py?project=Macintosh&story=Apple_II_Mouse_Card.txtBud Tribble had written the initial code to drive the mouse on the Macintosh, but I had to maintain it, so I was familiar with how it worked. I had used a 6522 chip the previous year, since the Apple III had one, which I had programmed to shift bits out to the Silentype thermal printer. I realized that all that was required to interface a mouse to the Apple III was to make a simple connector to route the appropriate signals to the proper pins. so let's fire up Business Basic v1.23 and see what happens: OPEN #1,".SILENTYPE" The "D" 6522 via is mapped in at FFD0-FFDF. A is the shift register address, so let's watch $FFDA. wp ffda,1,w,1,{printf "f1=%x f2=%x",b@f1,b@f2}
f1=0 f2=6
Stopped at watchpoint 3 writing 00 to 0000FFDA (PC=4801)
Stopped at watchpoint 3 writing 06 to 0000FFDA (PC=480D)
f1=0 f2=C
Stopped at watchpoint 3 writing 00 to 0000FFDA (PC=4801)
Stopped at watchpoint 3 writing 0C to 0000FFDA (PC=480D)
f1=0 f2=9
Stopped at watchpoint 3 writing 00 to 0000FFDA (PC=4801)
Stopped at watchpoint 3 writing 09 to 0000FFDA (PC=480D)
f1=0 f2=3
Stopped at watchpoint 3 writing 00 to 0000FFDA (PC=4801)
Stopped at watchpoint 3 writing 03 to 0000FFDA (PC=480D)
f1=0 f2=6
f1=0 f2=C
f1=0 f2=9
f1=0 f2=3
47F3: AD 5E C0 lda $c05e
47F6: AD DF FF lda $ffdf
47F9: 48 pha
47FA: 09 80 ora #$80 // set the clock to 1mhz
47FC: 8D DF FF sta $ffdf // store into E environment register
47FF: A5 F1 lda $f1
4801: 8D DA FF sta $ffda // store the first byte (from $F1) into FFDA
4804: AD DD FF lda $ffdd // poll the IFR flags until the shift is done
4807: 29 04 and #$04
4809: F0 F9 beq $4804
480B: A5 F2 lda $f2
480D: 8D DA FF sta $ffda // store the second byte (from $F2) into FFDA
4810: AD DD FF lda $ffdd // poll the flags until shift is done
4813: 29 04 and #$04
4815: F0 F9 beq $4810
4817: AD 5B C0 lda $c05b // this part must be to "clock" it into the silentype's internal registers
481A: AD 5F C0 lda $c05f
481D: EA nop
481E: AD 5E C0 lda $c05e
4821: EA nop
4822: AD 5A C0 lda $c05a
4825: 68 pla
4826: 8D DF FF sta $ffdf // restore E register
4829: 60 rts
I edited a bunch of stuff out, but you can see the pattern 6,c,9,3,6,c,9,3 which is pretty clearly the horizontal stepper motor which is bits 0-3. It appears that it writes two bytes in succession to the shift register for the silentype.
Last edited by Golden Child; 08/12/19 01:22 PM.
|
|
|
|
Joined: Feb 2014
Posts: 1,184 Likes: 218
Very Senior Member
|
Very Senior Member
Joined: Feb 2014
Posts: 1,184 Likes: 218 |
It's showing some signs of life once I interpret the stepper motors and the left margin switch, and process the bits for the printhead. OPEN #1,".SILENTYPE" PRINT #1;"APPLE /// SILENTYPE"
0xFFDA write data=00 m_shift_reg=0600
0xFFDA write data=03 m_shift_reg=0003
0xc05a read , clock in data written to ffda : 0003
silentype m_xpos=136 m_ypos=02 headbits=0000000 0
...............***..****..****..*.....*****................................***...***..*.....*****.*...*.*****.*...*.****..*****.................................
..............*...*.*...*.*...*.*.....*...............*.....*.....*.......*...*...*...*.....*.....*...*...*...*...*.*...*.*.....................................
..............*...*.*...*.*...*.*.....*..............*.....*.....*........*.......*...*.....*.....**..*...*...*...*.*...*.*.....................................
..............*...*.****..****..*.....****..........*.....*.....*..........***....*...*.....****..*.*.*...*....***..****..****..................................
..............*****.*.....*.....*.....*............*.....*.....*..............*...*...*.....*.....*..**...*.....*...*.....*.....................................
..............*...*.*.....*.....*.....*...........*.....*.....*...........*...*...*...*.....*.....*...*...*.....*...*.....*.....................................
..............*...*.*.....*.....*****.*****................................***...***..*****.*****.*...*...*.....*...*.....*****.................................
................................................................................................................................................................
0
0xFFDA write data=00 m_shift_reg=0000
0xFFDA write data=90 m_shift_reg=0090
0xc05a read , clock in data written to ffda : 0090
silentype m_xpos=131 m_ypos=08 headbits=0000000 0
....................*...............*.........**........*.......*......*..*......**.........................................................
....................*...............*........*..*.......*.................*.......*.........................................................
...............***..****...***...****..***...*.....****.*.**...**......*..*..*....*....*.*..*.**...***..****...****.*.**....................
..................*.*...*.*.....*...*.*...*.***...*...*.**..*...*......*..*.*.....*...*.*.*.**..*.*...*.*...*.*...*.**..*...................
...............****.*...*.*.....*...*.****...*.....****.*...*...*......*..**......*...*.*.*.*...*.*...*.****...****.*.......................
..............*...*.*...*.*.....*...*.*......*........*.*...*...*...*..*..*.*.....*...*.*.*.*...*.*...*.*.........*.*.......................
...............****.****...***...****..***...*.....***..*...*..***...**...*..*...***..*...*.*...*..***..*.........*.*.......................
............................................................................................................................................
|
|
|
|
Joined: Mar 2001
Posts: 17,263 Likes: 267
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,263 Likes: 267 |
|
|
|
|
Joined: Mar 2001
Posts: 17,263 Likes: 267
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,263 Likes: 267 |
Last edited by R. Belmont; 08/14/19 02:59 AM.
|
|
|
|
Joined: Feb 2014
Posts: 1,184 Likes: 218
Very Senior Member
|
Very Senior Member
Joined: Feb 2014
Posts: 1,184 Likes: 218 |
It's alive.....it's ALLLIVEEE! To get the silentype demo to run I had to do some brain surgery because the BGRAF.INV on the silentype disk seems to crash. so I changed line 50 to use the bgraf on the business basic v1.23 disk. 30 INVOKE "PSCREEN",".D1/BGRAF.INV" and why not see the graphics too: 55 PERFORM GRAFIXON ![[Linked Image from i.imgur.com]](https://i.imgur.com/v24Bdy0.png) ![[Linked Image from i.imgur.com]](https://i.imgur.com/bkO7dVa.png) ![[Linked Image from i.imgur.com]](https://i.imgur.com/EWKdK1w.png) There's (almost) no limit to what the Silentype /// can do! It's all up to you! ![[Linked Image from i.imgur.com]](https://i.imgur.com/7Mh4nLt.png)
Last edited by Golden Child; 08/14/19 10:04 AM.
|
|
|
|
Joined: Feb 2014
Posts: 1,184 Likes: 218
Very Senior Member
|
Very Senior Member
Joined: Feb 2014
Posts: 1,184 Likes: 218 |
I didn't want any "page breaks" in the output, so I set the paper length to 33 inches so now everything is on a single page. ![[Linked Image from i.imgur.com]](https://i.imgur.com/X111Lji.png)
|
|
|
0 members (),
136
guests, and
10
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
Forums9
Topics9,365
Posts122,483
Members5,082
|
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!
|
|
|
|