Changeset 57

Show
Ignore:
Timestamp:
11/01/09 02:29:06 (2 years ago)
Author:
brandonlw
Message:

We can actually swap in OS 1.18 now!

Location:
trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/includes/os2.inc

    r56 r57  
    409409statusIsSE84P        EQU    7 
    410410STATUS_NON_83P_MASK  EQU    80h 
     411STATUS_84P_SERIES_MASK      EQU    00100000b 
    411412 
    412413;====================================================================== 
  • trunk/page00/boot.asm

    r56 r57  
    66 PUBLIC LdHLInd,BCALLRoutine,CheckForBootLoader,OS2Marker,AppInit,JForceCmdNoChar,JForceCmd 
    77 EXTERN PutS,PutC,ifastcopy,CallUSBActivityHook,CheckLowBatteriesTurnOff,SaveOScreen 
    8  EXTERN RunLinkActivityHook,HandleLinkKeyActivity,ResetStacks,_LCD_DRIVERON 
     8 EXTERN RunLinkActivityHook,HandleLinkKeyActivity,ResetStacks,_LCD_DRIVERON,NZIf84PlusSeries 
    99 EXTERN _APP_PUSH_ERRORH,_APP_POP_ERRORH,FindSym,PushRealO1,Mov9ToOP1,FPAdd,OP1ToOP2,LCDDelay 
    1010 EXTERN Placeholder005Fh,Placeholder0006h,Placeholder004Eh,Placeholder0003h,Placeholder0035h 
     
    133133       ex af,af' 
    134134       exx 
     135       call NZIf84PlusSeries 
     136       jr z,resumeInterruptHandler 
    135137       in a,(usbStatusPort) 
    136138       xor 0FFh 
     
    224226       exx 
    225227       ei 
    226        reti 
     228       ret ;i 
    227229secondHardwareTimerTriggered: 
    228230;This only fires when enableHW2Timer,(iy+interruptFlags) is set, and that's only done by _getKey. 
     
    525527       set apdAble,(iy+apdFlags) 
    526528       set apdRunning,(iy+apdFlags) 
     529       set batteriesGood,(iy+interruptFlags) 
    527530       xor a 
    528531       ld (menuCurrent),a 
     
    756759       nop 
    757760       nop 
    758        ld a,0BFh 
     761       ld a,0EFh 
    759762       out (1),a 
    760763       nop 
     
    762765       nop 
    763766       in a,(1) 
    764        and 0FEh 
     767       and 07Fh 
    765768       ld a,0FFh 
    766769       out (1),a 
     
    774777;We need to put a loader in RAM and call that, which might return and we're good, or it'll switch OSes. 
    775778;TODO: this whole thing needs to run from RAM and depend on neither OS (or both, you might say) 
     779       ld a,(OS2Marker) 
     780       or a 
    776781       ld hl,BootLoader 
    777        ld de,userMem 
     782       jr z,$F 
     783       ld hl,BootLoader+4000h 
     784$$:    ld de,userMem 
    778785       ld bc,BootLoaderEnd-BootLoader 
    779786       ldir 
  • trunk/page00/home.asm

    r55 r57  
    4949       pop hl 
    5050       ld (curRow),hl 
     51       cp kGraph 
     52       jr z,killOtherOS 
    5153       cp kYequ 
    5254       ret nz 
     
    8385       set curAble,(iy+curFlags) 
    8486       ret 
     87killOtherOS: 
     88       B_CALL UnlockFlash 
     89       ld a,70h 
     90       B_CALL EraseFlashPage 
     91       ret 
    8592 
  • trunk/page00/util.asm

    r52 r57  
    33 
    44 PUBLIC _APP_PUSH_ERRORH,_APP_POP_ERRORH,PushRealO1,Mov9ToOP1,FPAdd,LCDDelay 
    5  PUBLIC CopyFlashPage,ATimes16,CalculateOSChecksum 
     5 PUBLIC CopyFlashPage,ATimes16,CalculateOSChecksum,Is84P,NZIf84PlusSeries 
    66 PUBLIC Placeholder005Fh,Placeholder0006h,Placeholder004Eh,Placeholder0003h,Placeholder0035h 
    77 PUBLIC outputPage,NZIf83Plus,ZIfSlowSpeed,GetBytePaged,MakeOffPageCall,CopyToRAMPage 
     
    624624       ret 
    625625 
     626NZIf84PlusSeries: 
     627       push bc 
     628       push af 
     629       in a,(statusPort) 
     630       and STATUS_84P_SERIES_MASK 
     631       pop bc 
     632       ld a,b 
     633       pop bc 
     634       ret 
     635 
  • trunk/page1C/silentlink.asm

    r53 r57  
    472472       ld hl,(0054h+8000h) 
    473473       ld (3FFEh+8000h),hl 
     474       ;While we're at it, mark the OS as valid 
     475       ld a,5Ah 
     476       ld (0056h+8000h),a 
    474477       ;Find the page 0 routine for this OS 
    475478       ld a,7Bh