| |
oziphantom
Registered: Oct 2014 Posts: 490 |
load hangs on hardware
So I have a some code loading a file. it won't be there the first time but that is fine.
on VICE it works with TDE 1541 and 1571
I compress it with Exomizer to get it to work on a device and load it via EF3 Easy Transfer
It fails in the LOAD function on my 128D, it just locks up. Load never returns.
If I run the exomized version on VICE it works fine. TDE 1541 and 71
LOAD
lda #$36
sta $01
lda #0
jsr $ff90 ; setmsg off
jsr SetUpFileName
lda #1
sta $d021
LDA #$00 ; $00 means: load to memory (not verify)
JMP $FFD5 ; call LOAD
inc $d021
sta $d020
lda #$35
sta $01
rts
SetUpFileName
LDA #fnameEnd-fname
LDX #<fname
LDY #>fname
SetUpFileName2
JSR $FFBD ; call SETNAM
LDA #$01
; LDX $BA ; last used device number
; CPX #8
; bcs _skip
; BNE _skip
LDX #$08 ; default to device 8
_skip
LDY #1 ; not $01 means: load to address stored in file
JSR $FFBA ; call SETLFS
RTS
.enc "none"
fnameReplace .text "@0:"
fname .text "ffiihs"
fnameEnd
any ideas? |
|
| |
tlr
Registered: Sep 2003 Posts: 1790 |
I would assume that $ffd5 does a cli, so your $35->$01 will probably break unless you have stopped timer IRQs. Insert sei after the load. |
| |
oziphantom
Registered: Oct 2014 Posts: 490 |
it never returns from FFD5. The IRQ is set to an Empty one, but worth investigating thanks. |
| |
oziphantom
Registered: Oct 2014 Posts: 490 |
I added this before hand
lda #$7f
sta $dc0d
sta $dd0d
lda $dc0d
lda $dd0d
lda #$00
sta $d01a
lda #$ff
sta $d019
lda $d01e
lda $d01f
jsr LOAD
same issue |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
Ok, does you "empty" IRQ acknowledge the CIAs and/or other interrupt sources you have activated? If not, it will lock up in the ISR.
EDIT: mid air collision. |
| |
oziphantom
Registered: Oct 2014 Posts: 490 |
yeah
EmptyIRQ
pha
lda $dc0d
pla
rti
CCS hangs during load, during the
.C:eea9 AD 00 DD LDA $DD00
.C:eeac CD 00 DD CMP $DD00
.C:eeaf D0 F8 BNE $EEA9 part of the kernal. The lockup also can't be frozen by the FC3... |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
CIA DDR? |
| |
oziphantom
Registered: Oct 2014 Posts: 490 |
>C:dc00 7f ff ff 00 16 39 b4 ff 00 00 00 01 20 00 01 01 .....9...... ...
ICR: 00 CTRLA: 01 CTRLB: 01
ICR write: 01 Timer A IRQ: on Timer B IRQ: off TOD IRQ: off Serial IRQ: off Cassette IRQ: off
Port A: 7f DDR: ff
Port B: ff DDR: 00
Timer A: 3916
Timer B: ffb4
TOD Time: 01:00:00.0 (am)
TOD Alarm: 00:00:00.0 (am)
Synchronous Serial I/O Data Buffer: 20
(C:$dc10) io dd00
CIA2:
>C:dd00 c0 ff ff 00 ff ff ff ff 00 00 00 01 00 00 08 08 ................
ICR: 00 CTRLA: 08 CTRLB: 08
ICR write: 00 Timer A IRQ: off Timer B IRQ: off TOD IRQ: off Serial IRQ: off Cassette IRQ: off
Port A: c0 DDR: ff
Port B: ff DDR: 00
Timer A: ffff
Timer B: ffff
TOD Time: 01:00:00.0 (am)
TOD Alarm: 00:00:00.0 (am)
Synchronous Serial I/O Data Buffer: 00 |
| |
oziphantom
Registered: Oct 2014 Posts: 490 |
okay doing a JSR $FF84 gets the driving behaving as I would expect... completly trashes my game and the code, but gets the drive working.. |
| |
Giulio/Wolf
Registered: Apr 2016 Posts: 18 |
I don't know if this will help you... though I recall I encountered the same issue of you when I cracked BUDOKAN one year ago. The game and the drive freezed at the same place of you. It was using standard Kernal loading routine like you so I was a bit stuck because it was happening only in particular places of the game, expecially after losing the game and reloading the main title.
I recall I fixed the problem simply setting the VIC-II BANK CIA#2 register to:
LDA #$C7
STA $DD00
This fixed the issue and I blanked the video before doing it to avoid on screen garbage (default VIC-II BANK for the game was another...)
Hope this helps because as you already noticed, call $FF84 makes the drive work again, so hopefully the problem is resetting the CIA#2 register only before call LOAD. |
| |
oziphantom
Registered: Oct 2014 Posts: 490 |
setting the call back and the doing the load before I call anything causes it to end in BAD SUBSCRIPT ERROR ... it jumps into the AXXX range, does load need BASIC ROM? |
... 20 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 | 3 - Next |