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 > modify Exomiser compressor to black list some memory locations
2019-04-28 18:30
oziphantom

Registered: Oct 2014
Posts: 490
modify Exomiser compressor to black list some memory locations

Does anybody know a way to modify the exomizer compression algorithm to black list FF0X memory locations to never be read from, i.e don't allow them to be used as part of a sequence?

I guess a post process would also work, if there is a simple way to convert use a sequence to literal bytes..
 
... 16 posts hidden. Click here to view all posts....
 
2019-04-30 14:24
oziphantom

Registered: Oct 2014
Posts: 490
Exomizer by default has 16bit offsets, I guess I could force it into 256 offsets, then once I get below fe00 jump to another copy.. or change the get byte routing in ZP to point to different code...

At the moment it works in X128, but fails on hardware and Z64K so I'm trying to work out what the magic combo is...
2019-04-30 18:18
Krill

Registered: Apr 2002
Posts: 2980
Limiting the offsets worsens the pack ratio, i'd try to avoid that.

You can add code to check if the sequence copy read range overlaps $ff00..$ff04 and then select the appropriate routine. Obviously the selection code should be highly optimised.

But if your trick to read RAM in that range only works in VICE and there is no way to achieve that on the real thing, this is all moot, of course.
2019-04-30 19:02
Oswald

Registered: Apr 2002
Posts: 5094
just use different code for the whole ffxx page then just one cmp for src hi byte.
2019-05-01 09:16
oziphantom

Registered: Oct 2014
Posts: 490
well fe and ff as y = ff and pointer is fe01 then lda (pointer),y still hits ff00. And you need to preserve C,V I think, and I can't use the stack... have to double check
2019-05-01 10:14
tlr

Registered: Sep 2003
Posts: 1790
I think the original idea of modifying the compressor not to reference certain areas would be quite doable. I've considered that for subsizer but haven't really seen an actual use case for it.

If it is only reading you are concerned about, a modification to your favourite compressor's match algorithm should do it. e.g you could have an extra bit (or byte) per data byte that says if this may be included in a match or not. This will result in the whole match database not containing any possible references to that data, always generating output without it in the later steps.

If writing is a problem, you would need to add some way of doing skips in the output.
2019-05-01 10:47
Krill

Registered: Apr 2002
Posts: 2980
Quoting oziphantom
well fe and ff as y = ff and pointer is fe01 then lda (pointer),y still hits ff00. And you need to preserve C,V I think, and I can't use the stack... have to double check
I think it's most sensible to check the read range in flat memory space to decide on plain copy or $ff0X copy, then apply all those banking/stack relocation shenanigans to actually copy bytes around. :)

The decision should be made per sequence copy, not per source byte.
2019-05-01 15:39
ChristopherJam

Registered: Aug 2004
Posts: 1409
Quoting Krill
The decision should be made per sequence copy, not per source byte.


Sure, but it's still going to be slower than just blacklisting those particular source bytes. That's an extra check for every token - particularly harsh given that exo also uses copies for recently used single bytes.
2019-05-02 12:15
Krill

Registered: Apr 2002
Posts: 2980
Quoting ChristopherJam
Quoting Krill
The decision should be made per sequence copy, not per source byte.
Sure, but it's still going to be slower than just blacklisting those particular source bytes. That's an extra check for every token - particularly harsh given that exo also uses copies for recently used single bytes.
Yes, disallowing certain memory ranges on the compressor side is the preferred option, IF it is available. :)

Quoting ChristopherJam
That's an extra check for every token - particularly harsh given that exo also uses copies for recently used single bytes.
An extra check for every sequence-copy token. However, it should be highly optimisable. The check only needs to be performed once the problematic range has actually been written to, and as its high-byte is $ff, the back-reference check in flat memory space should allow for early exit. There may be more opportunities for optimisation.
2019-05-02 12:45
oziphantom

Registered: Oct 2014
Posts: 490
not write, read

so if when you are writing to $4000 and it wants to copy a 128 bytes sequence and that sequence starts at fE88, then the first 8 reads(as it reads from the top down) need to be the special read under FF0X code. So in order to know if it needs normal, or special, you need to do
(Start + X + Len).hi > ff where start and len are 16bits 'then do special' is probably the best case. It might be faster overall to just do Start.hi + Len.hi > fd and take the hit rather than take the hit of 16bits for the rest.

ChristopherJam is right Exomizer loves to do a sequence of 1 byte.

I have written Magnus Lind, and he sees that it might be useful for other systems as well, and if its not too much work he is happy to make "black list intervals" a feature of exomizer.
2019-05-02 13:54
Krill

Registered: Apr 2002
Posts: 2980
Quoting oziphantom
not write, read
A sequence cannot be read from before it has been written initially (and writing is not a problem, if i have understood you right). The write pointer is strictly ascending or descending depending on depack direction, and thus the range check is superfluous before the problematic range has been written to. This is why i wrote "The check only needs to be performed once the problematic range has actually been written to".
Previous - 1 | 2 | 3 - 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
HBH.ZTH/Abnormal
MWR/Visdom
4gentE/ΤRIΛD
Martinland
TheRyk/MYD!
Nordischsound/Hokuto..
Freeze/Blazon
B.A./QUANTUM
iAN CooG/HVSC
Mike
St0rmfr0nt/Quantum
Case/Padua
Airwolf/F4CG
Walt/Bonzai
Neotec/Padua
Guests online: 105
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 Layers  (9.6)
2 No Listen  (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 Triad  (9.3)
5 Censor Design  (9.3)
Top NTSC-Fixers
1 Pudwerx  (10)
2 Booze  (9.7)
3 Stormbringer  (9.7)
4 Fungus  (9.6)
5 Grim Reaper  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.044 sec.