| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
Packer/decruncher for under IO?
So, what's the current rec for tools that let you load stuff that will crunch down to less than 51199 bytes, but decompresses to the entire area from from (ooh, for example) $0801 to $e1e0? I thought pucrunch took care of that, but either I'm mistaken or I don't know what flags to use.
(why yes, I do have an entry for Show Me Your (Vector) Balls that fits that criteria) |
|
... 15 posts hidden. Click here to view all posts.... |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: Ah! $34 was the answer. Thanks, @tlr. I've not used the RAM under IO for anything other than charsets or sprites for a very long time.
@algorithm, fair point about saving/restoring $01 in the general case, but in this instance I know the mainline code isn't touching IO.
Save and set $01 in the irq handler anyway, always unless you really need the cycles. One day 4h before deadline you'll get the brilliant idea to load the next part while you irq is running => boom!
Been there - done that! :)
Oh and for real safety push the values on stack instead of zp if you get the other brilliant idea to allow an irq happen inside the handler. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
my 2 cents: dont use zp,
sta saveaccu+1
..
..
saveaccu lda #$00
is just as fast, but now you have avoided zp conflicts :) |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
Quote: Ah! $34 was the answer. Thanks, @tlr. I've not used the RAM under IO for anything other than charsets or sprites for a very long time.
@algorithm, fair point about saving/restoring $01 in the general case, but in this instance I know the mainline code isn't touching IO.
Hmm, I think $30 should have worked though. The only difference is that CHAREN is 0 but the I/O area/charrom isn't visible with LORAM/HIRAM=0 anyway. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
I have never used $30, altho I remember seing shit like this when peeking at code. |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
Quote: I have never used $30, altho I remember seing shit like this when peeking at code.
$30 isn't all that useful but $31 can be as you can flip in the char rom while still having ram at $a000-$bfff and $e000-$ffff. |
| |
algorithm
Registered: May 2002 Posts: 705 |
@Oswald. That is what i do as well. Although it does use 2 cycles more overall for each register save/restore which is trivial |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
Quote: @Oswald. That is what i do as well. Although it does use 2 cycles more overall for each register save/restore which is trivial
2 cycles more ?
lda $00
sta $00
= 6 cycles
sta $1000
lda #$00
= 6 cycles |
| |
algorithm
Registered: May 2002 Posts: 705 |
Darn. Sorry oswald. Ofcourse its 6 cycles. :-) |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
Hrm, and now if I change back to $30 it still works. I suspect I didn't check in a version close enough to hunt down what the real issue was now.
@JackAsser, very good point about future proofing. Linking issues were one of the biggest reasons I didn't manage to complete my entry for BFP in 2006 :-/ |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
Quoting ChristopherJamHrm, and now if I change back to $30 it still works. I suspect I didn't check in a version close enough to hunt down what the real issue was now.
There are two solutions to this:
1. make more fine granular commits with decent comments.
2. regress to being 13 years old when we could still remember all the steps and juggle them around with the occasional help of pen and paper.
:) |
Previous - 1 | 2 | 3 - Next |