| |
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.... |
| |
Giulio/Wolf
Registered: Apr 2016 Posts: 18 |
No, $FFD5 can be used without BASIC ROM enabled.
try:
LDA #$C7 STA $DD00
LDA #$0 JSR $FFD5
in your routine.
If you call $FF84, yes it enables again the BASIC ROM so you should not use it because for what I see in your code you are disabling the BASIC at the start... isnt'it? |
| |
oziphantom
Registered: Oct 2014 Posts: 490 |
$c7 into $dd00 doesn't help :( |
| |
Giulio/Wolf
Registered: Apr 2016 Posts: 18 |
Well, sorry but I'm out of ideas.At this point I think it could be one of the few cases were there's incompatibility between C64 and C128 in 64 mode. You say it's working on VICE, so my last guess is this.
One last thing you could try is copy and paste the code called by $FF84 and stop before you encounter
LDA #$E7 STA $01
so for example:
JSR COPYROUTINE
LDA #$00 JSR $FFD5
in your routine.....
(obviously COPYROUTINE must be allocated somewhere in your code...) |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: $c7 into $dd00 doesn't help :(
For eye of the beholder I do an IOINIT at start up and backups the whole ZP. Then I also make sure the game doesn't touch $0200-$03ff.
When loading I put my IRQs and NMIs into a no-op mode just like you do. Restore the "kernel" ZP and do the loading.
This was the only way I could get it to work in all weird cases. |
| |
oziphantom
Registered: Oct 2014 Posts: 490 |
I save and restore Kernal addresses as per the IDE64 document. However if it was one of them being wrong, wouldn't it still fail in VICE? This is a hardware only hang.. |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
If you, by accident, do something undefined all hell can break loose and very well be dependant on RAM-init pattern. |
| |
Flavioweb
Registered: Nov 2011 Posts: 463 |
[stupid question]
Using Vice, you tried it on X64 or X128?
With X128 crash or works?
[/stupid question]
Maybe, if crash, X128 will help you to debug... |
| |
soci
Registered: Sep 2003 Posts: 480 |
JMP $FFD5 ; call LOAD
It's not a JSR in the original source, might be a problem. |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote:
JMP $FFD5 ; call LOAD
It's not a JSR in the original source, might be a problem.
Haha wtf!!! Didn’t even see it! |
| |
oziphantom
Registered: Oct 2014 Posts: 490 |
Quoting soci
JMP $FFD5 ; call LOAD
It's not a JSR in the original source, might be a problem.
(/)_. a ; moment for sure. However it is not the only issue, I still need to do a lot of modifications to the code to get it to work.. |
Previous - 1 | 2 | 3 - Next |