Search found 27 matches

by cadahl
Sat Jun 02, 2012 7:17 am
Forum: Newbie Help Center
Topic: The BRK bug
Replies: 7
Views: 3063

The BRK bug

From what I've read, the 6502 will ignore a BRK if a hardware interrupt (NMI) happens at the exact same time.

On the NES, where NMIs don't come back to back (do they?), could this be worked around by using a double BRK somehow?
by cadahl
Tue Mar 30, 2010 2:19 am
Forum: NESdev
Topic: Ack - another tile data compressor
Replies: 45
Views: 12082

Good points. I added an option "-c" to allow the color reordering. Here are the stats per file (more interesting really): http://www.pastey.net/134730 Common A clearly dominates some files, and like you say RCR is the main mode but the RD variants contend in many cases. The Raw usage is sa...
by cadahl
Mon Mar 29, 2010 3:57 pm
Forum: NESdev
Topic: Ack - another tile data compressor
Replies: 45
Views: 12082

Hey, a question for you guys (being NES developers). Is it "trivial" to rearrange the palette for the whole background (and/or all the sprites)? I know color 0 is special, so leave it at 0, but is it ok to allow any permutation of colors 1, 2 and 3? (E.g. the decompressor says "0,3,2,...
by cadahl
Sun Mar 28, 2010 8:51 pm
Forum: NESdev
Topic: How to wait for vblank
Replies: 39
Views: 10113

Hm. Why not improve the parts of the wiki you disagree with? Better to have an edit fight there if necessary (via Discussion).
by cadahl
Thu Mar 25, 2010 3:51 pm
Forum: Homebrew Projects
Topic: Working on Chu Chu Rocket NES
Replies: 71
Views: 43275

Dwedit wrote:This title screen takes up about 10.5K of CHR data, plus the 1k map, and 256 byte sprite list.
Looks very nice! Any way I could borrow that CHR data for testing my compressor?
by cadahl
Thu Mar 25, 2010 1:44 am
Forum: NES Hardware and Flash Equipment
Topic: Subor - worth rescuing?
Replies: 3
Views: 2502

hyarion wrote:be careful though, some of the famiclones uses 3.3V and not 5v as the real nes and famicom and subor is one of the companies that used such components (VT-02 is one), btw do you have any pictures of the PCBs?
Sounds risky. I'll get some pictures. :)
by cadahl
Thu Mar 25, 2010 1:40 am
Forum: NESdev
Topic: Ack - another tile data compressor
Replies: 45
Views: 12082

Yup. I wish I didn't have to (ab)use the mode numbers like that, though. I'm going to compile some stats and see how often the various modes are being used. I think it can now be seen as a dictionary encoder (with Mode 6 & 7 as the main part) with different code shortening hacks. Modes 2/3 form ...
by cadahl
Wed Mar 24, 2010 4:42 pm
Forum: NES Hardware and Flash Equipment
Topic: Subor - worth rescuing?
Replies: 3
Views: 2502

Subor - worth rescuing?

I once bought a chinese "Subor" Famicom clone with keyboard and various carts. The console looks a bit like a black Megadrive/Genesis and the keyboard is white with alternate chinese characters everywhere in addition to the QWERTY. Problem is, I tried to plug it in once using a different A...
by cadahl
Wed Mar 24, 2010 4:23 pm
Forum: NESdev
Topic: Ack - another tile data compressor
Replies: 45
Views: 12082

I implemented the x-flip as you suggested and it helped a lot! Had to find a place to flag it, and I measured a 6-bit offset to be too short. But it turned out that old mode 5 ("same as two back") is rarely useful. It's often used in fonts etc with one bitplane empty or at least identical ...
by cadahl
Wed Mar 24, 2010 12:17 am
Forum: NESdev
Topic: Ack - another tile data compressor
Replies: 45
Views: 12082

Do you mind if I experiment with a similar compression scheme (using compression modes for each pattern, but experimenting with different modes a bit)? I want to use something more customized for my project, instead of using a generic solution. No problem at all, this area could use some research. ...
by cadahl
Tue Mar 23, 2010 5:00 pm
Forum: NESdev
Topic: Ack - another tile data compressor
Replies: 45
Views: 12082

Doh. Finally I get it. :roll: I kept thinking there would be an extra unwanted cycle before the load triggered again, and that the load was meant to happen AS the last bit was shifted out. Now it makes sense. I will add this tomorrow, the loops should get cleaner. Thanks! Some updated stats.. with m...
by cadahl
Tue Mar 23, 2010 1:31 pm
Forum: NESdev
Topic: Ack - another tile data compressor
Replies: 45
Views: 12082

Hm. I'm not sure I understand your mode scheme. What if bit 2 of the modes are all 0? Then the byte reading code is triggered. Seems like this would need an exception rule along the lines of "the last pattern always has bit 2 set" or something to work. Then you'd know when to load as heade...
by cadahl
Tue Mar 23, 2010 12:48 pm
Forum: NESdev
Topic: Ack - another tile data compressor
Replies: 45
Views: 12082

Thanks, going to try to understand the code you posted. This is what's done for mode 7 in the encoder: - For every pattern P - Try modes with zero pattern cost first. - Speculatively calculate RCR (Mode 1). - Speculatively calculate RD (Mode 7). - Pick RCR, RD or RAW based on which uses less bytes. ...
by cadahl
Tue Mar 23, 2010 3:34 am
Forum: NESdev
Topic: Ack - another tile data compressor
Replies: 45
Views: 12082

All good ideas! I spent a couple hours testing based on that and arrived at something good I think. I removed group repeats, lifted the restrictions on pattern 0 in a group, and added mode 7. This mode is "EOR", but the EOR residual is actually never stored because it doesn't help as such....
by cadahl
Mon Mar 22, 2010 12:25 am
Forum: NESdev
Topic: Ack - another tile data compressor
Replies: 45
Views: 12082

It makes sense to have empty areas in a game that uses CHR-ROM, but in order to use your compression the game must use CHR-RAM, in which case it would be better to compress just the tiles which are actually used. It would make no sense to compress empty tiles. Good point. Maybe a front-end with ski...