Archive for March, 2012

Script inserter

Posted in translations with tags , , , , , , , , on March 26, 2012 by pcedev

Been working over the weekend, and today, on the script inserter for Spriggan Mark 2. I had lost my original inserter source, but I still have all my other source related to the project. Not too much of a big deal since the old inserter wasn’t fully finished. Just ironed out a handful of bugs today and the new inserter appears to be running great. The ADPCM pointer system inside the string was the source of most bugs. It’s a control code that contains a literal/absolute pointer (rather than relative) to an 8byte ADPCM string after the text block. I was able to cache the literal pointer location and back updated it without doing a two pass approach. Made things easier.

So I got level 1 draft inserted and tweaked with the formatting and timing a bit (timing in relation to the ADPCM stream accompanying the text speed). It’s looking great. SamIam subtitled a few cinemas too. Man, the story is really coming together (knowing the cinema details/dialogue makes the level dialogue more clear as well. The context, that is).

My long time friend has offered to take on the dubbing project for the game. I hope he knows what he has committed to ;>_>

Spriggan Mark 2

Posted in translations on March 22, 2012 by pcedev

Some old timers might remember this. This game was my very first translation project. Not because it was easy and lite on text, but because this is one of my favorite games. It’s a shmup with a story. And story elements along with dialogue in game. Much like Target Earth and Cybornater. Anyway, I had a few translators pick up the project over the years and then disappear. I didn’t mind so much in that I wanted to do this right. I definitely didn’t want to mash up different translation works on it by different people.

Anyway, fast forward to this week. SamIam picked up the task of translating not just the 9 stages of scripts, but also the cinemas. I just got the draft in for the game and it looks great. I’m pretty damn happy at the moment. This is also one of the games that I did a VWF print routine for, so it’s getting the class A treatment. But it the buck doesn’t stop there, I’m gonna translate the cinemas (mostly because I doubt I can get a dubbing going for this – or rather.. completed). Even if that means I have to completely hack and write my own cinema code from scratch for this game (and I will, I’m that crazy). I actually did some preliminary research on the cinemas and found out that even use all the available/free system ram for them. That’s lame. One of them was 90k when they could have used the whole 192k (I believe 64k is reserved for the top level logic). That means bigger viewable windows and/or more animation could have been done in some cinemas.

Dracula X Rondo of Blood

Posted in translations with tags , , , , on March 22, 2012 by pcedev

Some of you might not know, but I did some work on the Dracula X translation project for PCE. A large part of it was already done, I just came in and did the little things that were left: title screen (Fragmare did the art work for it), mini game title screen, new print routine for the opening subtitle system, text in signs, text routine for the ferry man, etc. All the major stuff like new ADPCM and dubbing and subtitle script were already done by a few others. There’s even a new translated manual for it too. You can follow the thread over at RHDN. So the last thing left is the end credits afaik. I’ve been busy with Megaman that I didn’t have a chance to work on this yet. But now that I got a good chunk of the MM hacking that I wanted up and working, I can start this end credit project.

Megaman boss work

Posted in Megaman on March 22, 2012 by pcedev

Damn, finally got Cutman’s frames all converted over to 32×32. The backend hook is complete too. It’s a new hook than the one I did for Megaman’s character in that I didn’t break the metatile function. This was nice in that it allowed me to manually align up the new 32×32 frames over the existing metatile frames in real time (I paused the game to sort through the frame… even accidentally turning Megaman’s frame temporarily into Cutman pose – lol). I could have kept (but would still need to alter it for fixes) cutman’s frames as 8×8 metatiles, but I had this crazy idea to expand the 24×24 metaframe size to 32×32 (that doesn’t include the cutter area on his head). You know, to give a pixel artist more room to breath. But man, what a pain. I’m not sure if I’ll do that with the rest of the bosses or not.

MM: sprite work extended

Posted in Megaman with tags , , , , , on March 18, 2012 by pcedev

Pwwwhooo.. You run into problems when you give NES extended sprite sizes ;>_>

