| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quick loading without an IRQ-loader!
Hey guys!
I know my ways around the various IRQ-loaders normally used today, but what about the non-IRQ-loaders (no music, $d011=0, sei, no-NMIs)?
- Which one can you recommend?
- Are there any that comes with source so that I can easily relocate them?
- How much faster are (can) a non-IRQ-loader be compared to an IRQ-loader?
- Any that perhaps easily can be connected to pucrunch or exo and thus load and decrunch at the same time?
- Is this stupid? Are the modern IRQ-loaders as fast or faster than the old legacy non-IRQ-loaders anyway?
/JackAsser |
|
... 23 posts hidden. Click here to view all posts.... |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: Quote:you can reinit everything through kernal subs
NO! if a cartridge is inserted, then calling the kernal functions will reset the vectors to their "normal" values. to be able to use cartridge loaders you must NOT call i/o reset (might disable cartridge), and NOT touch the vectors whatsoever.
said kernal functions beeing called is pretty much the number one reason for cartridge fastloaders NOT working with a lot of programs =P
So what exactly must I do to be safe using the cart loader? Keeping $0330 and $0331 is simple enough, but is that enough? How must ZP and other stuff be set prior to calling LOAD, can it be anything?
/JackAsser |
| |
MagerValp
Registered: Dec 2001 Posts: 1078 |
Quote: Hmms, ok. So, what do I need to preserve to make sure LOAD works when I need it too (and that it will use the fastloader on the cart)?
Do you need to mess with $03xx at all? Not touching them and just using LOAD means that it'll use AR6 or JiffyDOS or whatever.
Emulator users are screwed though. Flirt with GRG and use n0sd0s?
|
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
Quote:So what exactly must I do to be safe using the cart loader? Keeping $0330 and $0331 is simple enough, but is that enough? How must ZP and other stuff be set prior to calling LOAD, can it be anything?
- don't touch the vectors (not just load, but also chrin etc, just incase) or restore them
- not call the kernal routines for resetting i/o (these also rewrite vectors, but not with the one that are used by the cart so effectivly they disable cart fastloaders)
- not do any other fancy stuff that stops carts from banking in their ram into i/o area (thats were the vectors point to)
|
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: Quote:So what exactly must I do to be safe using the cart loader? Keeping $0330 and $0331 is simple enough, but is that enough? How must ZP and other stuff be set prior to calling LOAD, can it be anything?
- don't touch the vectors (not just load, but also chrin etc, just incase) or restore them
- not call the kernal routines for resetting i/o (these also rewrite vectors, but not with the one that are used by the cart so effectivly they disable cart fastloaders)
- not do any other fancy stuff that stops carts from banking in their ram into i/o area (thats were the vectors point to)
Hmms ok. Really, is that all?
- Exactly what memory area is 'the vectors'? $03xx?
- What about SEI/CLI? Ok if SEI?
- What about the CIA-chips? Any state they need to be in?
- What about zero page, anything I need to consider there?
- Will is also work without a cart? Iirc the normal KERNEL is quite picky about timers and CIA in general hence my call to reset IO.
It will be quite tricky for me to preserve the whole $03xx area, possible to pin point exactly like how Groepaz started?
And FYI I'm 'cracking' an old demo.
/JackAsser |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
- Exactly what memory area is 'the vectors'? $03xx?
yes
- What about SEI/CLI? Ok if SEI?
not sure, but it should not matter - the kernal routines sei/cli internally and you should expect them to do it too.
- What about the CIA-chips? Any state they need to be in?
probably :) i'd check if it works with normal kernal, then it should be ok with carts too
- What about zero page, anything I need to consider there?
setnam, chkout etc should set up the required ZP ... i think :)
- Will is also work without a cart? Iirc the normal KERNEL is quite picky about timers and CIA in general hence my call to reset IO.
yes. you should always test against the original kernal. cracks often use a clone of the kernals reset-i/o function, with the unwanted stuff removed.
- It will be quite tricky for me to preserve the whole $03xx area
like jox said, only the LOAD vector _should_ be enough. for a demo that only ever uses the load call anyway :)
|
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: - Exactly what memory area is 'the vectors'? $03xx?
yes
- What about SEI/CLI? Ok if SEI?
not sure, but it should not matter - the kernal routines sei/cli internally and you should expect them to do it too.
- What about the CIA-chips? Any state they need to be in?
probably :) i'd check if it works with normal kernal, then it should be ok with carts too
- What about zero page, anything I need to consider there?
setnam, chkout etc should set up the required ZP ... i think :)
- Will is also work without a cart? Iirc the normal KERNEL is quite picky about timers and CIA in general hence my call to reset IO.
yes. you should always test against the original kernal. cracks often use a clone of the kernals reset-i/o function, with the unwanted stuff removed.
- It will be quite tricky for me to preserve the whole $03xx area
like jox said, only the LOAD vector _should_ be enough. for a demo that only ever uses the load call anyway :)
@Groepaz: Hmmz. :) Thanx for the good input.
Basically I'll take the bits and pieces of information and dis-information from you guys and start experimenting my self. :D I have a good idea what research I need to do know, so thanx!
/JackAsser
|
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
A tool which I am coding uses cartridge for fastloading/saving. Regarding the state of the CIA's I basically just make sure that there is a timer interrupt (Timer A, CIA 1, I believe) which goes off once a frame, pointing to the vectors at $03xx, and I enable the interrupts (dunno if that is necessary).
I don't really know about required ZP variables, apart from the ones you explicitly set up when calling the load/save routines, since I don't touch ZP much in my tool. |
| |
Mace
Registered: May 2002 Posts: 1799 |
In reply to the original question (I haven't read this thread completely): my favourite speedloader was Gigaload.
It's embedded in at least one Secure demo I made.
Don't know where I got it from...
I vaguely remember seeing it on a GEOS disk, once, though. |
| |
Graham Account closed
Registered: Dec 2002 Posts: 990 |
Also important: $BA should not be destroyed. It's the last used device number. If someone loaded your program from device 11, your program should continue to do so too. Don't default everything to device 8.
|
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: Also important: $BA should not be destroyed. It's the last used device number. If someone loaded your program from device 11, your program should continue to do so too. Don't default everything to device 8.
Noted. Thanx! |
Previous - 1 | 2 | 3 | 4 - Next |