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 > Question/Problem about Dreamload
2007-07-22 14:42
Conrad

Registered: Nov 2006
Posts: 849
Question/Problem about Dreamload

I'm having a bit of trouble with Dreamloader for the last few weeks now, not saying that I'm a lamer at using it :) it's more to do with the disks (testing on WinVice with 1541-I drive btw).

What it is, most of the files on the disk load great as normal, but for some files it causes the loader and program IRQ to freeze.

I have a feeling it's something to do with where the allocated blocks of the file are stored in the BAM, because this problem happens after I transfer a certain file to the D64 image, or make a duplicate of the disk. I'm currently using D64 Editor V0.028 to put files onto a d64, so I'm not too sure if it's that program that's causing it, or Dreamloader.

Just to let you know that the code for the demo/whatever is set up properly and that all load addresses of each file to load are correct and will not overwrite any code areas in memory. I've had this same problem with another production as well.

Can anyone tell me what I might be doing wrong?

cheers.


EDIT: Here's the source code I'm using to load a file, if you may need to see:

;Prepare loader and start of demo...
*=$8f00
	jsr $8000		;Initialise disk-drive fastloader.
	bcc load_setup_ok	;If no carry, init successfull.
	inc $d020		;Else, flash border, saying no drive is connected, etc.
	jmp $8f00		;Loop back to check again.
load_setup_ok	
	jmp irqstart		;Call main IRQ to setup and start demo.


;This part is JMPed to after IRQ is set up.
load_restart
	jsr $0506		;Shut up the disk-drive.
load_next
	lda #$00		;Shift next two files to the file handle to load.
	sta load_start+1	;
load_third
	lda #$00		;
	sta load_next+1		;
	lda #$00		;
	sta load_third+1	;	
load_start	
	lda #$00		;Main driver loop to check for next file to load.
	beq load_next
	clc
	adc #$2b		;Offset to store char as "@" onwards
	cmp #$3f		;Check if the char is a "?" (invalid filechar)
	bne *+4
	lda #119		;Set it as another unique symbol
	sta load_filename
	jsr $0509		;Wake up the disk-drive.
load_retry
	ldy #>load_filename	;and load the file...
	ldx #<load_filename	;
	lda #$02		;(first 2 chars required from filename)
	jsr $0500		;
	bcs load_error		;If no carry, load was successful.
	lda load_start+1	;Do we need to restart the tune after load?
	cmp #$11
	bcc load_restart	;Skip if not a tune loaded.
	lda #$00		;Else start loaded music.
	tax
	tay
	jsr $1000
	jmp load_restart
load_error			;If load unsuccessful, check the right disk is inserted.

...blah...blah...blah

load_filename
	!text " *"




 
... 3 posts hidden. Click here to view all posts....
 
2007-07-24 05:36
Ninja

Registered: Jan 2002
Posts: 411
I think you are using an old version of dreamload, which had a bug accessing tracks 32 and above. Get the newest version here (and forgive us our bad announcement policy = there is hardly none :( )

http://developer.berlios.de/projects/rrtools/

(updated the CSDb-entry now, sorry for the confusion)
2007-07-24 11:22
Conrad

Registered: Nov 2006
Posts: 849
Thank you Ninja. I'm positive this will improve the problem (I hope anyway).
and BTW, props to you and DocBacardi for this outstanding loader, it's very useful indeed :)
2007-07-25 20:23
Conrad

Registered: Nov 2006
Posts: 849
Tell you what guys, just forget this topic completely. I just realized the problem I had was: Two filenames in the directory both began with the same letter i.e. "DEMO" and "D." thus loading the main code which de-facto caused a crash.

Once again .... i screwed up :DD

Thanks for your inputs anyway.
2007-09-01 03:42
gregg
Account closed

Registered: Apr 2005
Posts: 56
Hi, I'm having a problem with DreamLoad too. I'm trying to use the LoadTS interface to read a disk (1541) sector by sector, track by track. However, DreamLoad errors out after successfully having read the 1st sector, most of the time it hangs when trying to read the 2nd sector or when trying to reset the drive. Any idea what I'm doing wrong here?

!to "loadtest.prg",cbm
!cpu 6510
!source "mylib.a"

DL_init = $2000
DL_base = $4000

; basic loader
*= $0801
!byte $0b,08,0,0,$9e
!text "4096"
!byte 0,0,0

*=$1000
init	sei
		jsr DL_init
		bcc +
		lda #<init_error_msg
		ldy #>init_error_msg
		jmp $ab1e
+		

; load 1st zone tracks
loadz1	ldx #1
--		ldy #0
-		jsr DL_base+3
		bcc +
		lda #<load_error_msg
		ldy #>load_error_msg
		jsr $ab1e
		jmp DL_base+15
+		; do stuff with loaded sectors here :)
		inc $d020
		iny
		cpy #21
		bne -
		inx
		cpx #18
		bne --
		
                jmp DL_base+15
			
