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: 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....
 
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: 490
$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: 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.
2019-04-15 15:25
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..
2019-04-15 16:45
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.
2019-04-15 16:56
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...
2019-04-15 18:00
soci

Registered: Sep 2003
Posts: 480
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: 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!
2019-04-15 18:27
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
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
iAN CooG/HVSC
wil
Flashback
hedning/G★P
Wolk/Software of Swe..
zscs
Paladin/G★P
LightSide
St0rmfr0nt/Quantum
Guests online: 81
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 No Listen  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Rainbow Connection  (9.5)
7 Dawnfall V1.1  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Fullscreen Graphicians
1 Joe  (9.7)
2 Sulevi  (9.6)
3 The Sarge  (9.6)
4 Veto  (9.6)
5 Facet  (9.6)

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