| |
Jammer
Registered: Nov 2002 Posts: 1336 |
TURBO loaders/savers
as in the topic - i really need some information on good turbo loaders and savers. irq ones don't count. it would be also great if they were tass sources, optionally with any relocator. what do you recommend? :) |
|
... 15 posts hidden. Click here to view all posts.... |
| |
hevosenliha
Registered: Sep 2008 Posts: 48 |
Quote: Another vote for "just use kernal calls". Trust the user to have a fastload system installed. Everyone has some kind of fastload system - be it AR6, JiffyDOS, or warp mode.
Or IDE64, please stick to the kernel calls! |
| |
cadaver
Registered: Feb 2002 Posts: 1160 |
If you read the file byte-by-byte with Kernal calls (open/chrin etc.), you can split the data into memory just like you wish, turbo not needed for that.
|
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
@Cadaver: You're right, of course... :) (...but then you won't have the benefit of turbo-speed inherited from a plugged in cartridge of course.) |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
If you need sources, i can give you all my stuff, including the current loader (the multi-drive protocols aren't implemented yet), and those of Plush-DOS yago mentioned, although that is quite outdated stuff. |
| |
ready.
Registered: Feb 2003 Posts: 441 |
As I need a saver routine for my gfx editor as well and I spent some time in trying to implement it, here is what I came up with using Kernal routines:
*=$c000
;setnam
lda #(name1-name0) ;name length
ldx #<name0
ldy #>name0
jsr $ffbd
;setlfs
lda #$01 ;logical file number
ldx #$08 ;device number
ldy #$01 ;secondary address
;save
lda #<data0
sta $fb
lda #>data0
sta $fc
lda #$fb ;zero page pointer
ldx #<data1
ldy #>data1
jsr $ffd8
rts
name0 .text"CIAO"
name1
*=$c100
data0 .byte 0,1,2,3,4,5,6,7,8,9
data1
this saves the file "CIAO" to disk #8. The file contains the data 0,1,2,3,4,5,6,7,8,9 starting at $c100.
It might be obvious for somebody but I must say it was not for me at the beginning how to use Kernal routines. Useful reference:
http://noname.c64.org/csdb/release/?id=83305&show=summary#summa..
I tried with Krill's loader but I must say I got a headache quite soon. Sorry Krill, I need some time to figure out how to use it. I just needed a quick solution.
|
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
http://codebase64.org/doku.php?id=base:saving_a_file
use codebase people, it already has a wealth of information :) Graham's handling of device Nr is more transparent take a look, otherwise it looks to be the same. It's better to use the kernal correctly, than an own save routine, because that way you'll be compatible with all kind of devices. (just dont hardcode #8 :) |
| |
ready.
Registered: Feb 2003 Posts: 441 |
yes you are write Oswald...I just got driven by enthusiasm when I noticed my code worked. But Codebase should be The Reference. |
| |
ready.
Registered: Feb 2003 Posts: 441 |
back to this topic again.
I succesfully used the load/save kernal calls under basic and some assembler code under $c000 area to call the kernal routines and setup the needed file parameters.
But...when it comes to using these calls under an assembler program that is in the basic area ($a000-$bfff) troubles show up. So far I tested only the save routine and after calling it, it gets lost somewhere after
JSR $FFD8 ; call SAVE
for some reason it looks like it tries to re-enable the interrupt vectors at $0314-$0315. It never makes it back after the JSR $FFD8
before calling the kernal routine I set $01 to $36, so Kernal is enabled and also give a SEI to stop the active IRQs.
any help is very welcome!
regards,
Ready.
|
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
the save routine may contain a cli and/or there might be a routine in the basic area thats called in the process. you'll most probably have to use a custom save routine to save from under the roms. |
| |
Stryyker
Registered: Dec 2001 Posts: 468 |
The load/save routines should work under the BASIC ROM. Can you test in VICE with some triggers to call the monitor? |
Previous - 1 | 2 | 3 - Next |