Changeset 36 for trunk/page00/boot.asm

Show
Ignore:
Timestamp:
08/13/09 22:14:33 (3 years ago)
Author:
brandonlw
Message:

More attempts to get dual booting working...

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/page00/boot.asm

    r35 r36  
    493493       set apdAble,(iy+apdFlags) 
    494494       set apdRunning,(iy+apdFlags) 
     495       ld hl,0 
     496       ld (curRow),hl 
     497       ld a,70h 
     498       out (6),a 
     499       ld hl,(4000h) 
     500       call DispHexHL 
    495501$$:    ld hl,6 
    496502       ld (curRow),hl 
     
    524530       res indicOnly,(iy+indicFlags) 
    525531       res curAble,(iy+curFlags) 
    526        call ClrLCDFull 
     532       B_CALL ClrLCDFull 
    527533       ld hl,0 
    528534       ld (curRow),hl 
    529        ld hl,sBoot 
    530        call PutS 
     535       ld hl,sBoot-BootLoader+userMem 
     536       B_CALL PutS 
    531537       ld hl,2 
    532538       ld (curRow),hl 
    533        call NZIfTIOSExists 
    534        jr nz,$F 
    535        ld hl,sStartTransfer 
    536        call PutS 
    537        jr ContinueBootLoader 
    538 $$:    ld hl,sCurrently 
    539        call PutS 
    540        call IsOS2Running 
    541        ld hl,sOS2 
    542        jr z,$F 
    543        ld hl,sTIOS 
    544 $$:    call PutS 
     539       call NZIfTIOSExists-BootLoader+userMem 
     540       jp z,ReceiveTIOS-BootLoader+userMem 
     541       ;We have the TI-OS, decide to make the switch or not 
     542$$:    ld hl,sCurrently-BootLoader+userMem 
     543       B_CALL PutS 
     544       call IsOS2Running-BootLoader+userMem 
     545       ld hl,sOS2-BootLoader+userMem 
     546       jr z,$F 
     547       ld hl,sTIOS-BootLoader+userMem 
     548$$:    B_CALL PutS 
    545549       ld hl,6 
    546550       ld (curRow),hl 
    547        ld hl,sInstructions 
    548        call PutS 
    549 ContinueBootLoader: 
     551       ld hl,sInstructions-BootLoader+userMem 
     552       B_CALL PutS 
    550553       ld hl,7 
    551554       ld (curRow),hl 
    552        ld hl,sClearToCancel 
    553        call PutS 
    554        set receiveTIOS,(iy+linkFlags2)    ;receive the TI-OS to the extra pages instead of just jumping to the boot code 
    555 BootLoaderKeyLoop: 
    556        B_CALL GetKey 
    557        cp skClear 
    558        jr z,$F 
     555       ld hl,sClearToCancel-BootLoader+userMem 
     556       B_CALL PutS 
     557bootSelectKeyLoop: 
     558       ei 
     559       B_CALL GetCSC 
    559560       cp skYEqu 
    560561       jr z,SwitchOS 
    561        jr BootLoaderKeyLoop 
    562 $$:    call ClrLCDFull 
    563        jp TurnCalculatorOn 
     562       cp skClear 
     563       jr nz,bootSelectKeyLoop 
     564       ;We pressed CLEAR, just reset and boot whatever it is that we are 
     565       B_CALL ClrLCDFull 
     566       rst 00h 
    564567SwitchOS: 
    565568       B_CALL UnlockFlash 
     
    578581       ;      Copy from the extra RAM pages to pages 68h-6Bh 
    579582       ;Restart. 
     583       B_CALL ClrLCDFull 
    580584       rst 00h 
     585ReceiveTIOS: 
     586;We don't have a copy of the TI-OS, receive one 
     587       ld hl,sStartTransfer-BootLoader+userMem 
     588       B_CALL PutS 
     589       ld hl,7 
     590       ld (curRow),hl 
     591       ld hl,sClearToCancel-BootLoader+userMem 
     592       B_CALL PutS 
     593       set receiveTIOS,(iy+linkFlags2)    ;receive the TI-OS to the extra pages instead of just jumping to the boot code 
     594BootLoaderKeyLoop: 
     595       B_CALL GetKey 
     596       cp skClear 
     597       jr z,$F 
     598       jr BootLoaderKeyLoop 
     599$$:    B_CALL ClrLCDFull 
     600       jp TurnCalculatorOn 
    581601NZIfTIOSExists: 
    582602       in a,(memPageAPort)