Changeset 60
- Timestamp:
- 11/08/09 18:23:13 (3 years ago)
- Location:
- trunk
- Files:
-
- 6 modified
-
includes/os2.inc (modified) (1 diff)
-
page00/boot.asm (modified) (17 diffs)
-
page00/display.asm (modified) (3 diffs)
-
page00/home.asm (modified) (2 diffs)
-
page1C/silentlink.asm (modified) (6 diffs)
-
page1D/1Dbase.asm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/os2.inc
r57 r60 41 41 _keyscnlnk EQU 4A1Ah 42 42 _GetKey EQU 4972h 43 _LCD_DRIVERON EQU 4978h 43 44 _MemClear EQU 4C30h 44 45 _Rec1stByteNC EQU 4EFDh 45 46 _RecAByteIO EQU 4F03h 47 _PowerOff EQU 5008h 46 48 _UnlockFlash EQU 7000h 47 49 -
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 -
trunk/page00/display.asm
r55 r60 4 4 PUBLIC AnimateRunIndicator,DispHexA,PutS,PutC,curBlink,SaveOScreen,DispHexHL,EraseEOL,ClrLCDFull 5 5 PUBLIC _LCD_COMMAND,SetXAutoIncrementMode,SetYAutoIncrementMode,IPutSB,PutMap,ClrScrnFull,ClrTxtShd 6 PUBLIC saveTR,restoreTR,showCursor,CursorOff,CursorOn,hideCursor,RunIndicOn,IPutC, _LCD_DRIVERON6 PUBLIC saveTR,restoreTR,showCursor,CursorOff,CursorOn,hideCursor,RunIndicOn,IPutC,LCD_DRIVERON 7 7 PUBLIC RestoreTextShadow,rstrpartialWin,savepartialWin,PutPS 8 8 EXTERN IsAtEditTail,IsAtBtm,LCDDelay,ATimes16,NZIf83Plus,_GetCharacterBitmap … … 52 52 ret 53 53 54 _LCD_DRIVERON:54 LCD_DRIVERON: 55 55 ld a,40h 56 56 call LCDDelay … … 193 193 cp b 194 194 jr nc,$B 195 ei195 ; ei 196 196 nop 197 197 pop af -
trunk/page00/home.asm
r57 r60 51 51 cp kGraph 52 52 jr z,killOtherOS 53 cp kWindow 54 jr z,writeByte 53 55 cp kYequ 54 56 ret nz … … 90 92 B_CALL EraseFlashPage 91 93 ret 94 writeByte: 95 B_CALL UnlockFlash 96 ld hl,(curRow) 97 push hl 98 ld hl,0 99 ld (curRow),hl 100 call GetHexA 101 push af 102 call GetHexHL 103 push hl 104 call GetHexA 105 ld b,a 106 pop de 107 pop af 108 B_CALL WriteAByte 109 pop hl 110 ld (curRow),hl 111 ret 92 112 -
trunk/page1C/silentlink.asm
r59 r60 315 315 ld hl,(ioData+6) 316 316 ; call DispHexHL 317 call EraseEOL317 ; call EraseEOL 318 318 pop hl 319 319 ld (curRow),hl … … 337 337 push af 338 338 push hl 339 call DispHexHL ;*** TESTING339 ; call DispHexHL ;*** TESTING 340 340 ld b,a 341 341 ld a,(appSearchPage) … … 473 473 ld (3FFEh+8000h),hl 474 474 ;Find the jump to the boot code and modify it to be appropriate for the model 475 ld de,8000h 476 add hl,de 475 ld hl,8000h 477 476 push hl 478 477 pop ix … … 546 545 jr nz,$B 547 546 ;Mark the OS as valid 548 xor a547 ld a,70h 549 548 ld b,5Ah 550 ld de, 0056h549 ld de,4056h 551 550 B_CALL WriteAByte 552 551 ld hl,0 … … 558 557 out (7),a 559 558 ; call DispHexHL 560 ld a,'Y'559 ; ld a,'Y' 561 560 ; call PutC 562 561 res indicOnly,(iy+indicFlags) … … 571 570 call APP_POP_ERRORH 572 571 ;Seems like the most sensible thing to do after receiving the TI-OS is just shut off 573 call PowerOff574 572 receiveTIOSHandler: 575 573 jr keyscnlnkEnd -
trunk/page1D/1Dbase.asm
r55 r60 5 5 EXTERN JErrorNo,UnlockFlash,GetKey,keyscnlnk,Rec1stByteNC,RecAByteIO,MemClear,ClrTxtShd 6 6 EXTERN ClrLCDFull,PutS,GetCSC,CursorOff,CursorOn,hideCursor,showCursor,ClrScrnFull,KeyToString 7 EXTERN JForceCmdNoChar,JForceCmd 7 EXTERN JForceCmdNoChar,JForceCmd,PowerOff,LCD_DRIVERON 8 8 9 9 ;4000h: … … 2434 2434 DW 0000h 2435 2435 DB 00h 2436 ;_LCD_DRIVERON equ 4978h 2437 DW 0000h2436 _LCD_DRIVERON: 2437 DW LCD_DRIVERON 2438 2438 DB 00h 2439 2439 ;_DFMIN2 equ 497Bh … … 4114 4114 DW 0000h 4115 4115 DB 00h 4116 ;_PowerOff equ 5008h 4117 DW 0000h4116 _PowerOff: 4117 DW PowerOff 4118 4118 DB 00h 4119 4119 ;_GetKeyRetOff equ 500Bh ;same as getkey, only returns kOff if 2nd+on is pressed
