Create your own Mame simulator.

Source: Internet
Author: User

Before that, we must prepare some necessary things.
1.wingw-gcc.exe click to download

2.wingwover.zip click to download

3.mamesource code mame081s.zip click to download

4. mame32plus source code mame32plus-0.18-0423-src.cab click to download

First install wingw-gcc.exe, then decompress wingwover.zip, Mame source code, mame32plus source code to the corresponding installation directory, overwrite the corresponding files.

Open the DOS window, enter the installation directory of wingw-gcc.exe, run the batch processing "env. Bat", and then compile the common version of mame32plus (the compilation time depends on the performance of your machine ). If an error occurs during compilation, running "make" again can solve the problem. After completion, three files will be generated, namely mamep.exew.mame32p.exe and mameplib. dll.

To compile other versions, "make" must be followed by parameters, such as i686 optimization: Make i686 = 1.
I686 optimization: Make i686 = 1
P4 optimization: Make P4 = 1
Athlon optimization: Make athlon = 1

Note that the Mame and mame32plus versions must be consistent, that is, Mame 0.81 corresponds to mame32plus 0.81.x. After a version of Mame is compiled, If you compile other CPU optimized versions, you do not need to delete the OBJ directory under the installation directory, because the compiler creates a corresponding folder under the OBJ directory, save new data. (For example, if you compile an i686 optimized version, the compiler creates a new mameppp folder under the OBJ directory ).

Go to the makelang directory under the installation directory and run "cn. Bat" to get the Simplified Chinese Language Pack.

Mame32plus has been compiled at this step, and the font should go to mame32plus! Download the Home Page. The simplified Chinese font is provided here: Click to download.

If the system is 98, you also need to download a unicows. dll file. If you think mameplib. dll has dozens of megabytes, you can use UPX and other compression software to compress it.

Add a game driver.

Note: before modifying the source code, back up the source code file. When you compile the code again, do not delete the OBJ directory under the installation directory, because the Compilation Program recognizes the source files that have been modified and then only compiles them. If you have a lot of time and don't mind waiting for it, delete the OBJ directory under the installation directory and re-compile all source code ^_^.

1. Add the fully decrypted neogeo game Driver (for example, kof2002 ):
In fact, there are kof2002, alloy 4, and so on, but it is not open, as long as you modify the src directory under the installation directory "driver. c file, change "testdriver" before the corresponding game to "driver". For example, to drive kof2002, find "testdriver (kof2002)/* 0265 (c) 2002 eolith/playmore Corporation */"changed to" Driver (kof2002)/* 0265 (c) 2002 eolith/playmore Corporation */". But most of these drivers are encrypted or directly
To read the version of "S1 Rom", You need to define "driver_init". It looks very complicated.

A. Rewrite the game driver
Use a text editor (such as ultraedit or Windows built-in WordPad) to open the "neogeo" under the DRIVERS directory under the src directory under the installation directory. C "file, find a relatively close game driver, and then change it. The kof98 driver is a very similar one. It doesn't seem to matter much if you look for its location and then make it again. We recommend that you create it after the kof2002 series for your convenience.

Modifying the driver code is similar to modifying the romdata of nebula, as follows:

Rom_start (kof98)
Rom_start (kof2002nd)
Rom_region (0x500000, region_cpu1, 0)
Don't change it here
Rom_load16_word_swap ("242-p1.bin", 0x000000, 0x100000, 0x61ac868a)
Rom_load16_word_swap (265n-p1.rom, 0x000000, 0x size (1 m write 100000, and so on), 0 xcrc)

Rom_load16_word_swap ("242-p2.bin", 0x100000, 0x400000, 0x980aba4c)

Neo_sfix_128k ("242-s1.bin", 0x7f7b4805)

Neo_bios_sound_256k ("242-m1.bin", 0x4e7a6b1b)
Neo_bios_sound_128k {Note the M1 size. 2k2 is k} ("265-m1.rom", 0 xcrc)

Rom_region (0x1000000, region_sound1, romregion_soundonly)
Rom_load ("242-v1.bin", 0x000000, 0x400000, 0xb9ea8051)
Rom_load ("265-rom", 0x000000, 0x size, 0 xcrc)
Rom_load ("242-v2.bin", 0x400000, 0x400000, 0xcc11106e)
Rom_load ("242-v3.bin", 0x800000, 0x400000, 0x044ea4e1)
Rom_load ("242-v4.bin", 0xc00000, 0x400000, 0x7985ea30)

