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 > Quick loading without an IRQ-loader!
2009-03-12 06:41
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....
 
2009-03-12 17:10
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
2009-03-12 17:10
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?
2009-03-12 17:48
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)
2009-03-12 17:55
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
2009-03-12 18:08
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 :)
2009-03-12 18:40
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
2009-03-12 18:44
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.
2009-03-12 19:36
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.
2009-03-13 03:03
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.
2009-03-13 06:02
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
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
BYB/Hokuto Force
Da Snake
DivertigO
JCH/Vibrants
astaroth/TRSI
Rick/F4CG
Guests online: 112
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 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.136 sec.