MooglyGuy's Shoddily-Put-Together N64 WIP Page - May 2007 Entries
05/28/2007 - Pokemon
To update on the update below, I'm making some headway in getting
the RDP Probe to run on real hardware. As a test, I've duplicated the
command sequence sent by Super Mario 64 when it makes the entire
framebuffer white for the span of a frame just after powerup. In MESS
it works like a champ, holding on a steady white frame. When run on a
Nintendo 64, it actually displays something this time; the only problem
is that it does so with epilepsy-inducing flashing, only displaying
white every other frame. Go figure.
More annoyingly, I removed the actual Fill_Rectangle command from the
command sequence and tried feeding it in in RDP Probe mode rather than
hard-coding it, and the screen flashes black instead. Even if I issue a
Set_Fill_Color command immediately before the Fill_Rectangle command,
the damned thing keeps flashing black. On an arguably more annoying
note, the X coordinate seems offset by about 128 pixels to the right.
Which is to say drawing a rectangle at 192.0, 0.0 - 256.0, 240.0 ends up
appearing on the very left side of the screen instead. Honestly,
Nintendo, what the hell.
I'm going to bed. It's not like this stuff is going to run away while
I'm asleep.
05/27/2007 - Reality Dismay Processor
The first pass of the RDP Probe is in. You manually enter 64-bit words,
specify how many words comprise the packet, and press Z to turn RDP
activity on and off.

Entering a packet - Fill_Rect: 8.0, 136.0 - 312.0, 232.0

The packet itself.
Unfortunately, this doesn't seem to work on a real N64 just yet. I'm
probably not setting something up quite right such that MESS is happy
but a real N64 isn't. It's not that the N64 crashes or anything, it
just doesn't display what the RDP should. I'll have to look into
that.
05/22/2007 - Alzheimers
With the majority of the parts in place for the probe, it took me only a
couple hours to put together the memory editor portion of HIPTHRUST.
Check it out.
The main title screen:

The memory editor itself - hmm, this data looks familiar.

Hey, this looks like 1bpp 8x8-pixel font data!

Aww, now they're little smiley faces. HOW ADORABLE!

Enough of that, let's check out the RDP Probe.

Whoops. Looks like I need to get back to work.
If for whatever reason you want to give this a whirl in your own
emulator, grab it right here, and don't
hesitate to drop me a line to tell me what you think!
Apparently, it also works on a real N64.

It's a Cinderella moment - the shoe fits! Now I shall marry the
Prince.

This is the previous font-modification screenshot, but with 0 replaced
with a brick pattern instead. Hooray!
05/22/2007 - Pieces of Flair
The last essential part, a button, has been created.
Two simple buttons:

One lets you select a state for the second button:

The other brings up a simple OK dialog:

05/21/2007 - Current Events
The List part now supports the appropriate events as well as scrolling.
Additionally, I have reworked the window priority system such that the
windows are drawn in the appropriate order and inputs are passed to the
appropriate screens. The general ruleset is that windows with the top
priority are given inputs (this means multiple windows can potentially
get input), and windows are drawn from the bottom layer to the top. In
the screenshot below, we have 3 windows: Layer 0 Priority 0, L1P0, and
L2P0. If I were to add a screen at L3P1, that screen would subsequently
get exclusive input.

Incidentally, if you want to give the most recent UI test rig a try just
for kicks, grab it here and have fun. As
much fun as you can have scrolling in a vertical list. Yeah.
05/21/2007 - Making A List, Checking It Twice
The List part is up and running in a basic state, though it lacks a few
things such as OnChanged (focused item has changed) and OnPressed (A
button pressed) events and scrolling at the moment.

