| |
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.... |
| |
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? |
| |
ready.
Registered: Feb 2003 Posts: 441 |
ok, found the problem.
Since I have a $d012 raster interrupt active for sprite multiplexing, I thought a SEI was enough to disable it before invoking the save routine:
SEI
LDA #fname_end-fname
LDX #<fname
LDY #>fname
JSR $FFBD ; call SETNAM
LDA #$00
.....
but since the saving routine after:
JSR $FFD8 ; call SAVE
has some CLIs inside, this would re-enable the raster interrupt and do the mess.
Now I added:
SEI
LDA #$00
STA $D01A ;VIC Interrupt Mask Register (IMR)
LDA #fname_end-fname
.....
and now it works.
By the way: basic ROM can be disabled. |
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
I added some notes regarding the issues that READY came across to codebase now. I guess it may help someone else..
http://codebase64.org/doku.php?id=base:dos_examples |
| |
Angel of Death
Registered: Apr 2008 Posts: 211 |
From the posts I assume we are talking about disk (fast) loaders savers.
Slash design has used kernel-based load/save/disk-command in his Characterize V0.03 which (as I found out) are quite safe and sturdy.
Used as a basis they should pick up any other cartridge/external based fastloader.
But, then again, if the files are not too big why waste precious memory on fastloaders?
Should be better uses for that in an application...
|
| |
terric Account closed
Registered: Feb 2009 Posts: 47 |
I actually made a glitching irq loader with the kernel routines. Using a source from codebase64 and some facts from this thread. It is not fast, 1byte per frame.
Used
before
sei
lda #$00
sta $d01a
lda #$37
sta $01
" loading one byte "
and afterwards
sei
lda #$01
sta $d01a
lda #$35 // whatever you like
sta $01
cli |
| |
ready.
Registered: Feb 2003 Posts: 441 |
@Frantic: thanks for adding the issue to Codebase |
Previous - 1 | 2 | 3 - Next |