Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of LTjake (4001)

Wednesday October 15, 2008
09:08 PM

Retro to the max ... times 2!

[ #37672 ]

Recently, two CPAN releases have brought a certain amount of nostalgia to my mind's eye.

Andy Armstrong contacted me a number of months ago in relation to my 6502 CPU work.  Mostly he was disappointed in the lack of a test suite. I felt much the same way, and had really wanted a test suite for the next release. After numerous hours of searching, I stumbled upon the MoneyNES project.

That particular project has a set of scripts to test all (well, not quite all) of the ops and basic memory functions available to 6502 processors. I was able to write a simple parser to bind Acme::6502 to the test scripts and I instantaneously had a good number of tests for Andy's code.

To this end, for the latest release of Acme::6502 I was able to fix a few bugs including:

  • Fix PLP to clear B flag instead of setting it
  • Fix TSX to set N and Z flag based on the value of X
  • Emulate a page boundary bug in JMP instructions
  • Fix BRK to set B flag

Unfortunately, I was also able to find a few issues with the test suite. These were sometimes hard to spot but Andy is very knowledgeable and I was also able to find a really cool javascript-based 6502 emulator which confirmed our suspicions. I've sent patches to the suite upstream, and the author was very responsive -- though he says the project is dormant for now.

So, apparently Schwern owes me some Euros* ;)

The other bit of nostalgia deals with BBS-era art. I have a couple text mode art modules (1, 2) on CPAN already. In reality there are at least 5 variations on the standard "ansi art" format. I've compiled a fairly detailed set of modules to handle these formats and uploaded it to CPAN in the form of Image-TextMode.

I've uploaded some sample renderings so you can see the variety of formats and options available. Among those options we have:

  • "9th bit" -- the standard font is 8 bits wide, but typical displays used 9 bits (8th bit repeated).
  • "iCEColor" -- basically non-blink mode, last bit of the attribute byte now becomes part of the background color data
  • "ced" -- black-on-gray

The formats vary on 3 different aspects:

  1. Font -- Sometimes it just an 8x8 font instead of 8x16. Sometimes it's the "Amiga" font. Other times it's a completely custom font so artists can have free reign over the blocks
  2. Palette -- Allowing different colors allowed for a more truer representation for meat-space-based drawings (hello skin tones!), but I always found that the palette limitation forced artists to be truly creative. Anyway, the Tundra format actually allows for any number of colors on a 24bit spectrum.
  3. Dimensions -- why be stuck with 80 columns, when you could do 160? or 234? or some other random number?

The sad truth is that by the time most of these advances came along the "scene" was already on its way out, and judging but their usage, people really only believed there was "one true format"  -- the standard 8x16 font on a 16-color, 80 cols display.

This was one of my first experiments with Moose -- which ended up being quite enlightening. I still have some room to grow as far as using Moose to its full potential, but I'm definitely sold.

* Andy tells me he won an auction wherein Schwern was to add a test suite to Acme-6502 :)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.