NES doesn’t have negative left coords for hiding or moving sprites to the left off screen. They do for the right side though, but it’s only 8 pixels wide. The X position is 8bit: 0 to $ff. $F8-$FF don’t get shown onscreen and so they don’t wrap around. And since the largest width for a sprite on the NES *is* 8 pixels, it works. The problem occurs on the original NES is when you want that effect left side. Megaman handles this by hiding the sprites in 8pixel wide columns of the whole meta-sprite. So you get this sort of jarring/popping on the edge. Not a huge deal on the real system, especially back in the day when the edge of the 256 pixel wide screen was almost always partially in overscan area (TVs were rather poorly calibrated back then and the tolerance allowed for overscan was rather sloppy for consumer grade equipment).

So in comes my problem. I replaced all MM main character meta sprite with a single entry: 32×32. The game logic tries to remove the right edge on MM when he’s right at the edge of the left side, thus he disappears. Big problem? Not really. I can fix that logic. But that got me thinking. If I don’t find a solution to this problem, it could definitely be a problem for any other NES game one might want to upgrade as such. There aren’t enough bits left in the sprite attribute byte to fix this either (the problem is not to break compatibility).

So after mulling this over for a few days, I’ve come up with a solution. It’s pretty damn rare that games use “OAM data” ($2004). They all seem to use the sprite dma controller ($4014). The nice thing about the sprite dma is that it copies all 64 OAM entries to PPU OAM ram while halting the cpu. The dma controller takes an address based on $x00 from ram. And the NES only has 2k of ram ($000-$7ff). This is perfect for the solution. I have a shadow 64 entry in higher/invalid ram area of the NES range. This provides four additional bytes to the original four bytes for an OAM entry. For X and Y, the shadow equivalent bytes are a signed offset (2’s compliment). Perfect for offsetting the sprite with it ‘wrapping’ onscreen. And here comes the tricky part. For compatibility, the sprite dma function backend code clears each byte after it reads it. So the game engine itself doesn’t need to clear the shadow list. And if it isn’t used, values of $00 do nothing to effect the original. This also allows to me to use all 16 subpalettes for sprites and also allows me to use other sprite ‘banks’ in PCE vram.

MM: main sprite work

Posted in Megaman with tags , , , , , on March 12, 2012 by pcedev

I redid the meta-tile hacking for all of Megaman’s sprite frames. I gave a special character (used an invalid value for the game) to the original meta-tile definitions and a hook to look for this. Now the game gets all the X/Y offsets from my 3 tables instead of trying to modify the games (in which enemy characters share). It greatly helped in fine tuning all the offsets of the frames too (saved me a lot of time). So, I think I can call the main character sprite work finished. Time to work on the bosses next, as they use some of the original main character sprite cells (cutman uses MM’s legs for the running frame).

MM: bg tile bank work

Posted in Megaman with tags , , , on March 9, 2012 by pcedev

I came up with a method to extend the number of BG tiles from 256 to 768. By using invalid/unused address range of the PPU (for the tilemap sections. So $279c would be normal bank 0, $479c bank1, $879c bank 2). I just finished modifying the backend code for this. Attributes are extended the same way. This should allow for more unique detail in the BG maps.

As for the game itself, I’m writing a hook that reads a shadow map of the current ‘room’ of the stage and provides the alteration to the ppu address of ‘TSAPPUtransfer0NTaddress’ per 32×32 meta tile (a room is 8×8 meta tiles or 256×256 pixels).

So 768 8×8 back ground tiles and 12 background sub-palettes. The additional sub-palettes are not tied to the bank of tiles used either; they’re independent of each other. But the sub-palettes are ‘banked’ or grouped, so a 32×32 meta-tile can use 0-3, or 4-7, or 8-11 sub-palette slot but not mix and match within the metatile. This isn’t a limitation of the backend upgraded emulation code, but rather a compromise to keep minimal breaking and compatibility with original game engine. The color depth is irrelevant to all of this. It can be 2bit or 4bit regardless.