Mame32CE/PPC: Readme (install,changelog)
This is not production software....it is source code for those who are so inclined
to tweak with and IMPROVE upon (much opportunity there!)
Tested platforms.....HP jornada 430
Hopefully...it will build on PPC and HPC back to wince 2.00 and 2.01, although 2.11 is preferred.
The new PalmPC Wince is not supported yet.
MIPS build should be possible as well, though untested.
GETTING STARTED:
In general, you need to have the ability to setup the workstation Mame32 project. If you can build that, then
you should be able to build Mame32CE/PPC with some additional contortion.
This build system isn't simple, but it is trying to always have the capability to upgrade to
the latest Mame, so that we always know what are core Mame files, what is Mame32 reuse code, etc.
Let's GO!
1. Setup MAME sources:
-Create a Mame directory: "c:\users\mame32ce", we'll refer to it as "$MAME".
-Unpack Mame source into $MAME directory: "mame036s.zip"
-Unpack Mame32 source into $MAME directory: "mame32s-036.zip"
2. Unpack Mame32CE/PPC sources
-Unpack Mame32CE archive into $MAME directory,
(this creates "$MAME\src\wince", and several new DSP/DSW files under $MAME)
Several files will be replaced in "$MAME\src\crt\src".
3. Setup ZLIB:
- Create a Zlib directory: "$MAME\zlib"
-Unpack Zlib source into "$MAME\Zlib" directory: "zlib113.zip"
The Mame32mini project uses "zlibvc.dsp".
Zlib does not work on the handheld (yet) but works ok on the desktop.
"Zlibvc.dsp" is part of the "mame32mini.dsw" workspace.
Zlibvc will produce "zlib.lib" export-library under "$MAME/zlib".
"Zlib.dll" will be produced as "$MAME/debugm/zlib.dll".
The Mame32mini debug-executable will also build in "$MAME/debugm".
For the handheld, Zlib is built as a static lib from the Mame32ce workspace
using "zlib.dsp"
4. Set up Midas:
This is OPTIONAL for use on your workstation, Midas Lib is not used on the handheld.
-create "$MAME\midas" directory.
-IF you know how to build Midas, unpack the source into "$MAME\midas": "midas112-src.zip"
-OR, unpack the compiled Midas into "$MAME\midas": "midas112.zip"
I have created a "midaslib.dsp", if you unpack MIDAS source into "$MAME\midas"
then you should be able to put "midaslib.dsp" into "$MAME\midas\src\midas"
and build "midaslib.lib" into "$MAME\midas"
Currently, I am taking over the hook for MidasSound and plugging in CESOund instead.
If you want to use MIDAS on the mini build, then build "midaslib.lib", or obtain "midas.lib".
Then, in "Osdepend.c" plug in &MidasSound instead of &CESound.
-Be sure to change linker settings "./midas/midaslib.lib" appropriately for use of midas lib
-Be sure to set "exclude from build" appropriately for use of "win32/midas.c"
5. Extract "m32v36dsw.zip" (project files for Mame32V36) into $MAME if you want to build (standard) Mame32 here also.
-Make sure midas.lib is linking from "$MAME\midas\lib\win32\vcretail\midas.lib".
-Make sure zlib.lib is linking from "$MAME\zlib".
6. Build Something!
- You can load up "Mame32mini.dsw" to build a "stripped out" Mame32 for your workstation
using these Mame32CE/PPC sources.
- you can build the stock Mame32 project using "Mame32.dsw".
- (most importantly) you can build Mame32CE/PPC.
7. Setup the "./roms" directory and "./samples" directory in the same directory with the Mame32CE executable.
On the workstation, put the ROM and SAMPLE directory in the same directory as the project files
in order to run the program in debug mode (F5), i.e. "$MAME/rom" and "$MAME/samples".
For the handheld, there's just one executable...CRT and Zlib are statically linked.
Install your (legitimately obtained) ROMS according to what game you want to run.
See "src/driver.c" under the "TINY_COMPILE" section to see what games are linked in.
-Changes----------------------------------------------------------------------------------
CE10 - Compiled the project with new Embedded VC++ toolkit.
Reworked the CRT sources, they are now included with the distribution since there is
no CRT source code included with the toolkit.
NOTE: it is not the full CRT lib, it is only the pieces uses by Mame.
When the Embedded Toolkit loads up Studio projects (dsp,dsw) it converts them to
.vsp and .vsw project files. The process seems to automatically
DEFINE a "_UNICODE", which fouls up the CRT project build. It's a mystery.
Just remove _UNICODE from the CRT project settings and things are fine.
CE9 - Turned on all drivers relating to dkong, pacman, 8080bw, galaxian, scramble.
Verified that Zip support is working.
CE8 - Fixed some problems with CRT that had caused me to make some changes to "src/state.c"
and "src/cpuintrf.c". Changed the directory structure of the CRT source tree to match
that of the "VC98/crt" source distribution in VC++6.0.
Change location of CRT from "src/wince/crt" to "src/crt" to help with distribution scheme.
In order to build the source, you must copy "VC98/crt" as instructed. The MameCE32
archive will then overwrite approximately 20 of the CRT source files when it is unpacked.
Made some changes so that builds could be done against Wince 2.0 and 2.1
Did the debug build against MIPS (MIPS release needs some tweaking yet)
CE7 - CESound is pretty much fixed up again...very nice, thanks to implementation of mixer.c
in Mame36 sources. Invaders sound isn't so good from 8 bit samples...maybe just needing
a bit more on the volume, but pooyan and pacman working good.
CE6 - Crude hack to hookup samples for Invaders by calling into CESound directly from mixer.c
CESoundInit is called directly from NullSound.c
After this, got the update_audio_stream() function to work with output from
mixer.c (for invaders) by hardwiring some things.
CE5 - Straightened out the CRT lib a bit. Compiling with /D _M_PPC made the difference of
making the compiler think that the architecture or whatever was properly defined,
it may not be, but I am using CRT.lib now for the first time ever..as the fopen()
and fread() stuff is being used from File.c
Had to create a new file (stat.c) which helps resolve symbols for several things
that I just can't get the CRT lib to configure properly.
CE4 - "mame36ce4" is the first installment of the V36 based stuff.
The new series is based on V36release of Mame core and Mame32.
Issues:
- pacman is the only working driver
- sound is broken (big interface change in Mame36)
- the .cfg file must exist in order to get past the new Mame license screen.
- the workstation config uses a different file.c then the CE config, to fix this,
a WIP is to tidy up the CRT crap (like so it actually works) and maybe hook in Zip support
- left calls to ErrorMsg() in File.c, but you have to reach for the desktop when these
MessageBoxes popup because they get buried.
Zip stuff was fixed up a bit: added Rewind.c and Fdopen.c to CRT so that we wouldn't have to
clobber any Zlib files now.
I have also added Stat.c, Mkdir.c, and Splitpat.c to CRT. These will be needed in File.c
Those additions would be on top of the V1 MameCE CRT package.
Hooked up dialog for load failure.
Mame Play window is now registered properly and has a close box.
******* old dev notes from V35 based stuff, pretty much archaic now *******
V19 - Scramble would work, but controls suck.
V18 - Rework GDIdisplay (again!), fixed Viewing rectangle problems on NO_GAMEX configuration
by adjusting parameters on the BitBlt. Also some work in Mame32.c
Add "rotate" option to GUI.
Turn on drivers for pacman and galaxian...galaxian broken if use sound.
V17 - Reworked Osdinit.c
Added check box to UI for Enable Sound...more options to come.
V16 - Pickable list box is working. Mame is actually MULTI now (pooyan and invaders)
Play invaders twice and you're asking for trouble...don't know why.
V15 - Worked on Wince/Win32/Win32ui to wire it up more like Mame32.
It really doesn't work out to have MamePlayGameWithOptions() called from the WndProc,
it must be called from the Message Pump.
V14 - Work on Wince/Win32/Win32ui to fix up simple stupid dialog UI. Exit from Play WIndow
returns to Main UI like Mame32 does. Seems to eliminate Mame hanging the system.
(Hung one time playing Space Invaders)
Known issues (only on WinCE):
In "NO_GAMEX" configuration, the white game description lettering at startup is not there.
Regardless of using GAMEX, the palette doesn't come in w/o the "GetModuleFileName thingie in WinMain.
Game Status:
Invaders: good
Pooyan: good
Pacmanm: Throws exception in Mini
Galaxian: Mini, Good. CE, throws exception
V13 - Plugged in the GDIdisplay file from V18B, then pulled it into a 35 compatible form.
It is under Wince/Win32. Used some #ifdefs to make it work in both desktop and
PPC configuration. I can't get the mini to use the palette stuff so there are #ifdefs there.
Built up the release configuration.
Invaders works, Pooyan works decent, Galaxian broke.
Mame does seem to take the whole machine with it when it goes though :)
V12 - Changed TinyDriver to Pooyan and played first ever Mame Game on Jornada.
See below for info on branched version.
After I had ran the line up to V18, I decided I was disatisfied with how I had changed
Mame32V35 data structures for Display and App into 35b13 type of structures.
The reason for having changed them was to introduce as closely as possible the Mamece.c
and GDIdisplay.c files from MameCE. Now that I know how to do the DSA stuff in GDIdisplay,
I am backtracking a bit. Plus, the benefit of the GUI from Mamece.c is nullified by it's
being broken.
Anyway, by coming back to 12 (and incidentally, now calling the old line through V18 the "branch")
I was also thinking of V12 because it had the last working desktop config using that
old Win32ui2.c
I brought the new .dsp and .dsw files from V18, as well as Wince/Win32/File.c
I had also began to develop a Mini project in V19. (I purged V19 because it was only experimental)
In V12, I hooked up the sound, got the Mini working, and I am back to using my Win32ui file.
The Mini uses Midas Sound. I also brought the Keyboard file I had fixed up in the other line.
In the next rev I will hook up the DSA again.
V11 - Got some keys working!
V10 - Pulled Win32ui2.c and put in Src/wince1/win32-mini.
This file goes in to the Win32-mini project, that way the project still works but I didn't feel
like trying to retrofit MameCE's gui which I am using to the win32-mini project...win32-mini is
not a priority, just a proof of concept.
Rework/cleanup GDIdisplay.c and put in Src/wince1/win32-new.
GDIdisplay, CEsound, Osdepend, and Keyboard source files have been copied in from MameCE.
They will compile and link in but throw exceptions. Priority now is to get some keyboard working.
V9 - Try to merge Mamece.c and Win32ui2.c
Move Win32ui2.c into Src/wince1/mamece.
Begin adding things from Mamece.c to Win32ui2.c.
File.c is reworked using techniques from Mamece (mainly to use "attr" instead of "stat").
File.c has been reworked, mostly clean now except for where fopen, fread, and fclose are
still replaced with Win32 FileIO functions CreateFile() etc. There are CRT problems!
The screen is now Centered! This happened after I began using MameCE "MamePlayGame".
Win32ui2 is now almost all from MameCE.c.
Known bug: when running in MSDEV Debugger, after running the game, when quitting from either
File|Exit or with the X button, an exception is thrown. Works find in standalone though!
V8 - Mostly cleanup
Fixed the _assert routine in win32ui2.c, so that it is '#ifndef WIN32'.
Apparently _assert was added in V6, and it's use of "_T" would have broken mini-mame32.
"_T" is a CE only thing for unicode.
It appears the Zlib.lib is not being linked in...when did that happen?
Nothing broken though, I guess it doesn't get used now that Png.c is out.
Reworked a couple of win32 files, including M32util, just for cleanup.
Got rid of this "g_hInstance" thing that I had created in win32ui.c
V7 - Finally cut loose from the C files in Wince-crap (Printf.c and Zlib.c)
Zlib.lib is now used, but had a couple of problems requiring me to take out Png.c,
which resulted in modifying Common.c.
Common.c is now under Wince/common-src, in compliance with my code reuse policy.
V6 - We now have Src/wince1/crt (CRT the MameCE stole from workstation CRT)
Crt headers in Wince-crap no longer used, we are pulling in headers from Wince1/Crt now.
Still using Zlib-syms, and the "printf.c" (resolved crt ref's) file from Wince-crap.
V5 - Unpacked fresh sources from everything to verify my code reuse policy.
Unpacked Mame35 and Mame32-v35.
Also unpacked Midas-112 and Zlib-113.
Have to keep my Midas.lib because I don't know how to build it yet, but I do use the midas headers properly now.
Src/wince is now Src/wince1.
Under src/wince1 we have Common-src, Win32, and Wince-crap, where,
Win32 is stuff from Mame32 I have modified.
Common-src is stuff from Mame35 that I have modified.
Cpuintrf.c and State.c go there because of some troubles that occured
back in V3 when I went to 2.11 SDK.
Wince-crap is my old Crt crap that will go away when I pull in Crt from MameCE.
V4 - Took out lib projects. Renamed Src/wince to Src/wince-crap.
Zlib-syms taken out of ./zlib and placed in Src/wince-crap.
Zlib now only contains Zconf.h, Zlib.h, and Zlib.lib.
Took out Seal directory.
V3 - Upgrade SDK to 2.11.
This had the effect of breaking some things, particularly,
had to take out ctype.h, stddef.h, and vfw.h from src/wince/
Also, first attempt to merge with Cooley's mamece.
Set up sub projects (static libs) to resemble MameCE, using my same old V2 stuff.
Lib projects worked, but was not what I wanted, so I left as is and went to V4.
(I had left my mini-mame32 projects, and Mame32ce projects in place in the DSW).
V2 - First working, see configuration txt for notes.
The workspace has both a "mini-mame32" (since I am not on NT I have no emulator)
as well as the Mame32ce project.
------------------------------------------------------------------------------------------
*Branched Development, not used (see V12 notes above)
V18 - Corrections to File.c (setup Fseek to use a win32 function, also fixed hardwiring to
"Roms" directory in Fread.
Copied 16 bit sample code to 8 bit sample code and got samples for invaders.
V17 - Put in 8080bw for space-invaders.
V16 - Took the Gdidisplay.c from Win32-new and put in as Wince/Mamece/Gdidisplay.c
Started compiling without the NO_GAMEX define.
Setup the release configuration...didn't run half bad!
V15 - Rebuilt the Mame32ce.dsp project file. Somehow, this broke the GUI, in
that the Listbox and two large buttons don't show up anymore. So I wired
WinMain straight into MamePlayGame for now and the game fired up.
It was crashing after running the graphics for several seconds...this behavior
seemed to have started after I had dropped my Uclock.c file so I put it back in.
V14 - Pulled in Mamece.c, and got rid of Mame32.c, Mame32util.c, and Win32ui2.c.
Required including Mamece.h instead of Mame32.h and Win32ui.h in many windows files.
Pulled in Osdepend.c. (TODO: figure out how to set options...I have Sound==TRUE hardcoded
Options.c right now.
Also dropped my Display.c, Dirty.c, and Uclock.c.
Things were running very smooth after picking up Mamece Display.c.
I noticed that we were no longer frameskipping, just running slower. Didn't crash at all for
three runs in a row.
Picked up Dirty.c, then Uclock.c, still running, but was crashing sometimes on startup of the game.
V13 - Using GameX.lib.
Move File.c, GDIdisplay.c, and Keyboard.c from Wince1/Win32-new into Wince1/Win32.
Started a new GDIdisplay.c in Wince1/Win32-new, which is basically modified copy of the
one from MameCE. DSA is possible now, and sound is hooked up as well!
Added in many new drivers to support Galaxian.
V12 - Changed TinyDriver to Pooyan and played first ever Mame Game on Jornada.
               (
geocities.com/glenn65535)