========== MAMECE-10X ========== webpage: http://www.geocities.com/dgfinck guy who compiled it: dgfinck@yahoo.com Credit: ------- Most (99.99%) of the credit belongs to all the MAME guys, the MAME32 guys, and Ben Cooley. I just took the product of their efforts and monkeyed around with it some. First: -------- Users are expected to be familiar with the general use and operation of MAME for a desktop computer. If you are not, please do that first (www.mame.net). F.A.Q: ------ Q: What device(s) does it work on? A: I only test it on my E-100, however it should run exactly the same on an E-105 (hence the name "MAMECE-10X" where X can stand for either 0 or 5). I've heard it will also run on E-115s and EM-500s, although there are problems with the buttons on both and with the display on the EM-500. Look into MAMEBoy if you have one of these devices. It is based on the same source, but tweaked for those units. Q: When are you going to compile an E-115/E-125/EM-500/iPaq/etc version? A: Sometime shortly after I own an E-115/E-125/EM-500/iPaq/etc. Q: That sucks, WTF is up with that? A: The source code is available. Since so many people have these devices, I'm sure one of them must have the ability to compile it. Go find that person and bug him/her to compile it for your device. Or better yet, learn to compile it yourself; that's what I did. Q: Where can I find the roms? A: Try mame.dk Installation: ------------- Installation is manual. Place the executable (MAMECE.EXE) where ever you want and create a shortcut to it if you wish. Create a folder in 'Storage Card' called 'MAMECE' (Don't have a CF card? You should get one they're really cool. However, you can alternatively create the 'MAMECE' folder in 'Program Files'). Create a sub-folder within the 'MAMECE' folder called 'roms'. Place your ROM image ZIP files in the 'roms' folder. DO NOT unzip them. MAMECE.EXE will create 'hi' and 'cfg' folder in the root directory of the device. No action on your part is needed. To run the executable, you will either need to create a shortcut or use an explorer utility (or use the run dialog box). The details of how to do any of these is not within the scope of this document: please learn to operate your Casio first. Button Usage: ------------- ------------------------------------- | /\ | | \/ CASSIOPEIA | | --------------------------- | | | | | (Power Button) ---> ( | | | | | | | | | (The touchscreen is | | Exit (Esc) --> (| | | | | | mapped to LSHIFT, | | | | | | Insert coin (3) --> /| | which, by default, | | \| | | | | | is P1BUTTON4 in MAME. | | | | | | | | You may re-map it to | | Toggle UI (TAB) -> (| | | | | | any function you wish | | | | | | | | using the UI.) | | | | | | | | | | | | | | | --------------------------- | | C A S I O | Fire 2 + | ___ _ | 2PL Start | / \ (_) _ <--|--(ALT & 2) duh ---|->| | _ (_) <-|--Fire 3 (SPC) | | | (_) <---|--Fire 1 + | \___/ | 2PL Start |o | (CTRL & 1) ------------------------------------- Changes Made from the Last Official Version: -------------------------------------------- Taskbar hiding: the taskbar is automatically hidden when you begin a game, and un-hidden when you exit. Touchscreen: the touchscreen is now supported as a button. Game List: most clones and obscure games are removed from the gamelist for a number of reasons 1) they cluttered up my list making it hard for me to find games I want to play 2) they contributed to making the executable larger 3) some of the other speed-related changes I've made must be done on a driver-by-driver basis so I need to keep it to a managable number. Sound: sound-only CPUs are properly disabled when 'Sound' is not selected. Before, they were being emulated regardless and slowing down some games when played with sound 'off' (1943, DK, Frogger and many others) Underclocking: many games have their CPU (or CPUs) 'underclocked' to improve the performance of that game; this is done on a game-by-game basis do the degree that it seems to help up until the games ceases to function 'normally'; I am unable to fully test each game, so if you noticing any odd behavior, please let me know and I will raise the virtual-clockspeed back up a little to see if that fixes it. CPU Emulation: enabled 'inexact' mode in the Z-80 core (accepts less precise emulation as a trade-off for a little more speed) Colors: the colors are now correct. Profiler: the profiler has been tweaked to my liking; things appearing and disappearing annoyed me, so all lines are displayed all the time; the column showing percentage w/o idle has been removed, since MAMECE doesn't idle very often these numbers are almost always identical to the first column; the last two lines with something about 'context switches' and 'callbacks' were removed because those number never seem to change much and I don't know what they mean Framerate Display: it is fixed, best I know how; the first number is the current frameskip value (number of frames out of each 12 that are being skipped) the second number is the percentage of fullspeed the game is currently achieving, the first number in the ()s is the current number of frames per second being displayed, and the second number in the ()s is the number of frames per second the original hardware displayed (usually 60). Screen Centering: games now vertially center in the area *above* the taskbar (vs on the entire screen), this keeps a number of games from drawing on the taskbar (Galaga, Dig Dug, Ms Pacman); most games center horizontally on the screen also but there are a few (mostly horizontal monitor games) still giving me problems. Dirty: dirtiness is handled on a raster-line basis for games which support it (pretty much any game that doesn't have any scrolling, including all vector games); full-redraws are performed if the pallette is modified. Blit: loop was almost completely re-written. Now seems a bit faster. Video Hardware Emulation: on a game-by-game basis, made some tweaks suggested in Larry Bank's "Code Corner" i.e. changed '% 32' to '& 31', '/ 32' to '>> 5'; also removed flipscreen support and a occationally some other stuff that didn't look too useful. Added 'space-checking' in Phoenix & 1943. Game Drivers: on a game-by-game basis, made some tweaks suggested in Larry Bank's "Code Corner" i.e. removed 'watchdog reset' stuff, allowed 1st CPU in multi- CPU games to access shared memory directly (w/o a handler); also re-ordered some entrys to put more likely access ahead of less likey ones so that they may be located faster. Vector Games: the flicker and antialias options are set to 0 (off), IHMO this gives better looking (and faster) rendering Cheat Mode: for a while I had enabled cheat mode, but I found out having it enabled was costing a little bit of time, so I disabled it again; however I have modified some of the game drivers to inputs formerly only available with cheat mode on are now available even with it off (i.e. speedup in Ms Pacman and additional controls in Battle Zone). Files: the /hi and /cfg dirs can now be found in the root directory, also ROMs may be located in a number of places (thanks to Techmaster); I put my ROM zips in /Storage Card/MAMECE/roms and they are found by MAMECE without a problem Icons: I created some new icons just for fun. Supported Games ----------------+------------+-----+-----+--------------- Game Name |Rom Filename|Sound|Speed|Notes/Comments ----------------+------------+-----+-----+--------------- 1942 |1942.zip | Y* | VG | 1943 |1943.zip | Y* | G | Amidar |amidar.zip | | E | Anteater |antester.zip| Y* | VG | Arkanoid | (1) | Y | G | Asteroids |asteroid.zip| N | G | Asteroid Deluxe | | N | G | Battle Zone |bzone.zip | N | G | Berzerk |berzerk.zip | N | P | Bomb Jack |bombjack.zip| N | G | Burger Time | (2) | | P | Carnival |carnival.zip| N | VG | Centipede |centiped.zip| Y | VG | City Connection |citycon.zip | Y* | G | Congo Bongo |congo.zip | | G | Crystal Castles |ccastles.zip| | G | Dig Dug |digdug.zip | Y* | P | Donkey Kong |dkong.zip | Y* | E | Donkey Kong 3 |dkong3.zip | | | Donkey Kong Jr |dkongjr.zip | Y* | E | Frogger |frogger.zip | Y* | VG | Galaga |galaga.zip | Y* | P | Galaxian |galaxian.zip| Y | VG | Ghosts'n'Goblins|gng.zip | | F | Gyruss |gyruss.zip | | G | Lady Bug |ladybug.zip | Y | E | Mario Bros. |mario.zip | | VG | Missle Command |missile.zip | | G | Mr. Do! |mrdo.zip | Y | VG | Mr Do's Castle | | | F | Ms Pac-Man |mspacman.zip| Y | E | Omega Race |omegrace.zip| Y | G | Pac-Man |pacman.zip | Y | E | Phoenix |phoenix.zip | N | E | Pooyan |pooyan.zip | Y* | VG | Q*Bert |qbert.zip | | E | Red Baron |redbaron.zip| | F | Satan's Hollow |shollow.zip | | G | Scramble |scranble.zip| | G | Space Invaders |invaders.zip| N | E | Star Wars |starwars.zip| | P | Super Basketball|sbasketb.zip| | F | Super Zaxxon |szaxxon.zip | | VG | Tempest |tempest.zip | Y | G | Time Pilot |timeplt.zip | Y* | VG | Track & Field |trackfld.zip| | F |rotated screen :) Tron |tron.zip | | G | Tutankham |tutankhm.zip| | G | Yie Ar Kung-Fu |yiear.zip | | F | Zaxxon |zaxxon.zip | | VG | ----------------+------------+-----+-----+ * = it makes noise, but you probably don't want to hear it (1) this is a clone; you need the roms from the 'main' arkanoid as well as the roms for this specific clone (2) take the btime roms and the btimem roms and combine them into a single zip named btime.zip Speed is simply my judgement: E=excellent, VG=very good, G=good, F=fair, P=poor Details of Driver-specific Speed-ups: ------------------------------------- Underclocking: first I play the game with a current version of desktop-MAME (which supports in-game clock-speed changes, press ~ and cycle through) to determine a good estimate of how tolerant a game is to being underclocked. Then I change the clockspeed in the machine_driver section of the games' driver code (i.e. ./drivers/pacman.c) and finally compile and test. Sympoms of the clockspeed being too low are erratic/odd/strange behavior and/or slowing of action, esp during the more 'complicated' parts of gameplay. Memory Handlers: first I comment out any 'watchdog resets' and allow the primary CPU in a multiple CPU game to directly access shared memory rather than work through a handler function (per Larry Bank's suggestions), then I re-order the entrys so that the most likely memory accesses are listed first and least likey memory accesses are listed last. For example: in a writemem[] I'll put {0x0000,0x4fff,MWA_ROM } last since it is uncommon for a game to try to write to its ROM area very often. Beyond that, it is often difficult to guess which ranges are read/written most often. Video Type: for the few games which will work OK with dirty lines but do not have VIDEO_SUPPORTS_DIRTY (all vector games, Lady Bug and perhaps a few others), I add | VIDEO_SUPPORTS_DIRTY after the VIDEO_TYPE_RASTER or VIDEO_TYPE_VECTOR. Cheat Inputs: any inputs which have IPF_CHEAT, I remove the IPF_CHEAT flag; this allows me to disable cheat-mode and still get the benefits of the cheat-options (i.e. speedup in mspacman and single-joystick controls in bzome) which is all I want anyhow since the cheat interface is screwed; disabling cheat mode also gives a very small speed-up. Video Hardware: this, along with underclocking, is where there is the most potential for more speed. The function we're interested in is the xxxxx_vh_screenrefresh (i.e. ./vidhrdw/pengo.c) where xxxxx is referenced from the machine part of the driver. This function is called for every frame (unless it is being skipped). Typically it will go through each byte in the character (or 'tile') video memory and check the dirtybuffer to see if it has been updated, if so it figures out where to draw it, and copies it to a tempbitmap. Then the tempbitmap is copied to the 'real' bitmap and finally the sprites are drawn on top. The first thing I do in here is follow Larry Bank's suggestion and change any % 32 to a & 31 and any / 32 to a >> 5. Then a comment out any flipscreen support that may be in there, as I don't see any need for flipscreen on a Casio. After that, things aren't so simple. Look for dumb things being done. Like in 1943: the last thing that happens is "raw the frontmost playfield. They are characters, but draw them as sprites" which is fine... But, every chacter (about 1000) is drawn every frame. We should at least check to see if the character is a 'space' (i.e. nothing) as most are before drawing it. Find the space character by examining the char-set from desktop MAME (press F4). There are other ways to speed things up, but they are beyond the scope of this README.TXT TO-DO List: ----------- - Fix screen centering in all supported games, possibly even have games which are too large (horizontally) to split the difference, i.e. for a game with a horizontal resolution of 256 pixels, rather than fitting flush against the left side of the display and dropping 16 pixels off the right, have it drop 8 off the left and 8 off the right. - Add 'squeezing' blit routine to handle games whose resolution is much too large to fit on the display. Likely first try will simply draw every other horizontal pixel and every other row. This would bring the MCR games down to a usable size. ***DONE FOR MCR GAMES*** - Enable more drivers. While adding them: underclock, tweak the memory access handlers, and tweak the vh_update function. - Try some 'smarter' things in vh_update, by learning from Centipede (which doesn't use a tempbitmap; all draws are directly to the screen bitmap, and the tiles under sprites are marked dirty so they will be cleaned up in the following frame) and Galaga (I don't completely understand its vh_refresh function yet, but it according to the profiler, it seems to be one of the most efficient of all). Also, try being a little smarter about skipping sprites which don't need to be drawn. - Fix the UI dimensions. ***DONE*** - Have game pause then the UI is entered and unpause when exiting the UI. - Add autofire option. - Add touch-screen support. At first, I'd like to be able to simply map any touch on the screen to a key, which the user could map to any game control. This way, I could rotate the screen in some games which require joypad input & one button input and still have it playable (i.e. operate the joypad with your right thumb and fire by tapping the screen with your left thumb). Eventually, it would be cool to have multiple button support (by tapping in different places), analog input support (control the paddle in Arkanoid), and 'smart' directional control (i.e. Pacman goes left if you tap left of the current position of his sprite), but all of those a rather more complicated. ***PHASE I DONE*** - Support LED outputs by using the green 'charging' LED on the top of the device. Several older Atari and Namco game drivers support LEDs (Centipede and Pacman come to mind) and DOS MAME supports them by controling the keyboard's NUM-LOCK LED. If anyone knows how to control either of the LEDs on the top of a Casio E10X, please contact me. - Work on sound (ugh). Try to throw in some stuff from iMAME. Would really like to at least get samples working (for audio in Space Invaders, Asteroids, etc). - Support 'artwork' for bzone and astdelux (maybe even SI:) - Add more options (cheats on/off, autoframeskip on/off, frameskip 1-12, antialias on/off, flicker 0-255, translucency on/off, beam .5-5?, sample rate 11025/22050, sample bits 8/16 (I can't get 16 bit to work at all right now...), stereo/mono (yeah, right, like any stereo games are supported...)