; DEBUG = 18CD0-18E90, 18EB0-194E0
;
; 18CD0-18CE0 = CD # / <unused>
; 18CE0-18D30 = address -> time LBA remap
; 18D30-18D80 = time -> address LBA remap
; 18D80-18Dxx = write correct CD #




;-->
;801c8730 : 0C074BD3  JAL     801d2f4c, 801c8730 (ra),
;801c8734 : 326400FF  ANDI    8005a218 (a0), ffffff83 (s3), 00ff (255),
;-->
;801c8738 : 0C07A4E8  JAL     801e93a0, 801c8738 (ra),
;801c873c : 02402021  ADDU    00000000 (a0), 00000001 (s2), 00000000 (r0),



org $80018d80

; load CD #
lui ra,$8001+1
lbu a0,$8cd0(ra)
nop

; 0 -> 1
beq a0,r0,WRITE_CD
ori a0,r0,1

; 1 -> 0
ori a0,r0,0





WRITE_CD:
sb a0,$8cd0(ra)

; =====================
; =====================
; =====================
; =====================

EXIT:

; OLD code - skip splash nag

j $801c8738
nop
