TECH: Making a MAME driver
Im back home in PA to help with some family things and so I had high hopes of making really good progress on the Star Castle level for the two weeks Im back here. One thing I have spent about two days on so far is getting MAME 0.195 to compile properly so I can get some good mhavocpe (yeah, that will be the driver name) code written to support the expanded hardware (more on that in a future post). I actually have a MAME 0.185 driver written but it looks like the newer version has some structural tweaks and getting the source from GIT on my fathers 768K DSL line is like harsh acid.
I definitely found that the MAME building instructions are a bit out of date at this point. Plus, Im really a NOOB when it comes to C++ and especially compilers of this nature, so after a few downloads of MINGW and and update GIT pull, I finally got it compiled on x64 Windows 10 by doing the following...
- Install the x64 MSYS64 package following the instructions.
- Get the GIT files via GIT... I usually use SVN, but the SVN checkout of even just the trunk branch fails after quite awhile due to malformed XML data returns from the GIT SVN server).
- The MSYS package is a little different now because the win64.bat that used to be right in the root doesn't seem to be there anymore. I had to run C:\msys64\win32\config64.bat and in my version of Windows 10, I was not able to run this by double clicking it (I think because of the Creator Update which swaps in PowerShell as the default handler instead of Command). So, I had to open a command window and then run the config64.bat from the command window. Im assuming that if you do the configuration to put back Command in place of PowerShell, that double clicking the .bat file would be perfectly fine, but this threw me for a bit).
It is currently still compiling after about 3 hours, but I think Im pretty much in the clear now. We will see if it finishes before I post this article!
So, what about this driver anyway?
The new driver encompasses a few things that had to be changed in the hardware of the original production Major Havoc PCB. These changes revolve around needing more space to add the new functionality. After having a pretty great discussion with Scott Swazey, Luke Dyson and Mark Spaeth, we as a group decided that adding additional paged ROM would be the easiest way to get me the programming space I needed to write code in. The big reason I spoke with the gents above, is that they have separate projects to produce Major Havoc hardware and in each of their cases, they designed in support for the new software. So, if you are lucky enough to have gotten one of Lukes Reproduction PCB's or are interested in buying one of Scott's FPGA based PCB, then you are on the fast path to running this new game. However, with all of that, a factory Major Havoc PCB can be modified fairly easily to support this new software too.
Overall, here are the hardware changes...
- Expanded the Paged ROM by 32K (8 pages instead of the designed 4)
- Expanded the GAMMA ROM to 32K from 16K - for speech data primarily
- Added a TMS5220 speech IC - which was laid out almost correctly but not stuffed on the original production PCB.
- Optionally could use the old non-stuffed BETA processor, but this is not currently planned to be used.
We are getting close to having TEST ROM's on the TESTING TEAM and getting all the instructions for modding the PCB is coming soon.
As far as connecting this back to the MAME driver. It was pretty trivial to change. The speech support was easy because way back in like 2008 I updated the original MAME mhavoc driver to support speech since technically the Major Havoc - Return to VAXXX hack that I released in the late 90's that used the speech IC.
Trivia: The only speech on Return to VAXXX is in the maze when the timer is running out, you can hear a 3-2-1 countdown right before the space station explodes. That speech was a recording of me, pitch shifted by using the old QBOX speech encoding software, it wasn't really ideal but it did work. That is the only speech in that game. There will be much more in the new game.
Anyway, happy coding... until next time!
Comments
Post a Comment