Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > load hangs on hardware
2019-04-15 13:09
oziphantom

Registered: Oct 2014
Posts: 478
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....
 
2019-04-15 15:00
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?
2019-04-15 15:06
oziphantom

Registered: Oct 2014
Posts: 478
$c7 into $dd00 doesn't help :(
2019-04-15 15:13
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...)
2019-04-15 15:21
JackAsser

Registered: Jun 2002
Posts: 1989
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.
2019-04-15 15:25
oziphantom

Registered: Oct 2014
Posts: 478
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..
2019-04-15 16:45
JackAsser

Registered: Jun 2002
Posts: 1989
If you, by accident, do something undefined all hell can break loose and very well be dependant on RAM-init pattern.
2019-04-15 16:56
Flavioweb

Registered: Nov 2011
Posts: 447
[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...
2019-04-15 18:00
soci

Registered: Sep 2003
Posts: 473
JMP $FFD5     ; call LOAD
It's not a JSR in the original source, might be a problem.
2019-04-15 18:01
JackAsser

Registered: Jun 2002
Posts: 1989
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!
2019-04-15 18:27
oziphantom

Registered: Oct 2014
Posts: 478
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
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
LKP/CFN
megasoftargentina
Fresh
Durandal
Guests online: 131
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 The Ghost  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Logo Graphicians
1 Sander  (10)
2 Facet  (9.7)
3 Mermaid  (9.4)
4 Pal  (9.4)
5 Shine  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.048 sec.