- Group:
- Tech Member: Tech Members
- Active Posts:
- 347 (0.17 per day)
- Most Active In:
- Engineering & Reverse Engineering (200 posts)
- Joined:
- 10-February 10
- Profile Views:
- 4987
- Last Active:
Private- Currently:
- Offline
My Information
- Member Title:
- It's all a conspiracy!
- Age:
- Age Unknown
- Birthday:
- December 30
- Gender:
-
Male
- Location:
- Austin, TX
Contact Information
- E-mail:
- Private
- AIM:
-
tristanseifert
- Website:
-
http://https://tseifert.me
- Skype:
-
tristanseifert
Previous Fields
- Project:
- Secret things!
- National Flag:
- us
- Wiki edits:
- 50
Topics I've Started
-
Interactive VDP Documentation
20 August 2012 - 12:07 AM

(Click on a screenshot to see it from real hardware)
I've been working on looking more into the VDP and how it works it's magic for the past year or so, first writing this documentation, so I thought it might be a good idea to write some examples on how the various effects work, and thus this thing came about. It basically describes how many of the basic features of the VDP can be used to create effects, as well as some tricks used in games, followed by an example of them. I tried my best to explain it, but some explanations may be off. The ROM shows examples of patterns and palettes, nametables, sprites, vertical/horizontal scrolling, shadow and highlight, as well as pattern reloading. (If your emulator or flashcart supports SRAM, the ROM will save the last page you read, allowing you to continue from it later.)
I plan to expand this with other stuff later - so if anyone knows anything that I've missed, please tell me and I'll hope I'll be able to implement it in the next version.
That's really all I have to say - if you can't download the ROM, here's a video:
Download version 1.0:
Download
Last, but not least, I'd like to thank the following people for helping in this in some form:
* Jorge, Tiido, MarkeyJester - answering questions about the VDP and/or MegaDrive over the years
* Oerg for testing and feedback, as well as being the original person I wrote the VScroll deform effect with
* Sonic Boom for the horizontal scroll art
I look forward to hearing your lot's feedback about this. -
Disable Register
27 July 2012 - 12:33 AM
The Mega Drive has a 16-bit register at memory location $C0001C (Appears to also be mirrored at $C0001E) which controls and disables various features of the VDP (Video Display Processor) and was probably used as a debugging aide during the design of the VDP. During a recent IRC conversation, this subject came up and I decided to research a little more into it. I wrote this programme that lets you set individual bits of the register and view what they do to the VDP. This is what that programme looks like with none of the bits activated (at which point it plays a square wave over the PSG channel 1 — this is so the effect of bit 9 can be heard. Note that the corruption on the first line of text is caused by the VDP after setting a specific bit):