At this point I'd say we're only about one or two parts plus a few
engineering tweaks away from being able to actually work on the probe
itself. Which is nice.
05/20/2007 - Grab Bag
A mish-mash of info on what I've been doing to keep myself occupied in
the past few days, outside of working 12-hour days. Small wonder I only
work in short bursts on this stuff.
As you can see, I've got a lot on my plate to share across the free time
left over while working 12 hours a day, 6 days a week. Bear with me as
I get my, erm, bearings.
05/14/2007 - Multiplicity
Now multiple windows can coexist. I've also created a TextQueue part,
which maintains a queue with as many lines as the part's height, with
each line being as wide as the part. When a line is inserted when the
queue is full, it scrolls up and inserts the line at the bottom.
Observe:

If you happen to have a cart copier for the N64, feel free to download
the test program here and try it out
yourself. You're welcome to try it on MESS or any other emulator, but
it likely won't work - in the former case because my local modifications
haven't been submitted to the mainline yet, and in the latter case
because most emulators still use godawful black-boxing of the RSP's
functionality. Enjoy.
05/13/2007 - Gutenberg
The TextField UI element is now done, supporting three wrap modes: no
wrap (will always render to one line, regardless of the part's height),
character wrap (will wrap to the next line upon hitting the part's
width), and word wrap (will wrap to the next line if the next space
would be past the part's width).
05/12/2007 - On British Pastimes
I'm in the process of adding a bunch more functionality to the input
system, and in the process came to the conclusion that I probably want
to limit the maximum number of enqueued input events. I figure 8kbytes
is a decent enough limit, as each event is currently 16 bytes in size,
which gives us a limit of 512. It occurred to me as I was typing up the
relevant #define that we shouldn't ever hit even that ballpark figure.
It would take a lot of doing to enqueue 512 separate button
presses and analog stick updates faster than they could be processed.
Not wanting to abandon the notion of a limit altogether, I added this
glorious comment:
// If we EVER hit this many events
queued, the program has probably crashed anyway
#define EVENT_QUEUE_LIMIT 512
A bit cynical? Sure, but it's amusing to look at. And that's what's
important.
05/12/2007 - Push Button, Receive Bacon
After a partial text-system rewrite to support color text and the
creation of a more user-friendly input-handling system, we get this:

I should probably make a copy of this to send to Ville, too, since
it provides a decent method for seeing precisely how the analog stick
handling is broken in MESS.
At any rate, I'm bordering on engineering overkill for HIPTHRUST. I
want to provide a decent user-interface experience, even if it is
in ASCII, so my primary temptation is to create a decent UI
framework so as to make the program extensible. We'll see, I
suppose.
05/11/2007 - Toxie
Much like a loser slathered in toxic waste, the RSP probe begins its
rebirth into HIPTHRUST:

It doesn't seem like much, but it means that my text-draw and box-draw
functions are working properly - and that's the foundation of any sort
of user interface, isn't it?
Rather than putting everything in main() and haphazardly calling
sprintf and VI_DrawText, I've designed a text module that maintains what
amounts to a tilemap for the entire screen. Rather than having to
maintain a separate character buffer to store lines to display, the text
module takes care of that by implementing pprintf - positioned printf -
such that you can write arbitrary arglists to the screen.
Hooray!
It looks like I have the entire weekend off for a change, so I expect to
either be hammering away at the first feature - memory editing - or
working on making the remaining ARM opcodes pass the ARM Wrestler suite
so that the preliminary GBA driver in MESS can work better.
The Mog out.
05/08/2007 - Public Lewdness
I've always wanted to give a program of mine a decently amusing name.
Hence, I have decided to name my up-and-coming N64 test rig HIPTHRUST:
Highly-Integrated Probe Tool
Haphazardly wRitten for Ultra Sixty-four
Tests. This has the benefit for opening the door for
such potential future tools as GRaphics
Interrogator for NintenDo 64 (GRIND),
General Audio & Sound Probe
(GASP), and Relative OPcode Evaluator
(ROPE).
For posterity, the other self-made entries that were rejected were:
TETANUS: TEst Tool and Agent for Nintendo
Ultra Sixty-four
THRUSH: Test Harness wRitten for Ultra
Sixty-four Hardware
Speaking of the tool, I spent most of my time after work (the entire
hour of it) modularizing the original RSP Probe code and making it
generally more readable. Going progressively forward to
results!
05/08/2007 - The Right To Bear ARMs
Thanks to the helpful functionality of a little homebrew GBA program
called ARM Wrestler, over the past couple nights I've managed to make
all of the THUMB instructions pass the tests ARM Wrestler performs in
THUMB mode. There are still plenty of ARM-side issues that will have to
work out, but for now I'm reasonably happy. Unfortunately, there are a
number of opcodes that ARM Wrestler does not actually test, so those
will have to be ironed out as time goes on. Anyway, it's not
N64-related, but don't crucify me - it takes a lot less time to hammer
out an opcode or two in a night than it does to write a specific test
harness for a given RSP instruction, compile it, burn it to a disc, and
let it run for 8 hours!
Sub-Entry for 05/08/2007: Get Real
A good friend of mine directed me to this little
gem of a message-board thread. It would appear that someone has ported
MESS's implementation of the RDP into a separate N64 emulator plugin.
Impressively enough, it runs pretty much everything amazingly well,
which in turn implies that the vast majority of remaining video issues
in MESS's N64 driver are related to the RSP. As if I needed more
pressure on me. Not that I have anything to worry about, either from
the kiddiez or from Nintendo - it isn't 1998 anymore. Unfortunately,
there are a handful of nay-sayers in the thread, including another N64
video plugin author, Rice, who claims that LLE is pointless, and that
HLE does everyting perfectly already. Oh well.
05/04/2007 - Does Whatever A Spider Can
Tonight I went to see Spiderman 3 with a number of coworkers, and it
ended up being quite amazing. It was a lot more touching than either
of the previous movies, so that's a plus. It has a number of amusing
scenes, which is another plus. About the only downside is that it
cements the notion of wanting to bear Tobey Maguire's children, because
he is just that damn awesome.
In the realm of more "vintage" cinematic outings, I wholeheartedly
recommend Blood Sucking
Freaks. While neither a high-budget film nor a particularly
accurate film in terms of terminology, lifestyles, or physiology, it
has all the hallmarks of classic trashy Troma flicks that we've all
come to know and love. Really, you don't see this movie because it's
any good, you see it for the sake of appeasing a cinematic masochism
streak.
Wait, what? What was I talking about?
Oh, right. Nintendo 64-related things.
Well, things are currently at a standstill in terms of active
development, but I expect that they'll pick up again in about a month
or two. When I'm not working 12-hour days. Priorities, you see. In
the meantime, I've been occupying myself with various fantasies of what
I plan to code when I get the chance, and I have a few good ideas.
Namely, I've been thinking of writing a complete test tool for the
Nintendo 64 hardware. As it is currently planned, the test tool will
have the following features:
- Memory Probe
- View memory (U8 / U16 / U32 / S8 / S16 / S32 / Float)
- Write memory (U8 only)
- Memory Playback - build a list of addresses and values that
will be written to in one go. Useful for triggering a DMA transfer or
other event that requires multiple register accesses acros a short
period of time.
- RSP Probe
- Harness for hooking up a C-based RSP core for parallel testing
- Pull register contents into main memory for viewing
- Direct read/write access into IMEM and DMEM via the Memory Probe
- Manual single-step and Program Counter control
- RDP Probe
- RDP packet constructor
- Choose packet type from a verbal list
- Set named parameters rather than arbitrary 32-bit words
- RDP packet playback; playback a sequence of packets transcribed by
MAME, or your own emulator if you conform to the same specification
If you have any suggestions for other features that would be useful to
you in divining the behavior of the Nintendo 64's hardware, let me know at
moc.liamg@yugylgoom (reversed, obviously).
Current News
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007