| |
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? |
|
... 20 posts hidden. Click here to view all posts.... |
| |
AlexC
Registered: Jan 2008 Posts: 299 |
Somehow I doubt that Vice emulation is so broken that it makes the code with JMP instead of JSR working on emulator. There must be something else in the way. |
| |
Giulio/Wolf
Registered: Apr 2016 Posts: 18 |
Quote: Somehow I doubt that Vice emulation is so broken that it makes the code with JMP instead of JSR working on emulator. There must be something else in the way.
Exactly. Also, JMP or JSR doesn't make any difference for what he reported in his first post: his real 128D (in 64 mode? it's not specified) hangs and the drive doesn't spin when the Kernal LOAD routine is called when instead it works on VICE (X64? X128? again not specified). He also posted where exactly the load is hanging.
As I already posted, but without the necessary info is only a guess, it could be an incompatibility problem between C128 (in 64 mode?) and C64 (even if emulated on VICE). I perfectly recall the good ol' days when people with 128 were complaining on magazines that some C64 games were not working on their machines... (HE-MAN is the first game that comes in mind now...) |
| |
oziphantom
Registered: Oct 2014 Posts: 490 |
The hang happens on
C128D with 1571 booting from an EF3 cart - so it boots to C64 mode, as it detects the EF3 cartridge
C64C (don't know the model rev) loading from SD2IEC, Taptino with and without a FC3 cart connected, in both D64(only SD2IEC) and raw PRG loading.
Tested on X64sc 3.2,3.1 TDE with 1541 and 1571
2.4,2.4OSX, C64 Debugger latest - works fine in all cases
CCS64 3.x does show a hang on loading
So its not a 128 only issue, nor a 1571 only issue.
It happens if it is direct loaded ( on methods that support it) and loaded then decompressed via Exomizer 3.0 SFX
FUN FACT : FFBA also trashes part of RAM in the FD00-FE00 block... |
| |
oziphantom
Registered: Oct 2014 Posts: 490 |
also 02a6 is the correct 1 at time of loading, so that hasn't been trashed. |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
Quoting oziphantomFUN FACT : FFBA also trashes part of RAM in the FD00-FE00 block... Sounds more like the $fd15 bug? The vector setup routine trashes ram at $fd30 on a stock kernal. |
| |
Flavioweb
Registered: Nov 2011 Posts: 463 |
Try to load it on C128, in 64 mode, pressing the "top" caps lock key (on the first row of keys)...
I recall sometimes it resolve some issues... |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Could it be stuck in the RSPOFF loop in RSP232 (http://unusedino.de/ec64/technical/aay/c64/romf0a4.htm) due to a faulty value of ENABL = $02a1?F0AA: AD A1 02 LDA $02A1 ; RS232 Enables
F0AD: 29 03 AND #$03
F0AF: D0 F9 BNE $F0AA
.,F0AA AD A1 02 LDA $02A1 RSPOFF LDA ENABL ;WAIT UNTILL DONE
.,F0AD 29 03 AND #$03 AND #%00000011 ; WITH T1 & T2
.,F0AF D0 F9 BNE $F0AA BNE RSPOFF
|
| |
oziphantom
Registered: Oct 2014 Posts: 490 |
LDA #$FF
STA aDD02 ;CIA2: Data Direction Register A
LDA #$00
STA aDD00 ;CIA2: Data Port Register A
If I do this before the load, it works on VICE but fails on hardware... |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: LDA #$FF
STA aDD02 ;CIA2: Data Direction Register A
LDA #$00
STA aDD00 ;CIA2: Data Port Register A
If I do this before the load, it works on VICE but fails on hardware...
In EotB I had problems when I touched the upper bits of DD00. Never touch DD02 and always LDA, AND, OR, STA $dd00. It will be timing dependant. Try:
Lda $dd00
And #$3c
Sta $dd00 |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Yeah, changing the data direction register is a terrible idea for KERNAL load.
But the upper two bits of $dd00 (incoming DATA and CLK) can be set to anything as long as they're inputs (as is the default), so ANDing with #$fc would be no different than #$3c, #$7c or #$bc. |
Previous - 1 | 2 | 3 - Next |