;--------------------------------------------------------------------------
; text messages

init_error_msg
!pet "error initializing loader!"
!raw $8d, 0

load_error_msg
!pet "error loading a sector!"
!raw $8d, 0

;--------------------------------------------------------------------------
; dreamload

*=$2000
!binary "dload.prg",,2
2007-09-01 03:51
Style

Registered: Jun 2004
Posts: 498
Ive never used it, but are you sure that dreamload retains the contents of the registers during the JMP DL_BASE+15?

2007-09-01 03:59
gregg
Account closed

Registered: Apr 2005
Posts: 56
I don't think it matters, DL_base+15 only resets the drive and after that returns to BASIC. I just tested it on the real machine, it never hangs on my 128D but it does so in VICE with 1541-II emu. :)

[edit]
OK, of yourse you meant DL_base+3... and you were right, sorry for being so stupid. Works like a charm now.

OK, but it turns out DreamLoad is quite slow for such purposes, even after tweaking interleave somewhat (I suppose interleave of 10 is OK?). I need a a fast track reader I guess. Hints?
2007-09-01 06:44
Ninja

Registered: Jan 2002
Posts: 411
Well, optimal interleave is a complicated problem; still I think 8 is a way better everyday value than 10. If this does not help and your project is 1541 only, then you might want to ask Krill for his loader which is more independant on interleave. Of course, if you want max speed and do not have interruptions, then you should go for completely different types of loaders.
2007-09-01 06:49
gregg
Account closed

Registered: Apr 2005
Posts: 56
My project is 1541-only and I don't have interruptions. At least only planned ones between reading the tracks. I already asked Krill about his loader. I'll give it a try as soon as I have it.
A non-IRQ-loader would probably be faster/better suited for this, as you pointed out though. But where can I find such loaders? Everyone only wants IRQ loaders! :)

Maybe it's possible to rip such a loader right from a fast disk copier.
2007-09-01 08:21
tlr

Registered: Sep 2003
Posts: 1790
Quote: I think you are using an old version of dreamload, which had a bug accessing tracks 32 and above. Get the newest version here (and forgive us our bad announcement policy = there is hardly none :( )

http://developer.berlios.de/projects/rrtools/

(updated the CSDb-entry now, sorry for the confusion)


Svn-repository + using jam, yay!

I've wanted to have a go at using jam for a long time. I'm using make/automake currently.
2007-09-01 10:24
Style

Registered: Jun 2004
Posts: 498
gregg: yeh sorry, DL_BASE + 3 :) glad it worked out :)
Previous - 1 | 2 - 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
rexbeng
Da Snake
/Panor..
BYB/Hokuto Force
DivertigO
JCH/Vibrants
astaroth/TRSI
Rick/F4CG
Guests online: 135
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 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (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 Censor Design  (9.3)
5 Triad  (9.3)
Top Original Suppliers
1 Derbyshire Ram  (9.7)
2 Fungus  (9.3)
3 Black Beard  (9.2)
4 Baracuda  (9.2)
5 hedning  (9.1)

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