Changeset 35 for trunk/page00/boot.asm

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

We can now receive a copy of the TI-OS and save it to pages 04h-07h and 74h-7Bh (pages 00h-03h are redirected to pages 70h-73h, and 7Ch-7Dh to 6Ah-6Bh)
Now we just need the boot loader and TI-OS patches to allow on-the-fly dual booting
And direct USB support so everyone can use it...

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/page00/boot.asm

    r34 r35  
    473473       call ReadKeypad 
    474474       cp skGraphvar 
    475        jr z,StartBootLoader 
     475       call z,StartBootLoader 
    476476$$:    set indicRun,(iy+indicFlags) 
    477477       ld hl,1 
     
    512512 
    513513StartBootLoader: 
    514 ;TODO: this whole thing eventually needs to run from sector 70h or wherever I back myself up to 
     514;This is called in two places:     during OS2 boot (we're on page 0) 
     515;                                  while on page 70h and we're temporarily swapped in 
     516;We need to put a loader in RAM and call that, which might return and we're good, or it'll switch OSes. 
     517;TODO: this whole thing needs to run from RAM and depend on neither OS 
     518       ld hl,BootLoader 
     519       ld de,userMem 
     520       ld bc,BootLoaderEnd-BootLoader 
     521       ldir 
     522       jp userMem 
     523BootLoader: 
    515524       res indicOnly,(iy+indicFlags) 
    516525       res curAble,(iy+curFlags) 
     
    552561       jr BootLoaderKeyLoop 
    553562$$:    call ClrLCDFull 
    554        jr TurnCalculatorOn 
     563       jp TurnCalculatorOn 
    555564SwitchOS: 
     565       B_CALL UnlockFlash 
     566       ;NOTE: this loader of the loader needs to execute as if it were either from here or page 70h. 
     567       ;TODO: Uh...not yet! 
    556568       ;Copy a loader to RAM which does the following: 
    557569       ;      Back up sector 0 to the extra RAM pages 
     
    566578       ;      Copy from the extra RAM pages to pages 68h-6Bh 
    567579       ;Restart. 
    568        ;NOTE: this loader of the loader needs to execute as if it were either from here or page 70h. 
    569        ;TODO: Uh...not yet! 
    570        call ClrLCDFull 
    571        jr TurnCalculatorOn 
     580       rst 00h 
    572581NZIfTIOSExists: 
    573582       in a,(memPageAPort) 
     
    601610       DB "enable dual     " 
    602611       DB "booting.",0 
     612BootLoaderEnd: 
    603613