No_deltat_region

Rom_region (0x4000000, region_gfx3, 0)
Rom_load16_byte ("242-c1.bin", 0x0000000, 0x800000, 0xe564ecd6)/* plane */
Rom_load16_byte ("265-c1.rom", 0x0000000, 0x, 0 xcrc)

Rom_load16_byte ("242-c2.bin", 0x0000001, 0x800000, 0xbd959b60)/* plane */
Rom_load16_byte ("242-c3.bin", 0x1000000, 0x800000, 0x221_b4f)/* plane */
Rom_load16_byte ("242-c4.bin", 0x1000001, 0x800000, 0x0b4fa044)/* plane */
Rom_load16_byte ("242-c5.bin", 0x2000000, 0x800000, 0x9d10bed3)/* plane */
Rom_load16_byte ("242-c6.bin", 0x2000001, 0x800000, 0xda07b6a2)/* plane */
Rom_load16_byte ("242-c7.bin", 0x3000000, 0x800000, 0xf6d7a38a)/* plane */
Rom_load16_byte ("242-c8.bin", 0x3000001, 0x800000, 0xc823e045)/* plane */
Rom_end

That is, change it to: (Note CRC, which may be different from what you own below .)

Rom_start (kof2002nd)
Rom_region (0x500000, region_cpu1, 0)
Rom_load16_word_swap ("265n-p1.rom", 0x000000, 0x100000, 0x9ede7323)
Rom_load16_word_swap ("265n-p2.rom", 0x100000, 0x400000, 0x432fdf53)

Neo_sfix_128k ("265n-s1.rom", 0xe0eaaba3)

Neo_bios_sound_128k ("265n-m1.rom", 0xab9d360e)

Rom_region (0x1000000, region_sound1, romregion_soundonly)
Rom_load ("265n-v1.rom", 0x000000, 0x400000, 0x13d98607)
Rom_load ("265n-v2.rom", 0x400000, 0x400000, 0x9cf74677)
Rom_load ("265n-v3.rom", 0x800000, 0x400000, 0x8e9448b5)
Rom_load ("265n-v4.rom", 0xc00000, 0x400000, 0x067271b5)

No_deltat_region

Rom_region (0x4000000, region_gfx3, 0)
Rom_load16_byte ("265n-c1.rom", 0x0000000, 0x800000, 0x7efa6ef7)/* plane */

Rom_load16_byte ("265n-c2.rom", 0x0000001, 0x800000, 0xaa82948b)/* plane */

Rom_load16_byte ("265n-c3.rom", 0x1000000, 0x800000, 0x959fad0b)/* plane */

Rom_load16_byte ("265n-c4.rom", 0x1000001, 0x800000, 0xefe6a468)/* plane */

Rom_load16_byte ("265n-c5.rom", 0x2000000, 0x800000, 0x74bba7c6)/* plane */

Rom_load16_byte ("265n-c6.rom", 0x2000001, 0x800000, 0xe20d2216)/* plane */

Rom_load16_byte ("265n-c7.rom", 0x3000000, 0x800000, 0x8a5b561c)/* plane */

Rom_load16_byte ("265n-c8.rom", 0x3000001, 0x800000, 0xbef667a3)/* plane */

Rom_end

B. Add to list
Same as that of kof98, then convert it to the back and modify it. The details are as follows:
Find "game (1998, kof98, neogeo, rot0," SNK ", "The King of fighters '98-the Slugfest/king of fighters '98-dream match never ends") "and then" game (2001, sengoku3, neogeo, sengoku3, rot0, "SNK", "Sengoku 3")/* encrypted
Followed by GFX.

Game (1998, kof98, neogeo, rot0, "SNK ", "The King of fighters '98-the Slugfest/king of fighters '98-dream match never ends ")

Game (2002, clone ROM file name, ROM file name, neogeo, rot0, "SNK", "The King of fighters 2002 (clash of kings 2002 fully decrypted version )")

For example:
Game (2002, kof2002nd, kof2002, neogeo, rot0, "SNK", "The King of fighters 2002 (clash of kings 2002 fully decrypted version )")

C. Open the driver
Open the "Driver. c. Change "testdriver (kof2002)" to "Driver (kof2002)", and then add "Driver (kof2002nd)" below. (/*/Comments. No one knows this)

Finally, re-compile the code and you will have your own mame32plus simulator? Happy :)

Original: Yong adapted: finalfantasy

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.