Changeset 36
- Timestamp:
- 08/13/09 22:14:33 (2 years ago)
- Location:
- trunk
- Files:
-
- 4 modified
-
includes/os2.inc (modified) (1 diff)
-
page00/boot.asm (modified) (3 diffs)
-
page1C/silentlink.asm (modified) (1 diff)
-
page1D/1Dbase.asm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/os2.inc
r34 r36 26 26 ; OS2 Entry Points 27 27 ;====================================================================== 28 _GetCSC EQU 4018h 29 _PutS EQU 450Ah 30 _ClrLCDFull EQU 4540h 28 31 _keyscnlnk EQU 4A1Ah 29 32 _GetKey EQU 4972h -
trunk/page00/boot.asm
r35 r36 493 493 set apdAble,(iy+apdFlags) 494 494 set apdRunning,(iy+apdFlags) 495 ld hl,0 496 ld (curRow),hl 497 ld a,70h 498 out (6),a 499 ld hl,(4000h) 500 call DispHexHL 495 501 $$: ld hl,6 496 502 ld (curRow),hl … … 524 530 res indicOnly,(iy+indicFlags) 525 531 res curAble,(iy+curFlags) 526 callClrLCDFull532 B_CALL ClrLCDFull 527 533 ld hl,0 528 534 ld (curRow),hl 529 ld hl,sBoot 530 callPutS535 ld hl,sBoot-BootLoader+userMem 536 B_CALL PutS 531 537 ld hl,2 532 538 ld (curRow),hl 533 call NZIfTIOSExists 534 jr nz,$F 535 ld hl,sStartTransfer 536 call PutS 537 jr ContinueBootLoader 538 $$: ld hl,sCurrently 539 call PutS 540 call IsOS2Running 541 ld hl,sOS2 542 jr z,$F 543 ld hl,sTIOS 544 $$: call PutS 539 call NZIfTIOSExists-BootLoader+userMem 540 jp z,ReceiveTIOS-BootLoader+userMem 541 ;We have the TI-OS, decide to make the switch or not 542 $$: ld hl,sCurrently-BootLoader+userMem 543 B_CALL PutS 544 call IsOS2Running-BootLoader+userMem 545 ld hl,sOS2-BootLoader+userMem 546 jr z,$F 547 ld hl,sTIOS-BootLoader+userMem 548 $$: B_CALL PutS 545 549 ld hl,6 546 550 ld (curRow),hl 547 ld hl,sInstructions 548 call PutS 549 ContinueBootLoader: 551 ld hl,sInstructions-BootLoader+userMem 552 B_CALL PutS 550 553 ld hl,7 551 554 ld (curRow),hl 552 ld hl,sClearToCancel 553 call PutS 554 set receiveTIOS,(iy+linkFlags2) ;receive the TI-OS to the extra pages instead of just jumping to the boot code 555 BootLoaderKeyLoop: 556 B_CALL GetKey 557 cp skClear 558 jr z,$F 555 ld hl,sClearToCancel-BootLoader+userMem 556 B_CALL PutS 557 bootSelectKeyLoop: 558 ei 559 B_CALL GetCSC 559 560 cp skYEqu 560 561 jr z,SwitchOS 561 jr BootLoaderKeyLoop 562 $$: call ClrLCDFull 563 jp TurnCalculatorOn 562 cp skClear 563 jr nz,bootSelectKeyLoop 564 ;We pressed CLEAR, just reset and boot whatever it is that we are 565 B_CALL ClrLCDFull 566 rst 00h 564 567 SwitchOS: 565 568 B_CALL UnlockFlash … … 578 581 ; Copy from the extra RAM pages to pages 68h-6Bh 579 582 ;Restart. 583 B_CALL ClrLCDFull 580 584 rst 00h 585 ReceiveTIOS: 586 ;We don't have a copy of the TI-OS, receive one 587 ld hl,sStartTransfer-BootLoader+userMem 588 B_CALL PutS 589 ld hl,7 590 ld (curRow),hl 591 ld hl,sClearToCancel-BootLoader+userMem 592 B_CALL PutS 593 set receiveTIOS,(iy+linkFlags2) ;receive the TI-OS to the extra pages instead of just jumping to the boot code 594 BootLoaderKeyLoop: 595 B_CALL GetKey 596 cp skClear 597 jr z,$F 598 jr BootLoaderKeyLoop 599 $$: B_CALL ClrLCDFull 600 jp TurnCalculatorOn 581 601 NZIfTIOSExists: 582 602 in a,(memPageAPort) -
trunk/page1C/silentlink.asm
r35 r36 383 383 jr ReceiveOSPage 384 384 $$: call SendAcknowledge 385 ;Couldn't hurt to try to send another acknowledge, because TI Connect sucks 386 ld hl,tryAckAgainHandler 387 call APP_PUSH_ERRORH 388 call SendAcknowledge 389 call APP_POP_ERRORH 390 tryAckAgainHandler: 385 391 ;TODO: Patch the received TI-OS to not erase sector 70h (where we will be backed up) 386 ;TODO: Put the [X,T,theta,N] boot loader in page 0 392 ;TODO: Put the [X,T,theta,N] boot loader in page 0 (currently in the extra RAM pages) 387 393 ;This loader needs to read the keypad for skGraphvar, and if it's being pressed, call: 388 ; in a,(6)389 ; push af390 394 ; ld a,70h 391 395 ; out (6),a 392 ; call StartBootLoader+4000h 393 ; pop af 394 ; out (6),a 395 ; ret 396 ; jp StartBootLoader+4000h 397 ;Copy the extra RAM pages to sector 70h 398 ld a,04h 399 ld b,70h 400 ld c,4 401 $$: push af 402 push bc 403 call CopyRAMToFlashPage 404 pop bc 405 pop af 406 inc a 407 inc b 408 dec c 409 jr nz,$B 410 ld a,'D' 411 call PutC 396 412 call APP_POP_ERRORH 397 413 ;Seems like the most sensible thing to do after receiving the TI-OS is just shut off -
trunk/page1D/1Dbase.asm
r28 r36 4 4 PUBLIC _JErrorNo,_UnlockFlash,_GetKey 5 5 EXTERN JErrorNo,UnlockFlash,GetKey,keyscnlnk,Rec1stByteNC,RecAByteIO 6 EXTERN ClrLCDFull,PutS,GetCSC 6 7 7 8 ;4000h: … … 31 32 DB 00h 32 33 ;_GetCSC equ 4018h ;key board scan codes 33 DW 0000h 34 _GetCSC: 35 DW GetCSC 34 36 DB 00h 35 37 ;_coorMon equ 401Bh ; … … 1297 1299 DB 00h 1298 1300 ;_PutS equ 450Ah 1299 DW 0000h 1301 _PutS: 1302 DW PutS 1300 1303 DB 00h 1301 1304 ;_putpsb equ 450Dh … … 1350 1353 DW 0000h 1351 1354 DB 00h 1352 ;_ClrLCDFull equ 4540h 1353 DW 0000h1355 _ClrLCDFull: 1356 DW ClrLCDFull 1354 1357 DB 00h 1355 1358 ;_ClrLCD equ 4543h
