Changeset 61

Show
Ignore:
Timestamp:
11/08/09 21:15:02 (2 years ago)
Author:
brandonlw
Message:

Dual booting now works!

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/page00/boot.asm

    r60 r61  
    841841       ld hl,sClearToCancel-BootLoader+userMem 
    842842       B_CALL PutS 
     843       ld a,iNormal 
     844       out (interruptEnPort),a 
    843845bootSelectKeyLoop: 
    844846       ei 
    845847       B_CALL GetCSC 
    846848       cp skYEqu 
    847        jr z,SwitchOS 
     849       jp z,SwitchOS-BootLoader+userMem 
    848850       cp skDel 
    849        jr z,ReceiveTIOS 
     851       jp z,ReceiveTIOS-BootLoader+userMem 
    850852       cp sk0 
    851        jr z,DeleteOS 
     853       jp z,DeleteOS-BootLoader+userMem 
    852854       ld hl,contrast 
    853855       cp skAdd 
     
    859861       ;We pressed CLEAR, just reset and boot whatever it is that we are 
    860862;       B_CALL ClrLCDFull 
     863       di 
     864       ld hl,0 
     865       ld (RAMChecksum),hl 
     866       ld a,lcdTurnOff 
     867       out (LCDinstPort),a 
    861868       xor a 
    862869       out (memPageBPort),a 
    863870       rst 00h 
     871contrastDown: 
     872       dec (hl) 
     873       jr $F 
    864874contrastUp: 
    865875       inc (hl) 
    866 $$:    call SetContrast 
     876$$:    ld a,(contrast) 
     877       add a,18h 
     878       or 0C0h 
     879$$:    push af 
     880       in a,(2) 
     881       and 80h 
     882       jr z,$F 
     883       in a,(2) 
     884       and 2 
     885       jr z,$B 
     886$$:    pop af 
     887       out (LCDinstPort),a 
    867888       jr bootSelectKeyLoop 
    868 contrastDown: 
    869        dec (hl) 
    870        jr $B 
    871889SwitchOS: 
    872890       B_CALL ClrLCDFull 
     
    969987       jr nz,$B 
    970988       ;Restart. 
     989       di 
    971990       ld hl,0 
    972991       ld (RAMChecksum),hl 
    973992;       B_CALL ClrLCDFull 
    974993;       B_CALL PowerOff 
     994       ld a,lcdTurnOff 
     995       out (LCDinstPort),a 
    975996       rst 00h 
    976997DeleteOS: 
     
    9811002       B_CALL WriteAByte 
    9821003       ;Restart. 
     1004       di 
     1005       ld hl,0 
     1006       ld (RAMChecksum),hl 
     1007       ld a,lcdTurnOff 
     1008       out (LCDinstPort),a 
    9831009       xor a 
    9841010       out (memPageBPort),a