Show
Ignore:
Timestamp:
11/01/09 14:00:18 (3 years ago)
Author:
brandonlw
Message:

Some dual booting clean-up

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/page1C/silentlink.asm

    r57 r59  
    1111 EXTERN SetYAutoIncrementMode,SendContinue,ReceiveDataPacket,DispHexHL,PutC,receiveRestOfDataPacket 
    1212 EXTERN CopyToRAMPage,CopyRAMToFlashPage,EraseEOL,PowerOff,SendHCommand,IPutSB,IPutC,CheckForBootLoader 
    13  EXTERN SetupPagedPtr,PagedGet,SendChecksumGetAcknowledge,RecAByteIO 
     13 EXTERN SetupPagedPtr,PagedGet,SendChecksumGetAcknowledge,RecAByteIO,cphlde,NZIf84PlusSeries 
    1414 
    1515keyscnlnk: 
     
    312312       ld (curRow),hl 
    313313       ld a,(ioData+8) 
    314        call DispHexA 
     314;       call DispHexA 
    315315       ld hl,(ioData+6) 
    316        call DispHexHL 
     316;       call DispHexHL 
    317317       call EraseEOL 
    318318       pop hl 
     
    386386       push af 
    387387       ld a,5 
    388        call IPutC 
    389        ex de,hl 
    390        call DispHexHL 
     388;       call IPutC 
     389       ex de,hl 
     390;       call DispHexHL 
    391391       ex de,hl 
    392392       ld a,d 
     
    394394       ld d,a 
    395395       ex de,hl 
    396        call DispHexHL 
     396;       call DispHexHL 
    397397       ex de,hl 
    398398       pop af 
     
    429429       ld hl,6 
    430430       ld (curRow),hl 
    431        call DispHexA 
    432        ex de,hl 
    433        call DispHexHL 
     431;       call DispHexA 
     432       ex de,hl 
     433;       call DispHexHL 
    434434       ex de,hl 
    435435       pop bc 
    436436       push bc 
    437437       pop hl 
    438        call DispHexHL 
     438;       call DispHexHL 
    439439       ld hl,appData 
    440440       B_CALL UnlockFlash 
     
    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 
     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 
     477       push hl 
     478       pop ix 
     479findBootCodeJumpLoop: 
     480       ld l,(ix+0) 
     481       ld h,(ix+1) 
     482       ld de,80D5h 
     483       call cphlde 
     484       jr z,$F 
     485       ld de,812Ch 
     486       jr z,$F 
     487       inc ix 
     488       push ix 
     489       pop bc 
     490       bit 6,b 
     491       jr z,findBootCodeJumpLoop 
     492       jr skipBootCodeJump 
     493$$:    ld de,812Ch 
     494       call NZIf84PlusSeries 
     495       jr nz,$F 
     496       ld de,80D5h 
     497$$:    ld (ix+0),e 
     498       ld (ix+1),d 
     499skipBootCodeJump: 
    477500       ;Find the page 0 routine for this OS 
    478501       ld a,7Bh 
     
    522545       dec c 
    523546       jr nz,$B 
     547       ;Mark the OS as valid 
     548       xor a 
     549       ld b,5Ah 
     550       ld de,0056h 
     551       B_CALL WriteAByte 
    524552       ld hl,0 
    525553       ld (curRow),hl 
     
    529557       ld a,81h 
    530558       out (7),a 
    531        call DispHexHL 
     559;       call DispHexHL 
    532560       ld a,'Y' 
    533        call PutC 
     561;       call PutC 
    534562       res indicOnly,(iy+indicFlags) 
    535        B_CALL GetKey 
     563;       B_CALL GetKey 
    536564       call SendAcknowledge 
    537565       ;Couldn't hurt to try to send another acknowledge, because TI Connect sucks