Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Digital Archaeology » Computer Arcana » Apple » Apple II » Musing: Z3 (Infocom) for A3
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Musing: Z3 (Infocom) for A3 [message #380344] Tue, 29 January 2019 22:06 Go to next message
Steve Nickolas is currently offline  Steve Nickolas
Messages: 2036
Registered: October 2012
Karma: 0
Senior Member
I currently analyzed my disk images with Z3 interpreter M. Only a small
bit of track 0 sector 0 is used, and track 2 is completely empty.

Let's say I were to put a loader in the empty space in T0S0, then in T2
put a cutdown Apple ][ monitor (F800-FFFF, and not even all of that is
needed), mixed case font, and something to install all of this...

Unfortunately, I can't add 80-column support because it would require the
interpreter to be relocated (to not use 0800-0BFF) but I think this may be
more than possible.

(I might reply to myself in this thread.)

-uso.
Re: Musing: Z3 (Infocom) for A3 [message #380350 is a reply to message #380344] Tue, 29 January 2019 23:07 Go to previous messageGo to next message
qkumba is currently offline  qkumba
Messages: 1584
Registered: March 2013
Karma: 0
Senior Member
Unfortunately, the interpreter uses $800-BFF for data, but it's probably fairly easy to move to the top of memory instead because as far as I remember, the top 1kb is unused.
Re: Musing: Z3 (Infocom) for A3 [message #380351 is a reply to message #380350] Tue, 29 January 2019 23:50 Go to previous messageGo to next message
Steve Nickolas is currently offline  Steve Nickolas
Messages: 2036
Registered: October 2012
Karma: 0
Senior Member
On Tue, 29 Jan 2019, qkumba wrote:

> Unfortunately, the interpreter uses $800-BFF for data, but it's probably
> fairly easy to move to the top of memory instead because as far as I
> remember, the top 1kb is unused.

My attempts to jigger the boot sector around just to inject an Apple ///
bootloader didn't work either.

(If I just slid the code down to fit my sec-bcs-jmp, it errored out, and
if I tried to add code to slide it back into place, it locked up.)

I did take the Satan mode stuff I wrote for DOS 3.3 and cut it down to
remove BASIC, making it fit comfortably in 4K, but I never even reached
the point where I was able to start working with it, because of that.

-uso.
Re: Musing: Z3 (Infocom) for A3 [message #380371 is a reply to message #380351] Wed, 30 January 2019 12:35 Go to previous messageGo to next message
qkumba is currently offline  qkumba
Messages: 1584
Registered: March 2013
Karma: 0
Senior Member
If you'd like a second pair of eyes to check, just send an image along to me.
Re: Musing: Z3 (Infocom) for A3 [message #380395 is a reply to message #380371] Wed, 30 January 2019 17:29 Go to previous messageGo to next message
Steve Nickolas is currently offline  Steve Nickolas
Messages: 2036
Registered: October 2012
Karma: 0
Senior Member
On Wed, 30 Jan 2019, qkumba wrote:

> If you'd like a second pair of eyes to check, just send an image along to me.

I was using some disk images I've had around for years, which I got from
asimov way back when. (I'd say at least 17 years ago)

These: http://3.buric.co/zork.zip

As typical of me I was trying to use a sec/bcs apple2/jmp apple3 signature
to detect which machine was being used. I guess something in the code is
being reused, or something, such that neither pushing the code back, nor
leaving it a few bytes higher than original, works. (And maybe it's as
simple as starting the Apple ][ part with a CLC...)

As a whole free 4K track is more than I need, maybe one sector could be
used to load a "clean" 0800-08FF from...

-uso.
Re: Musing: Z3 (Infocom) for A3 [message #380422 is a reply to message #380395] Thu, 31 January 2019 12:24 Go to previous messageGo to next message
qkumba is currently offline  qkumba
Messages: 1584
Registered: March 2013
Karma: 0
Senior Member
T00 S07 AF6 also references the translation table in the boot sector, so that needs to be modified to avoid the Internal Error.
When I do that (i.e. $35 -> $3B), the game loads for me.
Re: Musing: Z3 (Infocom) for A3 [message #380436 is a reply to message #380422] Thu, 31 January 2019 19:54 Go to previous messageGo to next message
Steve Nickolas is currently offline  Steve Nickolas
Messages: 2036
Registered: October 2012
Karma: 0
Senior Member
On Thu, 31 Jan 2019, qkumba wrote:

> T00 S07 AF6 also references the translation table in the boot sector, so that needs to be modified to avoid the Internal Error.
> When I do that (i.e. $35 -> $3B), the game loads for me.

That certainly helped! See links and notes below.

http://3.buric.co/zork1a3-19013119.dsk.gz
http://3.buric.co/zorkwedge.zip (code scraps)
https://i.imgur.com/8ItVCoI.png
https://i.imgur.com/BXsn1Ar.png

(The "mousetext" can be fixed by replacing it in the font data.)

;=========================================================== =========
; File: zorkwedge.a65
;=========================================================== =========

.org $0800

.byte $01
entry: sec
bcs entry2
jmp entry3

entry2: lda $27
cmp #$09
bne @1
lda $2B ; find slot booted from
sta $60
sta $61
lsr ; generate Cx5C address from it
lsr
lsr
lsr
ora #$C0
sta $8F
lda #$5C
sta $8E
lda #$01
sta $64
@1: ldx $64
inc $64
cpx #$10
bcs @2
lda @3, x
sta $3D
ldx $2B
jmp ($008E)
@2: jsr $0D7D
jmp $173D

; interleave table (location also kept at 00:7:F6)

@3: .byte $00, $04, $08, $0C, $01, $05, $09, $0D
.byte $02, $06, $0A, $0E, $03, $07, $0B, $0F

track = $83
sector = $84
buffer = $85
rwts = $F000
monitor = $F901

.org $A000+(*-$0800)
entry3: lda #$02
sta track
lda #$00
sta sector
sta buffer
lda #$10
sta buffer+1
@1: jsr rwts
bcs @2
inc buffer+1
inc sector
lda sector
and #$F0
beq @1
jmp $1000
@2: jmp monitor

.res $A100-*

;=========================================================== =========
; File: ministar-interleave.bin (can be reassembled if needed)
;=========================================================== =========

1000: A9 F0 8D DF FF A0 00 B9 00 11 99 00 C6 C8 D0 F7
1010: 84 00 84 02 A9 18 85 01 A9 F8 85 03 B1 00 91 02
1020: C8 D0 F9 E6 01 E6 03 A5 03 C9 FF 90 EF A0 F0 B1
1030: 00 91 02 C8 C0 E0 D0 F7 A9 00 8D D0 FF 8D DE FF
1040: 8D EE FF A0 08 B9 68 10 99 FF 9F 88 D0 F7 A8 A9
1050: FC 8D DF FF 20 84 FE 20 89 FE 20 93 FE 20 2F FB
1060: 20 58 FC 20 71 10 4C 00 A0 A9 F0 8D EF FF 4C 00
1070: C6 A9 00 85 06 A9 12 85 07 A9 00 85 FF A9 07 85
1080: FE 20 9D 10 C6 FE 10 10 2C DB C0 20 CF 10 20 CF
1090: 10 2C DA C0 A9 07 85 FE E6 FF 10 E5 60 A9 00 AA
10A0: A8 A5 FE 29 03 19 E6 10 95 08 A5 FE 4A 4A C0 04
10B0: 2A 09 08 95 09 A5 FF 81 08 B5 09 49 0C 95 09 A1
10C0: 06 81 08 F6 06 D0 02 F6 07 C8 C0 08 90 D3 60 85
10D0: FD AD EC FF 29 3F 05 FD 8D EC FF A9 08 8D ED FF
10E0: 2C ED FF F0 FB 60 78 7C F8 FC 78 7C F8 FC 00 00
10F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1100: C0 45 2F 10 F8 45 2F 85 2F C0 80 60 A4 24 B1 28
1110: 48 29 7F EA EA 91 28 68 6C 38 00 E6 4E D0 02 E6
1120: 4F 2C 00 C0 10 F5 91 28 AD 00 C0 2C 10 C0 60 20
1130: 0C FD 20 A5 FB 20 0C FD C9 9B F0 F3 60 A5 32 48
1140: A9 FF 85 32 BD 00 02 20 ED FD 68 85 32 BD 00 02
1150: C9 88 F0 1D C9 98 F0 0A E0 F8 90 03 20 3A FF E8
1160: D0 13 A9 DC 20 ED FD 20 8E FD A5 33 20 ED FD A2
1170: 01 8A F0 F3 CA 20 35 FD C9 95 D0 02 B1 28 C9 E0
1180: 90 02 29 DF 9D 00 02 C9 8D D0 B2 20 9C FC A9 8D
1190: D0 5B A4 3D A6 3C 20 8E FD 20 40 F9 A0 00 A9 AD
11A0: 4C ED FD A5 3C 09 07 85 3E A5 3D 85 3F A5 3C 29
11B0: 07 D0 03 20 92 FD A9 A0 20 ED FD B1 3C 20 DA FD
11C0: 20 BA FC 90 E8 60 4A 90 EA 4A 4A A5 3E 90 02 49
11D0: FF 65 3C 48 A9 BD 20 ED FD 68 48 4A 4A 4A 4A 20
11E0: E5 FD 68 29 0F 09 B0 C9 BA 90 02 69 06 6C 36 00
11F0: C9 A0 90 02 25 32 84 35 48 20 78 FB 68 A4 35 60
1200: E0 45 20 FF 00 FF 03 FF 3C C1 D0 D0 CC C5 A0 DD
1210: DB C4 C2 C1 FF C3 FF FF FF C1 D8 D9 D0 D3 AD 70
1220: C0 A0 00 EA EA BD 64 C0 10 04 C8 D0 F8 88 60 A9
1230: 00 85 48 AD 56 C0 AD 54 C0 4C D0 FE A9 00 F0 0B
1240: 20 E1 FE EA EA EA 20 36 F8 A9 14 85 22 A9 00 85
1250: 20 A9 28 85 21 A9 18 85 23 A9 17 85 25 4C 22 FC
1260: 20 58 FC A0 08 B9 08 FB 99 0E 04 88 D0 F7 60 AD
1270: F3 03 49 A5 8D F4 03 60 C9 8D D0 18 AC 00 C0 10
1280: 13 C0 93 D0 0F 2C 10 C0 AC 00 C0 10 FB C0 83 F0
1290: 03 2C 10 C0 4C FD FB 38 4C 2C FC A8 B9 48 FA 20
12A0: 97 FB 20 0C FD C9 CE B0 EE C9 C9 90 EA C9 CC F0
12B0: E6 D0 E8 EA A9 FC 8D DF FF A9 F0 8D EF FF 4C 2F
12C0: FB 48 4A 29 03 09 04 85 29 68 29 18 90 02 69 7F
12D0: 85 28 0A 0A 05 28 85 28 60 C9 87 D0 12 A9 40 20
12E0: A8 FC A0 C0 A9 0C 20 A8 FC AD 30 C0 88 D0 F5 60
12F0: A4 24 91 28 E6 24 A5 24 C5 21 B0 66 60 C9 A0 B0
1300: F8 69 BF 20 ED FD CA D0 EC 20 48 F9 A4 2F A2 06
1310: E0 03 F0 1C 06 2E 90 0E BD B3 F9 20 ED FD BD B9
1320: F9 F0 03 20 ED FD CA D0 E7 60 88 30 E7 20 DA FD
1330: A5 2E C9 E8 B1 3A 90 F2 20 56 F9 AA E8 D0 01 C8
1340: 98 20 DA FD 8A 4C DA FD A2 03 A9 A0 20 ED FD CA
1350: D0 F8 60 38 A5 2F A4 3B AA 10 01 88 65 3A 90 01
1360: C8 60 04 20 54 30 0D 80 04 90 03 22 54 33 0D 80
1370: 04 90 04 20 54 33 0D 80 04 90 04 20 54 3B 0D 80
1380: 04 90 00 22 44 33 0D C8 44 00 11 22 44 33 0D C8
1390: 44 A9 01 22 44 33 0D 80 04 90 01 22 44 33 0D 80
13A0: 04 90 26 31 87 9A 00 21 81 82 00 00 59 4D 91 92
13B0: 86 4A 85 9D AC A9 AC A3 A8 A4 D9 00 D8 A4 A4 00
13C0: 1C 8A 1C 23 5D 8B 1B A1 9D 8A 1D 23 9D 8B 1D A1
13D0: 00 29 19 AE 69 A8 19 23 24 53 1B 23 24 53 19 A1
13E0: 00 1A 5B 5B A5 69 24 24 AE AE A8 AD 29 00 7C 00
13F0: 15 9C 6D 9C A5 69 29 53 84 13 34 11 A5 69 23 A0
1400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1410: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1420: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1430: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1440: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1450: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1460: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1470: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1490: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
14A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
14B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
14C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
14D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
14E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
14F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1500: 04 08 10 00 00 00 00 00 00 00 1C 20 3C 22 3C 00
1510: 02 02 1E 22 22 22 1E 00 00 00 3C 02 02 02 3C 00
1520: 20 20 3C 22 22 22 3C 00 00 00 1C 22 3E 02 3C 00
1530: 18 24 04 1E 04 04 04 00 00 00 1C 22 22 3C 20 1E
1540: 02 02 1E 22 22 22 22 00 08 00 0C 08 08 08 1C 00
1550: 10 00 18 10 10 10 12 0C 02 02 22 12 0E 12 22 00
1560: 0C 08 08 08 08 08 1C 00 00 00 36 2A 2A 2A 22 00
1570: 00 00 1E 22 22 22 22 00 00 00 1C 22 22 22 1C 00
1580: 00 00 1E 22 22 1E 02 02 00 00 3C 22 22 3C 20 20
1590: 00 00 3A 06 02 02 02 00 00 00 3C 02 1C 20 1E 00
15A0: 04 04 1E 04 04 24 18 00 00 00 22 22 22 32 2C 00
15B0: 00 00 22 22 22 14 08 00 00 00 22 22 2A 2A 36 00
15C0: 00 00 22 14 08 14 22 00 00 00 22 22 22 3C 20 1E
15D0: 00 00 3E 10 08 04 3E 00 38 0C 0C 06 0C 0C 38 00
15E0: 08 08 08 08 08 08 08 08 0E 18 18 30 18 18 0E 00
15F0: 00 2C 1A 00 00 00 00 00 00 2A 14 2A 14 2A 00 00
1600: 00 00 00 00 00 00 00 00 08 08 08 08 08 00 08 00
1610: 14 14 14 00 00 00 00 00 14 14 3E 14 3E 14 14 00
1620: 08 3C 0A 1C 28 1E 08 00 06 26 10 08 04 32 30 00
1630: 04 0A 0A 04 2A 12 2C 00 08 08 08 00 00 00 00 00
1640: 08 04 02 02 02 04 08 00 08 10 20 20 20 10 08 00
1650: 08 2A 1C 08 1C 2A 08 00 00 08 08 3E 08 08 00 00
1660: 00 00 00 00 08 08 04 00 00 00 00 3E 00 00 00 00
1670: 00 00 00 00 00 00 08 00 00 20 10 08 04 02 00 00
1680: 1C 22 32 2A 26 22 1C 00 08 0C 08 08 08 08 1C 00
1690: 1C 22 20 18 04 02 3E 00 3E 20 10 18 20 22 1C 00
16A0: 10 18 14 12 3E 10 10 00 3E 02 1E 20 20 22 1C 00
16B0: 38 04 02 1E 22 22 1C 00 3E 20 10 08 04 04 04 00
16C0: 1C 22 22 1C 22 22 1C 00 1C 22 22 3C 20 10 0E 00
16D0: 00 00 08 00 08 00 00 00 00 00 08 00 08 08 04 00
16E0: 10 08 04 02 04 08 10 00 00 00 3E 00 3E 00 00 00
16F0: 04 08 10 20 10 08 04 00 1C 22 10 08 08 00 08 00
1700: A2 20 A0 00 A2 03 86 3C 8A 0A 24 3C F0 10 05 3C
1710: 49 FF 29 7E B0 08 4A D0 FB 98 9D 56 03 C8 E8 10
1720: E5 20 58 FF BA BD 00 01 0A 0A 0A 0A 85 2B AA BD
1730: 8E C0 BD 8C C0 BD 8A C0 BD 89 C0 A0 50 BD 80 C0
1740: 98 29 03 0A 05 2B AA BD 81 C0 A9 56 20 A8 FC 88
1750: 10 EB 85 26 85 3D 85 41 A9 08 85 27 18 08 BD 8C
1760: C0 10 FB 49 D5 D0 F7 BD 8C C0 10 FB C9 AA D0 F3
1770: EA BD 8C C0 10 FB C9 96 F0 09 28 90 DF 49 AD F0
1780: 25 D0 D9 A0 03 85 40 BD 8C C0 10 FB 2A 85 3C BD
1790: 8C C0 10 FB 25 3C 88 D0 EC 28 C5 3D D0 BE A5 40
17A0: C5 41 D0 B8 B0 B7 A0 56 84 3C BC 8C C0 10 FB 59
17B0: D6 02 A4 3C 88 99 00 03 D0 EE 84 3C BC 8C C0 10
17C0: FB 59 D6 02 A4 3C 91 26 C8 D0 EF BC 8C C0 10 FB
17D0: 59 D6 02 D0 87 A0 00 A2 56 CA 30 FB B1 26 5E 00
17E0: 03 2A 5E 00 03 2A 91 26 C8 D0 EE E6 27 E6 3D A5
17F0: 3D CD 00 08 A6 2B 90 DB 4C 01 08 00 00 00 00 00
1800: C6 34 F0 9F CA D0 16 C9 BA D0 BB 85 31 A5 3E 91
1810: 40 E6 40 D0 02 E6 41 60 A4 34 B9 FF 01 85 31 60
1820: A2 01 B5 3E 95 42 95 44 CA 10 F7 60 B1 3C 91 42
1830: 20 B4 FC 90 F7 60 B1 3C D1 42 F0 1C 20 92 FD B1
1840: 3C 20 DA FD A9 A0 20 ED FD A9 A8 20 ED FD B1 42
1850: 20 DA FD A9 A9 20 ED FD 20 B4 FC 90 D9 60 20 75
1860: FE A9 14 48 20 D0 F8 20 53 F9 85 3A 84 3B 68 38
1870: E9 01 D0 EF 60 8A F0 07 B5 3C 95 3A CA 10 F9 60
1880: A0 7F D0 02 A0 FF 84 32 60 A9 00 85 3E A2 38 A0
1890: 1B D0 08 A9 00 85 3E A2 36 A0 F0 A5 3E 29 0F F0
18A0: 06 09 C0 A0 00 F0 02 A9 FD 94 00 95 01 60 EA EA
18B0: 4C 00 E0 4C 03 E0 20 75 FE 20 3F FF 6C 3A 00 4C
18C0: D7 FA 60 EA 60 EA EA EA EA EA 4C F8 03 4C 2D FF
18D0: 2C 50 C0 2C 52 C0 2C 54 C0 2C 56 C0 A9 00 4C 4B
18E0: FB 2C 51 C0 2C 52 C0 2C 55 C0 2C 56 C0 60 EA EA
18F0: EA EA EA 4C 2D FF 20 00 FE 68 68 D0 6C EA EA BC
1900: EF A8 10 EC C9 8D F0 5A C9 8A F0 5A C9 88 D0 C9
1910: C6 24 10 E8 A5 21 85 24 C6 24 A5 22 C5 25 B0 0B
1920: C6 25 A5 25 20 C1 FB 65 20 85 28 60 49 C0 F0 28
1930: 69 FD 90 C0 F0 DA 69 FD 90 2C F0 DE 69 FD 90 5C
1940: D0 E9 A4 24 A5 25 48 20 24 FC 20 9E FC A0 00 68
1950: 69 00 C5 23 90 F0 B0 CA A5 22 85 25 A0 00 84 24
1960: F0 E4 A9 00 85 24 E6 25 A5 25 C5 23 90 B6 C6 25
1970: A5 22 48 20 24 FC A5 28 85 2A A5 29 85 2B A4 21
1980: 88 68 69 01 C5 23 B0 0D 48 20 24 FC B1 28 91 2A
1990: 88 10 F9 30 E1 A0 00 20 9E FC B0 86 A4 24 A9 A0
19A0: 91 28 C8 C4 21 90 F9 60 38 48 E9 01 D0 FC 68 E9
19B0: 01 D0 F6 60 E6 42 D0 02 E6 43 A5 3C C5 3E A5 3D
19C0: E5 3F E6 3C D0 02 E6 3D 60 A0 4B 20 DB FC D0 F9
19D0: 69 FE B0 F5 A0 21 20 DB FC C8 C8 88 D0 FD 90 05
19E0: A0 32 88 D0 FD AC 20 C0 A0 2C CA 60 A2 08 48 20
19F0: FA FC 68 2A A0 3A CA D0 F5 60 20 FD FC 88 AD 60
1A00: D8 62 5A 48 26 62 94 88 54 44 C8 54 68 44 E8 94
1A10: 00 B4 08 84 74 B4 28 6E 74 F4 CC 4A 72 F2 A4 8A
1A20: 00 AA A2 A2 74 74 74 72 44 68 B2 32 B2 00 22 00
1A30: 1A 1A 26 26 72 72 88 C8 C4 CA 26 48 44 44 A2 C8
1A40: 85 45 68 48 0A 0A 0A 30 03 6C FE 03 28 20 4C FF
1A50: 68 85 3A 68 85 3B 6C F0 03 20 82 F8 20 DA FA 4C
1A60: 65 FF D8 20 84 FE 20 B4 FB 20 93 FE 20 89 FE AD
1A70: 58 C0 AD 5A C0 AD 5D C0 AD 5F C0 AD FF CF 2C 10
1A80: C0 D8 20 3A FF AD F3 03 49 A5 CD F4 03 D0 17 AD
1A90: F2 03 D0 0F A9 E0 CD F3 03 D0 08 A0 03 8C F2 03
1AA0: 4C 00 E0 6C F2 03 20 60 FB A2 05 BD FC FA 9D EF
1AB0: 03 CA D0 F7 A9 C8 86 00 85 01 A0 07 C6 01 A5 01
1AC0: C9 C0 F0 D7 8D F8 07 B1 00 D9 01 FB D0 EC 88 88
1AD0: 10 F5 6C 00 00 EA EA 20 8E FD A9 45 85 40 A9 00
1AE0: 85 41 A2 FB A9 A0 20 ED FD BD 1E FA 20 ED FD A9
1AF0: BD 20 ED FD B5 4A 20 DA FD E8 30 E8 60 59 FA 00
1B00: 4A 08 20 47 F8 28 A9 0F 90 02 69 E0 85 2E B1 26
1B10: 45 30 25 2E 51 26 91 26 60 20 00 F8 C4 2C B0 11
1B20: C8 20 0E F8 90 F6 69 01 48 20 00 F8 68 C5 2D 90
1B30: F5 60 A0 2F D0 02 A0 27 84 2D A0 27 A9 00 85 30
1B40: 20 28 F8 88 10 F6 60 48 4A 29 03 09 04 85 27 68
1B50: 29 18 90 02 69 7F 85 26 0A 0A 05 26 85 26 60 A5
1B60: 30 18 69 03 29 0F 85 30 0A 0A 0A 0A 05 30 85 30
1B70: 60 4A 08 20 47 F8 B1 26 28 90 04 4A 4A 4A 4A 29
1B80: 0F 60 A6 3A A4 3B 20 96 FD 20 48 F9 A1 3A A8 4A
1B90: 90 09 6A B0 10 C9 A2 F0 0C 29 87 4A AA BD 62 F9
1BA0: 20 79 F8 D0 04 A0 80 A9 00 AA BD A6 F9 85 2E 29
1BB0: 03 85 2F 98 29 8F AA 98 A0 03 E0 8A F0 0B 4A 90
1BC0: 08 4A 4A 09 20 88 D0 FA C8 88 D0 F2 60 FF FF FF
1BD0: 20 82 F8 48 B1 3A 20 DA FD A2 01 20 4A F9 C4 2F
1BE0: C8 90 F1 A2 03 C0 04 90 F2 68 A8 B9 C0 F9 85 2C
1BF0: B9 00 FA 85 2D A9 00 A0 05 06 2D 26 2C 2A 88 D0
1C00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1C10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1C20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1C30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1C40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1C50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1C60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1C70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1C80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1C90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1CA0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1CB0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1CC0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1CD0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1CE0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1CF0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1D00: 1C 22 2A 3A 1A 02 3C 00 08 14 22 22 3E 22 22 00
1D10: 1E 22 22 1E 22 22 1E 00 1C 22 02 02 02 22 1C 00
1D20: 1E 22 22 22 22 22 1E 00 3E 02 02 1E 02 02 3E 00
1D30: 3E 02 02 1E 02 02 02 00 3C 02 02 02 32 22 3C 00
1D40: 22 22 22 3E 22 22 22 00 1C 08 08 08 08 08 1C 00
1D50: 20 20 20 20 20 22 1C 00 22 12 0A 06 0A 12 22 00
1D60: 02 02 02 02 02 02 3E 00 22 36 2A 2A 22 22 22 00
1D70: 22 22 26 2A 32 22 22 00 1C 22 22 22 22 22 1C 00
1D80: 1E 22 22 1E 02 02 02 00 1C 22 22 22 2A 12 2C 00
1D90: 1E 22 22 1E 0A 12 22 00 1C 22 02 1C 20 22 1C 00
1DA0: 3E 08 08 08 08 08 08 00 22 22 22 22 22 22 1C 00
1DB0: 22 22 22 22 22 14 08 00 22 22 22 2A 2A 36 22 00
1DC0: 22 22 14 08 14 22 22 00 22 22 14 08 08 08 08 00
1DD0: 3E 20 10 08 04 02 3E 00 3E 06 06 06 06 06 3E 00
1DE0: 00 02 04 08 10 20 00 00 3E 30 30 30 30 30 3E 00
1DF0: 00 00 08 14 22 00 00 00 00 00 00 00 00 00 00 7F
1E00: 10 08 36 7F 3F 3F 7E 36 10 08 36 41 21 21 4A 36
1E10: 00 00 02 06 0E 1E 36 42 7F 22 14 08 08 14 2A 7F
1E20: 00 40 20 11 0A 04 04 00 7F 3F 5F 6C 75 7B 7B 7F
1E30: 70 60 7E 31 79 30 3F 02 00 18 07 00 07 0C 08 70
1E40: 08 04 02 7F 02 04 08 00 00 00 00 00 00 00 00 2A
1E50: 08 08 08 08 49 2A 1C 08 08 1C 2A 49 08 08 08 08
1E60: 7F 00 00 00 00 00 00 00 40 40 40 44 46 7F 06 04
1E70: 3F 3F 3F 3F 3F 3F 3F 3F 13 18 1C 7E 1C 18 10 6F
1E80: 64 0C 1C 3F 1C 0C 04 7B 40 48 08 7F 3E 1C 48 40
1E90: 40 48 1C 3E 7F 08 48 40 00 00 00 7F 00 00 00 00
1EA0: 01 01 01 01 01 01 01 7F 08 10 20 7F 20 10 08 00
1EB0: 2A 55 2A 55 2A 55 2A 55 55 2A 55 2A 55 2A 55 2A
1EC0: 00 3E 41 01 01 01 7F 00 00 00 1F 20 20 20 3F 00
1ED0: 40 40 40 40 40 40 40 40 08 1C 3E 7F 3E 1C 08 00
1EE0: 7F 00 00 00 00 00 00 7F 14 14 77 00 77 14 14 00
1EF0: 7F 40 40 4C 4C 40 40 7F 01 01 01 01 01 01 01 01
1F00: B2 BE B2 EF C4 B2 A9 BB A6 A4 06 95 07 02 05 F0
1F10: 00 EB 93 A7 C6 99 B2 C9 BE C1 35 8C C4 96 AF 17
1F20: 17 2B 1F 83 7F 5D CC B5 F2 17 17 F5 03 A9 C5 20
1F30: ED FD A9 D2 20 ED FD 20 ED FD A9 87 4C ED FD A5
1F40: 48 48 A5 45 A6 46 A4 47 28 60 85 45 86 46 84 47
1F50: 08 68 85 48 BA 86 49 D8 60 20 84 FE 20 2F FB 20
1F60: 93 FE 20 89 FE D8 20 3A FF A9 AA 85 33 20 67 FD
1F70: 20 C7 FF 20 A7 FF 84 34 A0 17 88 30 E8 D9 FF FE
1F80: D0 F8 20 BE FF A4 34 4C 73 FF A2 03 0A 0A 0A 0A
1F90: 0A 26 3E 26 3F CA 10 F8 A5 31 D0 06 B5 3F 95 3D
1FA0: 95 41 E8 F0 F3 D0 06 A2 00 86 3E 86 3F B9 00 02
1FB0: C8 49 B0 C9 0A 90 D3 69 88 C9 FA B0 CD 60 A9 FE
1FC0: 48 B9 16 FF 48 A5 31 A0 00 84 31 60 EA EA EA EA
1FD0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FE0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FF0: 55 6E 6C 6F 63 6B 65 64 20 33 62 FA 62 FA 40 FA

;=========================================================== =========
; Notes on ministar-interleave.bin
;=========================================================== =========

The binary, when created, is reoriented as follows:

Sec Addr Cont
0 1000 Initialization code
1 1D00 Patched monitor (moved to FD00)
2 1B00 Patched monitor (moved to FB00)
3 1900 Patched monitor (moved to F900)
4 1700 Unused
5 1500 Font data (60-7F)
6 1300 Font data (20-3F)
7 1100 Disk II rom image (moved to C600)
8 1E00 Patched monitor (moved to FE00)
9 1C00 Patched monitor (moved to FC00)
A 1A00 Patched monitor (moved to FA00)
B 1800 Patched monitor (moved to F800)
C 1600 Unused
D 1400 Font data (40-5F)
E 1200 Font data (00-1F)
F 1F00 Patched monitor (moved to FF00)

1000-10FF is the initialization code and 10EE-10FF and 1600-17FF are free
if more space is needed. Currently, it chains into the program with a JMP
$C600 at 106E.

In the current version, uppercase is forced and something hits C051, which
means "text" on a ][, but "color" on a ///. So I think we might need to
find a place to shove a shim that detects my modified monitor (LDA $FFF9,
CMP #$33 might be a good test), and if it does, replaces C051 with C056
(the equivalent on the ///) and forces lowercase (I seem to recall that
the address for this was found out). Alternatively the boot process could
be modified to skip the JMP C600 step and directly load the interpreter,
then patch it before entry.

-uso.
Re: Musing: Z3 (Infocom) for A3 [message #380440 is a reply to message #380436] Thu, 31 January 2019 21:03 Go to previous messageGo to next message
Steve Nickolas is currently offline  Steve Nickolas
Messages: 2036
Registered: October 2012
Karma: 0
Senior Member
So, first the issue of the color blotches:

00000570: 00 00 00 00 00 00 00 00 00 00 00 00 00 AD 51 C0
00000580: AD 52 C0 AD 54 C0 A9 29 85 69 A9 00 85 68 A9 01

I half wonder if changing 00:5:7D as follows would be wise.

Before:

00:5:7D- AD 51 C0 LDA $C051 ; GR OFF (II) COLOR ON (III)
00:5:80- AD 52 C0 LDA $C052 ; SPLIT SCREEN OFF
00:5:83- AD 54 C0 LDA $C054 ; PAGE I

After:

00:5:7D- 20 89 FE JSR $FE89 ; INITTYI/SETKBD
00:5:80- 20 93 FE JSR $FE93 ; INITTYO/SETVID
00:5:83- 20 2F FB JSR $FB2F ; INITCON/INIT

And now, the color blotches are gone, and it looks like no harm.

So I copied my T02SD to T02SE, solving the Mousetext issue.

So far so good. Now all that remains is to see if it's possible to patch
the interpreter to detect the modified monitor (FFF9=33) and if found use
mixed-case text.

That doesn't give us all the functionality of the interpreter, but it
should give us MOST of it.

-uso.
Re: Musing: Z3 (Infocom) for A3 [message #380447 is a reply to message #380440] Fri, 01 February 2019 06:57 Go to previous messageGo to next message
Steve Nickolas is currently offline  Steve Nickolas
Messages: 2036
Registered: October 2012
Karma: 0
Senior Member
So I've thought about the boot process, as it stands, and I tried a
boot-trace, but I think I've screwed it up.

Basically I changed the wedge to load track 2 into B000 instead of 1000,
and then wrote this. Note that the disk ][ ROM is no longer used, the
font is automatically "fixed" by the assembler, and the <-- parts mark
where I changed the load process to jump into the interpreter with
expected configuration. But I think I haven't gotten this quite right.

-uso.

track = $83
sector = $84
buffer = $85
rwts = $F000
monitor = $F901

ctemp1 = $FD

dnldcel = $FE
dnldchr = $FF
dimgptr = $06
dcelptr = $08

cwrton = $C0DB
cwrtoff = $C0DA
cb2ctrl = $FFEC
cb2int = $FFED

.org $B000
entry: lda #$00
sta track
sta sector
sta buffer
@1: lda track
clc
asl
asl
asl
asl
ora sector
tay
lda table, y
sta buffer+1
jsr rwts
bcs error
inc sector
lda sector
and #$F0
beq @1
lda #$00
sta sector
inc track
lda track
cmp #$02
bcc @1
jmp next
error: jmp $F6B5 ; "RETRY" and reboot

table: .byte $08, $0C, $10, $14, $09, $0D, $11, $15
.byte $0A, $0E, $12, $16, $0B, $0F, $13, $17
.byte $18, $1C, $20, $24, $29, $2D, $21, $25
.byte $1A, $1E, $22, $26, $1B, $1F, $23, $27

next: lda #$F0 ; most Apple ][-like layout
sta $FFDF
ldy #$00 ; copy monitor ROM
sty $00
sty $02
lda #$B8
sta $01
lda #$F8
sta $03
@1: lda ($00), y
sta ($02), y
iny
bne @1
inc $01
inc $03
lda $03
cmp #$FF
bcc @1
ldy #$F0
@2: lda ($00), y
sta ($02), y
iny
cpy #$E0
bne @2
lda #$00
sta $FFD0
sta $FFDE
sta $FFEE
ldy #$08
@3: lda @4-1, y
sta $9FFF, y
dey
bne @3
tay
lda #$FC
sta $FFDF
jsr $FE84
jsr $FE89
jsr $FE93
jsr $FB2F
jsr $FC58
jsr loadfnt ; do it while we're blanked
lda #$60 ; <-- Slot 6
sta $2B ; <-- expected
jmp $A000
@4: lda #$F0
sta $FFEF
jmp $173D ; <-- enter the interpreter
loadfnt: lda #<fontptr
sta dimgptr
lda #>fontptr
sta dimgptr+1
lda #$00
sta dnldchr
lda #$07
sta dnldcel
@1: jsr loadchr
dec dnldcel
bpl @2
bit cwrton
jsr vretrce
jsr vretrce
bit cwrtoff
lda #$07
sta dnldcel
@2: inc dnldchr
bpl @1
rts

loadchr: lda #$00 ; X will be set to 0 for this
function
tax
tay ; Use Y for row counter
@1: lda dnldcel ; Set up cell pointer for ASCII
code
and #$03
ora dcptrl, y
sta dcelptr, x
lda dnldcel
lsr
lsr
cpy #$04
rol
ora #$08
sta dcelptr+1, x
lda dnldchr ; Store ASCII code into download
cell
sta (dcelptr, x)
lda dcelptr+1, x ; Fix cell pointer for character
image
eor #$0C
sta dcelptr+1, x
lda (dimgptr, x) ; Store character image
sta (dcelptr, x) ; into download cell
inc dimgptr, x ; Increment the image pointer
bne @2
inc dimgptr+1, x
@2: iny ; Increment the row number
cpy #$08
bcc @1 ; Not done yet
rts

vretrce: sta ctemp1 ; save bits to be stored
lda cb2ctrl ; control port for "CB2"
and #$3F ; reset high bits to 0
ora ctemp1
sta cb2ctrl
lda #$08 ; test vertical retrace
sta cb2int
vwait: bit cb2int ; wait for retrace
beq vwait
rts

dcptrl: .byte $78, $7C, $F8, $FC, $78, $7C, $F8, $FC

.res $B400-*
fontptr: .incbin "a3.fnt", $0200, $0100
.incbin "a3.fnt", $0100

.res $B800-*
.incbin "a2pfullr.bin", $2800
Re: Musing: Z3 (Infocom) for A3 [message #380468 is a reply to message #380447] Fri, 01 February 2019 13:21 Go to previous messageGo to next message
qkumba is currently offline  qkumba
Messages: 1584
Registered: March 2013
Karma: 0
Senior Member
The game will load things to $Bxxx unless you reduce the number of available pages. There's a memory test that it uses first to determine what's writable, and you can just hack what it returns.
If you want to share an image of your current code, then I can look for the exact location, assuming that's the cause of the problem.
Re: Musing: Z3 (Infocom) for A3 [message #380478 is a reply to message #380468] Fri, 01 February 2019 15:09 Go to previous messageGo to next message
Steve Nickolas is currently offline  Steve Nickolas
Messages: 2036
Registered: October 2012
Karma: 0
Senior Member
On Fri, 1 Feb 2019, qkumba wrote:

> The game will load things to $Bxxx unless you reduce the number of available pages. There's a memory test that it uses first to determine what's writable, and you can just hack what it returns.
> If you want to share an image of your current code, then I can look for the exact location, assuming that's the cause of the problem.
>

o.o?

Oh... because I put a relocator at B000. ;p I just used that to load in
the interpreter, then the code isn't used for anything.

http://3.buric.co/zorkwedge2.zip

(I tried to computer where things were loaded in memory vs. where they
were stored on disk; not out of the realm of possibility that I scrambled
it.)

-uso.
Re: Musing: Z3 (Infocom) for A3 [message #380517 is a reply to message #380478] Sat, 02 February 2019 12:47 Go to previous messageGo to next message
qkumba is currently offline  qkumba
Messages: 1584
Registered: March 2013
Karma: 0
Senior Member
I don't see anything obviously wrong.
If you can share a disk that isn't booting then I can trace through it and that should reveal the issue.
Re: Musing: Z3 (Infocom) for A3 [message #380537 is a reply to message #380517] Sat, 02 February 2019 23:27 Go to previous messageGo to next message
Steve Nickolas is currently offline  Steve Nickolas
Messages: 2036
Registered: October 2012
Karma: 0
Senior Member
On Sat, 2 Feb 2019, qkumba wrote:

> I don't see anything obviously wrong.
> If you can share a disk that isn't booting then I can trace through it and that should reveal the issue.
>

I attempted to trace through and was stumped too, - not sure it was
loading everything.

http://3.buric.co/zork1a32.dsk.gz

Here's the second-stage loader that should be in memory: (note: I nop'd
out the STA FFEF at B0BC figuring it might fix the issue: since I don't
need the graphics page, I don't need to bankswitch.)

http://3.buric.co/zorkstar.lst.txt

-uso.
Re: Musing: Z3 (Infocom) for A3 [message #380950 is a reply to message #380537] Mon, 11 February 2019 16:18 Go to previous message
qkumba is currently offline  qkumba
Messages: 1584
Registered: March 2013
Karma: 0
Senior Member
The routine at $B0C2 is damaging memory at $Axx, which is in the middle of the Infocom RWTS. After that, no sectors can be read.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Can someone riddle me this?
Next Topic: microM8 now has WOZ2 support
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Mar 29 07:41:17 EDT 2024

Total time taken to generate the page: 0.05436 seconds