Changeset 29 for trunk/page00/boot.asm

Show
Ignore:
Timestamp:
08/02/09 02:58:09 (3 years ago)
Author:
brandonlw
Message:

Add the screenshot packet response so we can start taking screenshots, and add some more to the proposed boot loader

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/page00/boot.asm

    r28 r29  
    103103       DB 23h,0Fh ;penCol coordinates for displaying OS version 
    104104;0064h: 
    105        DB "0.01 ",0 
     105       DB "0.01" 
     106OS2Marker: 
     107       DB 0   ;I have this set as 0, any other TI-OS version will have it set as a space 
     108       DB 0   ;This is a crude check, and hopefully temporary. 
    106109Placeholder0006h_1: 
    107110       jp Placeholder0006h 
     
    464467       call ClrLCDFull 
    465468       res indicOnly,(iy+indicFlags) 
     469       in a,(statusPort) 
     470       and STATUS_NON_83P_MASK 
     471       jr z,$F                     ;no dual booting for you! 
    466472       call ReadKeypad 
    467473       cp skGraphvar 
    468474       jr z,StartBootLoader 
    469        ld hl,0 
     475$$:    ld hl,0 
    470476       ld (appBackUpScreen+50),hl 
    471477       ld (appBackUpScreen+52),hl 
     
    536542 
    537543StartBootLoader: 
     544       res indicOnly,(iy+indicFlags) 
     545       res curAble,(iy+curFlags) 
     546       call ClrLCDFull 
    538547       ld hl,0 
    539548       ld (curRow),hl 
    540549       ld hl,sBoot 
     550       call PutS 
     551       ld hl,2 
     552       ld (curRow),hl 
     553       call NZIfTIOSExists 
     554       jr nz,$F 
     555       ld hl,sStartTransfer 
     556       call PutS 
     557       jr ContinueBootLoader 
     558$$:    ld hl,sCurrently 
     559       call PutS 
     560       call IsOS2Running 
     561       ld hl,sOS2 
     562       jr z,$F 
     563       ld hl,sTIOS 
     564$$:    call PutS 
     565       ld hl,6 
     566       ld (curRow),hl 
     567       ld hl,sInstructions 
     568       call PutS 
     569ContinueBootLoader: 
     570       ld hl,7 
     571       ld (curRow),hl 
     572       ld hl,sClearToCancel 
    541573       call PutS 
    542574BootLoaderKeyLoop: 
    543575       B_CALL GetKey 
     576       cp skClear 
     577       jr z,$F 
    544578       cp skYEqu 
    545        jr z,$F 
     579       jr z,SwitchOS 
    546580       jr BootLoaderKeyLoop 
    547581$$:    call ClrLCDFull 
    548582       jr TurnCalculatorOn 
     583SwitchOS: 
     584       call IsOS2Running 
     585       jr z,SwitchToTIOS 
     586;Switch back to OS2 
     587       call ClrLCDFull 
     588       jr TurnCalculatorOn 
     589NZIfTIOSExists: 
     590       in a,(memPageAPort) 
     591       push af 
     592       ld a,70h 
     593       out (memPageAPort),a 
     594       ld hl,(4000h) 
     595       ld a,h 
     596       or l 
     597       pop bc 
     598       ld a,b 
     599       out (memPageAPort),a 
     600       ret 
     601IsOS2Running: 
     602       ld a,(OS2Marker) 
     603       or a 
     604       ret 
    549605sBoot: DB "Select Boot OS",0CEh,0 
     606sCurrently: 
     607       DB "Currently: ",0 
     608sTIOS: DB "TI-OS",0 
     609sOS2:  DB "OS2",0 
     610sInstructions: 
     611       DB LlBrack,"Y=] to switch",0CEh,0 
     612sClearToCancel: 
     613       DB LlBrack,"CLEAR] to exit",0CEh,0 
     614sStartTransfer: 
     615       DB "TI-OS not found." 
     616       DB "Send via PC or  " 
     617       DB "other calculator" 
     618       DB "to enable dual  " 
     619       DB "booting.",0 
     620SwitchToTIOS: 
     621       ;TODO: Uh...not yet! 
     622       call ClrLCDFull 
     623       jr TurnCalculatorOn 
    550624