With this tool running on hardware (You can run it on an emulator, but none of the bits will have any effect) I was able to decode what the different bits meant and did on my Model 1 VA5 NTSC Mega Drive with a Sega CD attached (No difference was observed with it removed):
Bit 14 set = Sprites hidden (perhaps part of a 'debug mode' register)
Bit 13 set = Sprites hidden (perhaps part of a 'debug mode' register)
Bit 12 set = Sprites hidden (perhaps part of a 'debug mode' register)
Bit 9 set = PSG disabled
Bit 8 set = BG layer hidden, dots at top of screen, line at right and sprites hidden (besides artefact of one all the way to the right.)
Bit 7 set = FG starts using an odd tile for everything, BG uses odd palette - possibly reading corrupt data. There's small black lines on the side of the rainbow bars (BG has been disabled for clarity)
Bit 6 set = Display is disabled
Bit 5 set = Some sort of grid pattern, all planes seemingly hidden (Causes some brokenness in A plane at $C000)
Bits 7 and 8 set = Garbles FG and sprites.
Bits 15, 14 and 8 set = BG hidden as well as sprites disappear.
Bit 10 or 11 toggled = Causes a click in the audio (Thanks to Chilly Willy for pointing this out — I didn't listen carefully when I ran this test)
Here is a video of the programme in action on hardware, with various bits being set. (The audio is slightly out of sync)
I'm interested in seeing if other models of the MD (and other VDP chips) deal with these modes differently — so if you've got a flashcart, please try setting the bits on your hardware and report back what happened, as well as your hardware version and VA revision. You can download the ROM here.
Lastly, I'd like to thank Jorge and Tiido for giving me the idea to toy around with this by suggesting I figure out if the VDP has more access cycles in one line if a specific plane was disabled. And I also apologise for the shitty quality of the video — my composite cable disappeared and my capture card likes being an asshat. -
TMSS Disassembly
04 July 2012 - 10:06 PM
So things have been relatively slow for me recently, so I decided to take a day off of hacking the shit out of Sonic 1 and sharpen my disassembly skills. I started by disassembling something simple - the TMSS. It's the thing in later Model 1's and all Model 2 and 3's that pops up this screen:

I've tried to label everything accurately and correctly, as well as commenting things that might've needed commenting. I think I've got them all, but if not, do tell me and I'll be glad to update the disassembly. I didn't split out the font since I didn't see much value in splitting out one little chunk of data - it's at the end of the ROM anyways, but feel free to split it if you'd like.
The way the TMSS works is that it'll check for either " SEGA" or "SEGA" at $100 in the cartridge header. The cartridge is put on the bus by setting bit 0 of $A14101, whereas clearing it puts the TMSS back on the bus. The initialisation code seems EXTREMELY similar to Sonic 1's and even (for some odd reason, I suspect it to be leftovers) checks the hardware revision and writes "SEGA" to the security register multiple times, when only needed once to activate the VDP. The TMSS loads the actual code to display the screen and swap the ROM back on the bus to RAM, but gets it's data from ROM, presumably to not clobber more RAM than needed, and probably to reduce time it takes for the screen to come up.
An interesting thing I've noticed is that the font used also includes four light blue, stylised "SEGA" characters that are never used, possibly due to time constraints or simply because programmers forgot to write code to handle them:

That's really it about the TMSS. I have tested this in Kega as a replacement for the usual TMSS ROM (Has a datestamp from '96 and is 16 KB, even though the actual TMSS is only 4 KB) and it worked flawlessly, but due to obvious reasons I wasn't able to test this on hardware. (Sega wouldn't let me order a custom 315-5433 with this as the TMSS ROM mask :V) This is a disassembly of the US version of the TMSS, in case you're wondering about that.
Download
So yeah, go wild, do whatever. Do tell me what you think about the style or anything you feel should be changed. -
Sega CD Template
29 April 2012 - 03:24 PM
I've been bored out of my mind recently, so I just wrote a simple template that allows me to run arbitrary code on the Sega CD. I figured this might actually come in handy for some other people, so here it is.
There really isn't much else to say about this besides read the readme, as that basically explains how the entire thing works. Anyways, the code is available on Github. I also wrote a few tools that may come in use at some point (mainly a thingie to generate sinewaves, and a tool that takes a bitmap and turns it to Sega CD ASIC data (incomplete)) The tools are also available on Github.
Hopefully the documentation I included with these things tells you all you need to know, although I know my documentation writing skills aren't the best. So don't be afraid to ask here if you can't figure something out. After all, I'm hoping people will improve on this template and tools.
There really isn't much else to say about this schits... so a quick shout-out goes to Bgvanbur for SCDTools. And hope you enjoy this =P I look forward to seeing what amazing things everyone will come up with. -
Sonic 1 with Redbook Audio
04 December 2011 - 04:56 AM
So, the story goes a little like this: LOL CD AUDIO IN SONIC 1. And after lots of voodoo magic and other... things, and thus, Team Evanesco presents this magical concoction:
Sonic 1 utilizing the Sega CD in Mode 1, meaning it runs from a regular cartridge, but uses the Sega CD hardware. Note that this doesn't really work on any emulators except the latest version of Kega. On Kega, load the ROM first, make sure you have Sega CD BIOS files, then load the CD audio image of your choice and enjoy. You need to set the option called "CartBootEnabled" to 1 in Kega's ini file for it to work this way. Likewise, for doing this on the real hardware, simply burn the bin/cue file of your choice to a regular CD-R, shove the ROM on a flash cart and load the cart up.
Features of this hack include:
- It's Floppy Friendly™ allowing you to store more porn along with this. (Yep, just for you djohe!)
- Magical CD-DA audio.
- 100% Fat Free.
So yeah, there you have it. To make your own set of CD songs, follow this track layout:
Track 1 = Title Screen Track 2 = GHZ Track 3 = MZ Track 4 = SYZ Track 5 = LZ Track 6 = SLZ Track 7 = SBZ Track 8 = Boss Track 9 = FZ Track 10 = Act Clear Track 11 = Speed Up Track 12 = Invincibility Track 13 = Game Over Track 14 = Special Stage Track 15 = Ending Track 16 = Credits Track 17 = Drowning Track 18 = Continue
Downloads
- Main Game ROM
- Example Audio Disc
- And if you're really in the mood to troll someone (*cough*#retro*cough), use this Audio Disc.
Edit: We've done a few little bug fixes here and there, re-download if you want. Doesn't really add anything.
Edit2: Iron Sonic and I fixed a crapton of bugs in our code, as well as finally allowing it to run on real hardware. Thanks to Flygon for being our beta tester on European HW! Just re-download the ROM. - It's Floppy Friendly™ allowing you to store more porn along with this. (Yep, just for you djohe!)


Find My Content
Private
Male