Changeset 60 for trunk/page00/boot.asm
- Timestamp:
- 11/08/09 18:23:13 (3 years ago)
- Files:
-
- 1 modified
-
trunk/page00/boot.asm (modified) (17 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/page00/boot.asm
r59 r60 6 6 PUBLIC LdHLInd,BCALLRoutine,CheckForBootLoader,OS2Marker,AppInit,JForceCmdNoChar,JForceCmd 7 7 EXTERN PutS,PutC,ifastcopy,CallUSBActivityHook,CheckLowBatteriesTurnOff,SaveOScreen 8 EXTERN RunLinkActivityHook,HandleLinkKeyActivity,ResetStacks, _LCD_DRIVERON,NZIf84PlusSeries8 EXTERN RunLinkActivityHook,HandleLinkKeyActivity,ResetStacks,LCD_DRIVERON,NZIf84PlusSeries 9 9 EXTERN _APP_PUSH_ERRORH,_APP_POP_ERRORH,FindSym,PushRealO1,Mov9ToOP1,FPAdd,OP1ToOP2,LCDDelay 10 10 EXTERN Placeholder005Fh,Placeholder0006h,Placeholder004Eh,Placeholder0003h,Placeholder0035h … … 18 18 19 19 ;0000h: 20 boot: jp BootCalculator20 boot: jp JumpToBootCode 21 21 ;0003h: 22 22 jp Placeholder0003h … … 418 418 ret 419 419 420 JumpToBootCode: 421 in a,(statusPort) 422 and STATUS_NON_83P_MASK 423 ld a,1Fh 424 jr z,$F 425 ld a,3 426 out (0Eh),a ;not sure yet 427 ld a,7Fh 428 $$: out (memPageAPort),a 429 ld a,7 430 out (4),a 431 ld hl,812Ch 432 in a,(statusPort) 433 and STATUS_84P_SERIES_MASK 434 jr nz,$F 435 ld hl,80D5h 436 $$: jp (hl) 437 xor a 420 438 BootCalculator: 421 439 di … … 494 512 ld a,17h ;default contrast level 495 513 ld (contrast),a 496 call _LCD_DRIVERON514 call LCD_DRIVERON 497 515 ld hl,0800h 498 516 ld (winTop),hl … … 520 538 call APP_PUSH_ERRORH 521 539 ld (onSP),sp 522 call _LCD_DRIVERON540 call LCD_DRIVERON 523 541 set onRunning,(iy+onFlags) 524 542 res indicOnly,(iy+indicFlags) … … 552 570 ld (RAMChecksum),de 553 571 TurnCalculatorOn: 554 call _LCD_DRIVERON572 call LCD_DRIVERON 555 573 set onRunning,(iy+onFlags) 556 574 res indicOnly,(iy+indicFlags) … … 765 783 nop 766 784 in a,(1) 767 and 07Fh785 bit 7,a 768 786 ld a,0FFh 769 787 out (1),a … … 777 795 ;We need to put a loader in RAM and call that, which might return and we're good, or it'll switch OSes. 778 796 ;TODO: this whole thing needs to run from RAM and depend on neither OS (or both, you might say) 797 ld a,81h 798 out (memPageBPort),a 799 xor a 800 out (memPageCPort),a 779 801 ld a,(OS2Marker) 780 802 or a … … 787 809 jp userMem 788 810 BootLoader: 811 B_CALL LCD_DRIVERON 789 812 res indicOnly,(iy+indicFlags) 790 813 res curAble,(iy+curFlags) … … 796 819 ld hl,2 797 820 ld (curRow),hl 798 call NZIfTIOSExists-BootLoader+userMem821 call DoesSecondOSExist-BootLoader+userMem 799 822 jp z,ReceiveTIOS-BootLoader+userMem 800 823 ;We have the TI-OS, decide to make the switch or not … … 835 858 jr nz,bootSelectKeyLoop 836 859 ;We pressed CLEAR, just reset and boot whatever it is that we are 837 B_CALL ClrLCDFull 860 ; B_CALL ClrLCDFull 861 xor a 862 out (memPageBPort),a 838 863 rst 00h 839 864 contrastUp: … … 944 969 jr nz,$B 945 970 ;Restart. 946 B_CALL ClrLCDFull 971 ld hl,0 972 ld (RAMChecksum),hl 973 ; B_CALL ClrLCDFull 974 ; B_CALL PowerOff 947 975 rst 00h 948 976 DeleteOS: … … 953 981 B_CALL WriteAByte 954 982 ;Restart. 983 xor a 984 out (memPageBPort),a 955 985 rst 00h 956 986 ReceiveTIOS: … … 965 995 ld hl,2 966 996 ld (curRow),hl 967 call NZIfTIOSExists-BootLoader+userMem997 call DoesSecondOSExist-BootLoader+userMem 968 998 ld hl,sStartTransfer2-BootLoader+userMem 969 999 jr nz,$F … … 982 1012 $$: B_CALL ClrLCDFull 983 1013 jp TurnCalculatorOn 984 NZIfTIOSExists:1014 DoesSecondOSExist: 985 1015 in a,(memPageAPort) 986 1016 push af … … 992 1022 jr z,$F 993 1023 xor a 994 jr NZIfTIOSExists_11024 jr DoesSecondOSExist_1 995 1025 $$: or 1 996 NZIfTIOSExists_1:1026 DoesSecondOSExist_1: 997 1027 pop bc 998 1028 ld a,b … … 1214 1244 DB LlBrack,"CLEAR] to exit",0 1215 1245 sStartTransfer: 1216 DB " TI-OS not found."1246 DB "OS not found. " 1217 1247 sStartTransfer2: 1218 DB "Send TI-OS now"1219 DB " to enable dual"1220 DB " booting.",01248 DB "Send secondary " 1249 DB "OS now to enable" 1250 DB "dual booting.",0 1221 1251 sSwitching: 1222 1252 DB "Switching...",0
