Skip to content

Commit

Permalink
- Added unfinished gtBASIC documentation.
Browse files Browse the repository at this point in the history
- Changed wrong ROM version display code to something more obvious.
  • Loading branch information
at67 committed Apr 9, 2022
1 parent 5d599b3 commit 9a1237d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
Binary file added Docs/gtBASIC.pdf
Binary file not shown.
8 changes: 4 additions & 4 deletions gbas/runtime/flow_control.i
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ romType EQU register1 ; actual romType
romExec_vLR EQU register0
romReadAddr EQU register0
romErrAddr EQU 0x7E ; loader happy constant address
vramErrAddr EQU 0x4450
vramErrAddr EQU 0x0101

romErrAddr DW vramErrAddr

Expand Down Expand Up @@ -41,9 +41,9 @@ romC_check LDW romType ; non experimental R
gprintf("Wrong ROM version, you asked for 0x%2X, you have 0x%2X", *romUser, *romType)
romC_fail LSLW ; dummy instruction that gprintf can attach to

romC_f0 LD giga_frameCount
POKE romErrAddr
BRA romC_f0 ; flash center pixel indicating rom error
romC_f0 LD giga_rand0
POKE romErrAddr ; random horizontal scroll
BRA romC_f0
romC_return RET
%ENDS
Expand Down
13 changes: 6 additions & 7 deletions gbas/runtime/flow_control_ROMv5a.i
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ romUser EQU register0 ; user requested rom
romType EQU register1 ; actual romType
romReadAddr EQU register0
romErrAddr EQU 0x7E ; loader happy constant address
vramErrAddr EQU 0x4450
vramErrAddr EQU 0x0101

romErrAddr DW vramErrAddr

Expand All @@ -35,15 +35,14 @@ romCheck LD giga_romType
romC_check LDW romType ; non experimental ROM
SUBW romUser
BGT romC_return ; romType > romUser, so ok
; gprintf's are only shown in the emulator and always attached to the next instruction
gprintf("Wrong ROM version, you asked for 0x%2X, you have 0x%2X", *romUser, *romType)
romC_fail LSLW ; dummy instruction that gprintf can attach to

romC_f0 LD giga_frameCount
POKE romErrAddr
BRA romC_f0 ; flash center pixel indicating rom error
romC_f0 LD giga_rand0
POKE romErrAddr ; random horizontal scroll
BRA romC_f0
romC_return RET
%ENDS

Expand Down
9 changes: 4 additions & 5 deletions gbas/runtime/flow_control_ROMvX0.i
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ romUser EQU register0 ; user requested
romType EQU register1 ; actual romType
romReadAddr EQU register0
romErrAddr EQU 0x7E ; loader happy constant address
vramErrAddr EQU 0x4450
vramErrAddr EQU 0x0101

romErrAddr DW vramErrAddr
Expand Down Expand Up @@ -40,10 +40,9 @@ romC_check LDW romType ; non experiment
gprintf("Wrong ROM version, you asked for 0x%2X, you have 0x%2X", *romUser, *romType)
romC_fail LSLW ; dummy instruction that gprintf can attach to

romC_f0 LD giga_frameCount
POKE romErrAddr
BRA romC_f0 ; flash center pixel indicating rom error
romC_f0 LD giga_rand0
POKE romErrAddr ; random horizontal scroll
BRA romC_f0
romC_return RET
%ENDS

Expand Down

0 comments on commit 9a1237d

Please sign in to comment.