Re: Gigatron Clone Ideas
Posted: 29 Jun 2022, 02:21
Sounds consistent with the two known failures we've been talking about.
A place for Gigatron builders and hackers
https://forum.gigatron.io/
Code: Select all
0dfd 1406 ld $06,y
0dfe fe00 bra ac
0dff e0bc jmp y,$bc
Code: Select all
--- a/Core/ROMv3.asm.py
+++ b/Core/ROMv3.asm.py
@@ -2241,11 +2241,11 @@ def trampoline3a():
ld([sysArgs+6]) #22
adda(1) #23
bra(AC) #24
- bra(250) #25 trampoline3b
+ bra(256-7) #25 trampoline3b
def trampoline3b():
"""Read 3 bytes from ROM page (continue)"""
- while pc()&255 < 256-6:
+ while pc()&255 < 256-7:
nop()
st([sysArgs+1]) #27
C('Trampoline for page $%02x00 reading (continue)' % (pc()>>8))
@@ -2254,6 +2254,8 @@ def trampoline3b():
ld(hi('txReturn'), Y) #30
bra(AC) #31
jmp(Y,'txReturn') #32
+ nop()
+ C('Avoid end of page return at $%04x' % (pc()-1))
Code: Select all
--- a/ROMv3.lst
+++ b/ROMv3.lst
@@ -3078,7 +3078,7 @@ packedParrot: 0d00 0000 ld $00 ;Pixels for packedParrot line 0
0d7c 012a ld [$2a]
0d7d 8001 adda $01
0d7e fe00 bra ac
- 0d7f fcfa bra $0dfa
+ 0d7f fcf9 bra $0df9
0d80 0000 ld $00 ;Pixels for packedParrot line 1
0d81 0000 ld $00
0d82 0000 ld $00
@@ -3173,13 +3173,13 @@ packedParrot: 0d00 0000 ld $00 ;Pixels for packedParrot line 0
0df6 0005 ld $05
0df7 0000 ld $00
0df8 0200 nop
- 0df9 0200 nop
- 0dfa c225 st [$25] ;Trampoline for page $0d00 reading (continue)
- 0dfb 012a ld [$2a]
- 0dfc 8002 adda $02
- 0dfd 1406 ld $06,y
- 0dfe fe00 bra ac
- 0dff e0bc jmp y,$bc
+ 0df9 c225 st [$25] ;Trampoline for page $0d00 reading (continue)
+ 0dfa 012a ld [$2a]
+ 0dfb 8002 adda $02
+ 0dfc 1406 ld $06,y
+ 0dfd fe00 bra ac
+ 0dfe e0bc jmp y,$bc
+ 0dff 0200 nop ;Avoid end of page return at $0dff
0e00 0000 ld $00 ;Pixels for packedParrot line 2
0e01 0000 ld $00
0e02 0000 ld $00
Code: Select all
ROM IR
---- ----
0DFF bra ac ;AC=XX
;—clk— PC low=XX, PC high increments (U4 TC is high)
0EXX jmp y ;same code but jumped to wrong page
;—clk— PC low=$BC, PC high=Y ($06)
06BC ld d ;instruction loaded from wrong page
;—clk—
06BD ld y ;back to SYS_Read3_40
Good job!