misc clean up. nw.

This commit is contained in:
etabeta78 2016-04-28 11:20:54 +02:00
parent 923539399b
commit 1524406721
11 changed files with 280 additions and 498 deletions

View File

@ -2651,8 +2651,8 @@ createMAMEProjects(_target, _subtarget, "neogeo")
files {
MAME_DIR .. "src/mame/drivers/neogeo.cpp",
MAME_DIR .. "src/mame/includes/neogeo.h",
MAME_DIR .. "src/mame/drivers/neodriv.inc",
MAME_DIR .. "src/mame/video/neogeo.cpp",
MAME_DIR .. "src/mame/drivers/neogeo_noslot.cpp",
MAME_DIR .. "src/mame/drivers/neopcb.cpp",
MAME_DIR .. "src/mame/video/neogeo_spr.cpp",
MAME_DIR .. "src/mame/video/neogeo_spr.h",

View File

@ -936,7 +936,7 @@ function createProjects_mame_mess(_target, _subtarget)
-- n64.c (MESS), aleck64.c (MAME)
-- megadriv.c, segapico.c (MESS), hshavoc.c, megadrvb.c, megaplay.c, megatech.c, puckpkmn.c, segac2.c, segas18.c (MAME)
-- dccons.c (MESS), naomi.c (MAME)
-- ng_aes.c (MESS), midas.c, neogeo.c, neogeo_noslot.c, neoprint.c (MAME)
-- neogeocd.c (MESS), midas.c, neogeo.c, neoprint.c (MAME)
-- cdi.c (MESS + MAME)
-- 3do.c (MESS + MAME), konamim2.c (MAME)
-- vectrex.c (MESS + MAME)
@ -1028,7 +1028,6 @@ files {
MAME_DIR .. "src/mame/video/powervr2.h",
MAME_DIR .. "src/mame/drivers/neogeo.cpp",
MAME_DIR .. "src/mame/includes/neogeo.h",
MAME_DIR .. "src/mame/machine/neocrypt.cpp",
MAME_DIR .. "src/mame/machine/ng_memcard.cpp",
MAME_DIR .. "src/mame/machine/ng_memcard.h",
MAME_DIR .. "src/mame/video/neogeo.cpp",
@ -2568,7 +2567,7 @@ files {
createMESSProjects(_target, _subtarget, "snk")
files {
MAME_DIR .. "src/mame/drivers/ng_aes.cpp",
MAME_DIR .. "src/mame/drivers/neogeocd.cpp",
MAME_DIR .. "src/mame/drivers/ngp.cpp",
MAME_DIR .. "src/mame/video/k1ge.cpp",
MAME_DIR .. "src/mame/video/k1ge.h",

View File

@ -141,7 +141,6 @@ public:
UINT32 get_sprites_addrmask() { return m_sprite_gfx_address_mask; }
void init_sprites_addrmask(UINT8 *spr_base, UINT32 spr_size) {
m_sprite_gfx_address_mask = neogeohelper_optimize_sprite_data(get_sprites_optimized_arr(), &spr_base[0], spr_size);
printf("gfx mask: %x\n", m_sprite_gfx_address_mask);
}
void ym_alloc(UINT32 size) { m_ym.resize(size); }

View File

@ -1,10 +1,3 @@
// license:BSD-3-Clause
// copyright-holders:Bryan McPhail,Ernesto Corvi,Andrew Prime,Zsolt Vasvari
// thanks-to:Fuzz
#include "emu.h"
#include "includes/neogeo.h"
// non-configurable slot (to be used for non-softlist sets, until we introduce some 'template' concept)

View File

@ -500,13 +500,13 @@ void neogeo_state::adjust_display_position_interrupt_timer()
}
void neogeo_state::neogeo_set_display_position_interrupt_control( UINT16 data )
void neogeo_state::set_display_position_interrupt_control(UINT16 data)
{
m_display_position_interrupt_control = data;
}
void neogeo_state::neogeo_set_display_counter_msb( UINT16 data )
void neogeo_state::set_display_counter_msb(UINT16 data)
{
m_display_counter = (m_display_counter & 0x0000ffff) | ((UINT32)data << 16);
@ -514,7 +514,7 @@ void neogeo_state::neogeo_set_display_counter_msb( UINT16 data )
}
void neogeo_state::neogeo_set_display_counter_lsb( UINT16 data )
void neogeo_state::set_display_counter_lsb(UINT16 data)
{
m_display_counter = (m_display_counter & 0xffff0000) | data;
@ -536,7 +536,7 @@ void neogeo_state::update_interrupts()
}
void neogeo_state::neogeo_acknowledge_interrupt( UINT16 data )
void neogeo_state::acknowledge_interrupt(UINT16 data)
{
if (data & 0x01)
m_irq3_pending = 0;
@ -703,7 +703,7 @@ WRITE8_MEMBER(neogeo_state::io_control_w)
*
*************************************/
READ16_MEMBER(neogeo_state::neogeo_unmapped_r)
READ16_MEMBER(neogeo_state::unmapped_r)
{
UINT16 ret;
@ -849,7 +849,7 @@ WRITE8_MEMBER(neogeo_state::system_control_w)
{
default:
case 0x00:
neogeo_set_screen_shadow(bit);
set_screen_shadow(bit);
break;
case 0x01:
@ -875,7 +875,7 @@ WRITE8_MEMBER(neogeo_state::system_control_w)
break;
case 0x07:
neogeo_set_palette_bank(bit);
set_palette_bank(bit);
break;
case 0x02: // memory card 1: write enable/disable
@ -1448,18 +1448,18 @@ ADDRESS_MAP_START( neogeo_main_map, AS_PROGRAM, 16, neogeo_state )
AM_RANGE(0x300080, 0x300081) AM_MIRROR(0x01ff7e) AM_READ_PORT("TEST")
AM_RANGE(0x300000, 0x300001) AM_MIRROR(0x01fffe) AM_WRITE8(watchdog_reset_w, 0x00ff)
AM_RANGE(0x320000, 0x320001) AM_MIRROR(0x01fffe) AM_READ_PORT("AUDIO/COIN") AM_WRITE8(audio_command_w, 0xff00)
AM_RANGE(0x360000, 0x37ffff) AM_READ(neogeo_unmapped_r)
AM_RANGE(0x360000, 0x37ffff) AM_READ(unmapped_r)
AM_RANGE(0x380000, 0x380001) AM_MIRROR(0x01fffe) AM_READ_PORT("SYSTEM")
AM_RANGE(0x380000, 0x38007f) AM_MIRROR(0x01ff80) AM_WRITE8(io_control_w, 0x00ff)
AM_RANGE(0x3a0000, 0x3a001f) AM_MIRROR(0x01ffe0) AM_READ(neogeo_unmapped_r) AM_WRITE8(system_control_w, 0x00ff)
AM_RANGE(0x3c0000, 0x3c0007) AM_MIRROR(0x01fff8) AM_READ(neogeo_video_register_r)
AM_RANGE(0x3c0000, 0x3c000f) AM_MIRROR(0x01fff0) AM_WRITE(neogeo_video_register_w)
AM_RANGE(0x3e0000, 0x3fffff) AM_READ(neogeo_unmapped_r)
AM_RANGE(0x400000, 0x401fff) AM_MIRROR(0x3fe000) AM_READWRITE(neogeo_paletteram_r, neogeo_paletteram_w)
AM_RANGE(0x3a0000, 0x3a001f) AM_MIRROR(0x01ffe0) AM_READ(unmapped_r) AM_WRITE8(system_control_w, 0x00ff)
AM_RANGE(0x3c0000, 0x3c0007) AM_MIRROR(0x01fff8) AM_READ(video_register_r)
AM_RANGE(0x3c0000, 0x3c000f) AM_MIRROR(0x01fff0) AM_WRITE(video_register_w)
AM_RANGE(0x3e0000, 0x3fffff) AM_READ(unmapped_r)
AM_RANGE(0x400000, 0x401fff) AM_MIRROR(0x3fe000) AM_READWRITE(paletteram_r, paletteram_w)
AM_RANGE(0x800000, 0x800fff) AM_READWRITE(memcard_r, memcard_w)
AM_RANGE(0xc00000, 0xc1ffff) AM_MIRROR(0x0e0000) AM_ROM AM_REGION("mainbios", 0)
AM_RANGE(0xd00000, 0xd0ffff) AM_MIRROR(0x0f0000) AM_RAM_WRITE(save_ram_w) AM_SHARE("saveram")
AM_RANGE(0xe00000, 0xffffff) AM_READ(neogeo_unmapped_r)
AM_RANGE(0xe00000, 0xffffff) AM_READ(unmapped_r)
ADDRESS_MAP_END
@ -1487,17 +1487,17 @@ static ADDRESS_MAP_START( aes_main_map, AS_PROGRAM, 16, aes_state )
AM_RANGE(0x300000, 0x300001) AM_MIRROR(0x01fffe) AM_DEVREAD8("ctrl1", neogeo_control_port_device, ctrl_r, 0xff00)
AM_RANGE(0x320000, 0x320001) AM_MIRROR(0x01fffe) AM_READ_PORT("AUDIO") AM_WRITE8(audio_command_w, 0xff00)
AM_RANGE(0x340000, 0x340001) AM_MIRROR(0x01fffe) AM_DEVREAD8("ctrl2", neogeo_control_port_device, ctrl_r, 0xff00)
AM_RANGE(0x360000, 0x37ffff) AM_READ(neogeo_unmapped_r)
AM_RANGE(0x360000, 0x37ffff) AM_READ(unmapped_r)
AM_RANGE(0x380000, 0x380001) AM_MIRROR(0x01fffe) AM_READ(aes_in2_r)
AM_RANGE(0x380000, 0x38007f) AM_MIRROR(0x01ff80) AM_WRITE8(io_control_w, 0x00ff)
AM_RANGE(0x3a0000, 0x3a001f) AM_MIRROR(0x01ffe0) AM_READ(neogeo_unmapped_r) AM_WRITE8(system_control_w, 0x00ff)
AM_RANGE(0x3c0000, 0x3c0007) AM_MIRROR(0x01fff8) AM_READ(neogeo_video_register_r)
AM_RANGE(0x3c0000, 0x3c000f) AM_MIRROR(0x01fff0) AM_WRITE(neogeo_video_register_w)
AM_RANGE(0x3e0000, 0x3fffff) AM_READ(neogeo_unmapped_r)
AM_RANGE(0x400000, 0x401fff) AM_MIRROR(0x3fe000) AM_READWRITE(neogeo_paletteram_r, neogeo_paletteram_w)
AM_RANGE(0x3a0000, 0x3a001f) AM_MIRROR(0x01ffe0) AM_READ(unmapped_r) AM_WRITE8(system_control_w, 0x00ff)
AM_RANGE(0x3c0000, 0x3c0007) AM_MIRROR(0x01fff8) AM_READ(video_register_r)
AM_RANGE(0x3c0000, 0x3c000f) AM_MIRROR(0x01fff0) AM_WRITE(video_register_w)
AM_RANGE(0x3e0000, 0x3fffff) AM_READ(unmapped_r)
AM_RANGE(0x400000, 0x401fff) AM_MIRROR(0x3fe000) AM_READWRITE(paletteram_r, paletteram_w)
AM_RANGE(0x800000, 0x800fff) AM_READWRITE(memcard_r, memcard_w)
AM_RANGE(0xc00000, 0xc1ffff) AM_MIRROR(0x0e0000) AM_ROM AM_REGION("mainbios", 0)
AM_RANGE(0xd00000, 0xffffff) AM_READ(neogeo_unmapped_r)
AM_RANGE(0xd00000, 0xffffff) AM_READ(unmapped_r)
ADDRESS_MAP_END
@ -1783,6 +1783,190 @@ static MACHINE_CONFIG_DERIVED_CLASS( aes, neogeo_base, aes_state )
MACHINE_CONFIG_END
/*************************************
*
* Neo-Geo bios
*
*************************************
These are the known Bios Roms, Set options.bios to the one you want.
The Universe bios roms are supported because they're now used on enough PCBs
to be considered 'in active arcade use' rather than just homebrew hacks.
Some may be missing, there have been multiple CRCs reported for the same
revision in some cases (the Universe bios has an option for entering / displaying
a serial number; these should be noted as such if they're added).
Universe bios prior to version 1.3 was incompatible with AES.
The 'japan-hotel' BIOS is a dump of an MVS which could be found in some japanese
hotels. it is a custom MVS mobo which uses MVS carts but it hasn't jamma
connector and it's similar to a console with a coin mechanism, so it's a sort
of little coin op console installed in hotels.
The sp-45.sp1 bios is the latest 'ASIA' revision. Japan-j3.bin is the latest 'JAPAN'
revision. Both of them are also used in the sp-4x.sp1 bios of the Jamma PCB boards.
The current Neo-Geo MVS system set (SFIX/SM1/000-LO) used is from a NEO-MVH MV1FS board.
Other boards (MV1xx / MV2x / MV4x /MV6x) other system sets?
Zoom ROM (LO) 128K TC531000CP 1x 128Kx8 Zoom look-up table ROM
Fix ROM (SFIX) 128K 27C1000 1x 128Kx8 Text layer graphics ROM
Sound ROM (SM1) 128K 27C1000/23C1000 1x 128Kx8 Z80 program ROM
*/
#define ROM_LOAD16_WORD_SWAP_BIOS(bios,name,offset,length,hash) \
ROMX_LOAD(name, offset, length, hash, ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(bios+1)) /* Note '+1' */
#define NEOGEO_UNIBIOS(x) \
ROM_SYSTEM_BIOS( x+ 0, "unibios32", "Universe Bios (Hack, Ver. 3.2)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 0, "uni-bios_3_2.rom", 0x00000, 0x020000, CRC(a4e8b9b3) SHA1(c92f18c3f1edda543d264ecd0ea915240e7c8258) ) /* Universe Bios v3.2 (hack) */ \
ROM_SYSTEM_BIOS( x+ 1, "unibios31", "Universe Bios (Hack, Ver. 3.1)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 1, "uni-bios_3_1.rom", 0x00000, 0x020000, CRC(0c58093f) SHA1(29329a3448c2505e1ff45ffa75e61e9693165153) ) /* Universe Bios v3.1 (hack) */ \
ROM_SYSTEM_BIOS( x+ 2, "unibios30", "Universe Bios (Hack, Ver. 3.0)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 2, "uni-bios_3_0.rom", 0x00000, 0x020000, CRC(a97c89a9) SHA1(97a5eff3b119062f10e31ad6f04fe4b90d366e7f) ) /* Universe Bios v3.0 (hack) */ \
ROM_SYSTEM_BIOS( x+ 3, "unibios23", "Universe Bios (Hack, Ver. 2.3)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 3, "uni-bios_2_3.rom", 0x00000, 0x020000, CRC(27664eb5) SHA1(5b02900a3ccf3df168bdcfc98458136fd2b92ac0) ) /* Universe Bios v2.3 (hack) */ \
ROM_SYSTEM_BIOS( x+ 4, "unibios23o", "Universe Bios (Hack, Ver. 2.3, older?)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 4, "uni-bios_2_3o.rom", 0x00000, 0x020000, CRC(601720ae) SHA1(1b8a72c720cdb5ee3f1d735bbcf447b09204b8d9) ) /* Universe Bios v2.3 (hack) alt version, withdrawn? */ \
ROM_SYSTEM_BIOS( x+ 5, "unibios22", "Universe Bios (Hack, Ver. 2.2)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 5, "uni-bios_2_2.rom", 0x00000, 0x020000, CRC(2d50996a) SHA1(5241a4fb0c63b1a23fd1da8efa9c9a9bd3b4279c) ) /* Universe Bios v2.2 (hack) */ \
ROM_SYSTEM_BIOS( x+ 6, "unibios21", "Universe Bios (Hack, Ver. 2.1)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 6, "uni-bios_2_1.rom", 0x00000, 0x020000, CRC(8dabf76b) SHA1(c23732c4491d966cf0373c65c83c7a4e88f0082c) ) /* Universe Bios v2.1 (hack) */ \
ROM_SYSTEM_BIOS( x+ 7, "unibios20", "Universe Bios (Hack, Ver. 2.0)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 7, "uni-bios_2_0.rom", 0x00000, 0x020000, CRC(0c12c2ad) SHA1(37bcd4d30f3892078b46841d895a6eff16dc921e) ) /* Universe Bios v2.0 (hack) */ \
ROM_SYSTEM_BIOS( x+ 8, "unibios13", "Universe Bios (Hack, Ver. 1.3)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 8, "uni-bios_1_3.rom", 0x00000, 0x020000, CRC(b24b44a0) SHA1(eca8851d30557b97c309a0d9f4a9d20e5b14af4e) ) /* Universe Bios v1.3 (hack) */
#define NEOGEO_UNIBIOS_1_2_AND_OLDER(x) \
ROM_SYSTEM_BIOS( x+ 9, "unibios12", "Universe Bios (Hack, Ver. 1.2)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 9, "uni-bios_1_2.rom", 0x00000, 0x020000, CRC(4fa698e9) SHA1(682e13ec1c42beaa2d04473967840c88fd52c75a) ) /* Universe Bios v1.2 (hack) */ \
ROM_SYSTEM_BIOS( x+10, "unibios12o", "Universe Bios (Hack, Ver. 1.2, older)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+10, "uni-bios_1_2o.rom", 0x00000, 0x020000, CRC(e19d3ce9) SHA1(af88ef837f44a3af2d7144bb46a37c8512b67770) ) /* Universe Bios v1.2 (hack) alt version */ \
ROM_SYSTEM_BIOS( x+11, "unibios11", "Universe Bios (Hack, Ver. 1.1)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+11, "uni-bios_1_1.rom", 0x00000, 0x020000, CRC(5dda0d84) SHA1(4153d533c02926a2577e49c32657214781ff29b7) ) /* Universe Bios v1.1 (hack) */ \
ROM_SYSTEM_BIOS( x+12, "unibios10", "Universe Bios (Hack, Ver. 1.0)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+12, "uni-bios_1_0.rom", 0x00000, 0x020000, CRC(0ce453a0) SHA1(3b4c0cd26c176fc6b26c3a2f95143dd478f6abf9) ) /* Universe Bios v1.0 (hack) */
#define NEOGEO_BIOS \
ROM_REGION16_BE( 0x80000, "mainbios", 0 ) \
ROM_SYSTEM_BIOS( 0, "euro", "Europe MVS (Ver. 2)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 0, "sp-s2.sp1", 0x00000, 0x020000, CRC(9036d879) SHA1(4f5ed7105b7128794654ce82b51723e16e389543) ) /* Europe, 1 Slot, has also been found on 2 Slot and 4 Slot (the old hacks were designed for this one) */ \
ROM_SYSTEM_BIOS( 1, "euro-s1", "Europe MVS (Ver. 1)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 1, "sp-s.sp1", 0x00000, 0x020000, CRC(c7f2fa45) SHA1(09576ff20b4d6b365e78e6a5698ea450262697cd) ) /* Europe, 4 Slot */ \
\
ROM_SYSTEM_BIOS( 2, "us", "US MVS (Ver. 2?)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 2, "sp-u2.sp1", 0x00000, 0x020000, CRC(e72943de) SHA1(5c6bba07d2ec8ac95776aa3511109f5e1e2e92eb) ) /* US, 2 Slot */ \
ROM_SYSTEM_BIOS( 3, "us-e", "US MVS (Ver. 1)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 3, "sp-e.sp1", 0x00000, 0x020000, CRC(2723a5b5) SHA1(5dbff7531cf04886cde3ef022fb5ca687573dcb8) ) /* US, 6 Slot (V5?) */ \
ROM_SYSTEM_BIOS( 4, "us-v2", "US MVS (4 slot, Ver 2)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 4, "v2.bin", 0x00000, 0x020000, CRC(62f021f4) SHA1(62d372269e1b3161c64ae21123655a0a22ffd1bb) ) /* US, 4 slot */ \
\
ROM_SYSTEM_BIOS( 5, "asia", "Asia MVS (Ver. 3)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 5, "asia-s3.rom", 0x00000, 0x020000, CRC(91b64be3) SHA1(720a3e20d26818632aedf2c2fd16c54f213543e1) ) /* Asia */ \
\
ROM_SYSTEM_BIOS( 6, "japan", "Japan MVS (Ver. 3)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 6, "vs-bios.rom", 0x00000, 0x020000, CRC(f0e8f27d) SHA1(ecf01eda815909f1facec62abf3594eaa8d11075) ) /* Japan, Ver 6 VS Bios */ \
ROM_SYSTEM_BIOS( 7, "japan-s2", "Japan MVS (Ver. 2)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 7, "sp-j2.sp1", 0x00000, 0x020000, CRC(acede59c) SHA1(b6f97acd282fd7e94d9426078a90f059b5e9dd91) ) /* Japan, Older */ \
ROM_SYSTEM_BIOS( 8, "japan-s1", "Japan MVS (Ver. 1)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 8, "sp1.jipan.1024", 0x00000, 0x020000, CRC(9fb0abe4) SHA1(18a987ce2229df79a8cf6a84f968f0e42ce4e59d) ) /* Japan, Older */ \
ROM_SYSTEM_BIOS( 9, "mv1c", "NEO-MVH MV1C" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 9, "sp-45.sp1", 0x00000, 0x080000, CRC(03cc9f6a) SHA1(cdf1f49e3ff2bac528c21ed28449cf35b7957dc1) ) /* Latest Asia bios */ \
ROM_SYSTEM_BIOS( 10, "japan-j3", "Japan MVS (J3)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 10, "japan-j3.bin", 0x00000, 0x020000, CRC(dff6d41f) SHA1(e92910e20092577a4523a6b39d578a71d4de7085) ) /* Latest Japan bios; correct chip label unknown */ \
ROM_SYSTEM_BIOS( 11, "japan-hotel", "Custom Japanese Hotel" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 11, "sp-1v1_3db8c.bin", 0x00000, 0x020000, CRC(162f0ebe) SHA1(fe1c6dd3dfcf97d960065b1bb46c1e11cb7bf271) ) /* 'rare MVS found in japanese hotels' shows v1.3 in test mode */ \
\
NEOGEO_UNIBIOS(12) \
NEOGEO_UNIBIOS_1_2_AND_OLDER(12)
#define NEO_BIOS_AUDIO_64K(name, hash) \
NEOGEO_BIOS \
ROM_REGION( 0x20000, "audiobios", 0 ) \
ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) ) \
ROM_REGION( 0x20000, "cslot1:audiocpu", 0 ) \
ROM_LOAD( name, 0x00000, 0x10000, hash ) \
ROM_RELOAD( 0x10000, 0x10000 ) \
ROM_REGION( 0x10000, "ymsnd", ROMREGION_ERASEFF )
#define NEO_BIOS_AUDIO_128K(name, hash) \
NEOGEO_BIOS \
ROM_REGION( 0x20000, "audiobios", 0 ) \
ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) ) \
ROM_REGION( 0x30000, "cslot1:audiocpu", 0 ) \
ROM_LOAD( name, 0x00000, 0x20000, hash ) \
ROM_RELOAD( 0x10000, 0x20000 ) \
ROM_REGION( 0x10000, "ymsnd", ROMREGION_ERASEFF )
#define NEO_BIOS_AUDIO_256K(name, hash) \
NEOGEO_BIOS \
ROM_REGION( 0x20000, "audiobios", 0 ) \
ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) ) \
ROM_REGION( 0x50000, "cslot1:audiocpu", 0 ) \
ROM_LOAD( name, 0x00000, 0x40000, hash ) \
ROM_RELOAD( 0x10000, 0x40000 ) \
ROM_REGION( 0x10000, "ymsnd", ROMREGION_ERASEFF )
#define NEO_BIOS_AUDIO_512K(name, hash) \
NEOGEO_BIOS \
ROM_REGION( 0x20000, "audiobios", 0 ) \
ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) ) \
ROM_REGION( 0x90000, "cslot1:audiocpu", 0 ) \
ROM_LOAD( name, 0x00000, 0x80000, hash ) \
ROM_RELOAD( 0x10000, 0x80000 ) \
ROM_REGION( 0x10000, "ymsnd", ROMREGION_ERASEFF )
#define NEO_BIOS_AUDIO_ENCRYPTED_128K(name, hash) \
NEOGEO_BIOS \
ROM_REGION( 0x20000, "audiobios", 0 ) \
ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) ) \
ROM_REGION( 0x90000, "cslot1:audiocpu", ROMREGION_ERASEFF ) \
ROM_REGION( 0x80000, "cslot1:audiocrypt", 0 ) \
ROM_LOAD( name, 0x00000, 0x20000, hash ) \
ROM_REGION( 0x10000, "ymsnd", ROMREGION_ERASEFF )
#define NEO_BIOS_AUDIO_ENCRYPTED_256K(name, hash) \
NEOGEO_BIOS \
ROM_REGION( 0x20000, "audiobios", 0 ) \
ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) ) \
ROM_REGION( 0x90000, "cslot1:audiocpu", ROMREGION_ERASEFF ) \
ROM_REGION( 0x80000, "cslot1:audiocrypt", 0 ) \
ROM_LOAD( name, 0x00000, 0x40000, hash ) \
ROM_REGION( 0x10000, "ymsnd", ROMREGION_ERASEFF )
#define NEO_BIOS_AUDIO_ENCRYPTED_512K(name, hash) \
NEOGEO_BIOS \
ROM_REGION( 0x20000, "audiobios", 0 ) \
ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) ) \
ROM_REGION( 0x90000, "cslot1:audiocpu", ROMREGION_ERASEFF ) \
ROM_REGION( 0x80000, "cslot1:audiocrypt", 0 ) \
ROM_LOAD( name, 0x00000, 0x80000, hash ) \
ROM_REGION( 0x10000, "ymsnd", ROMREGION_ERASEFF )
#define NO_DELTAT_REGION
#define NEO_SFIX_64K(name, hash) \
ROM_REGION( 0x20000, "cslot1:fixed", 0 ) \
ROM_LOAD( name, 0x000000, 0x10000, hash ) \
ROM_REGION( 0x20000, "fixedbios", 0 ) \
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) ) \
ROM_Y_ZOOM
#define NEO_SFIX_128K(name, hash) \
ROM_REGION( 0x20000, "cslot1:fixed", 0 ) \
ROM_LOAD( name, 0x000000, 0x20000, hash ) \
ROM_REGION( 0x20000, "fixedbios", 0 ) \
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) ) \
ROM_Y_ZOOM
#define ROM_Y_ZOOM \
ROM_REGION( 0x20000, "zoomy", 0 ) \
ROM_LOAD( "000-lo.lo", 0x00000, 0x20000, CRC(5a86cff2) SHA1(5992277debadeb64d1c1c64b0a92d9293eaf7e4a) )
/* dummy entry for the dummy bios driver */
ROM_START( neogeo )
NEOGEO_BIOS
@ -1810,9 +1994,6 @@ ROM_START( neogeo )
ROM_END
#define ROM_LOAD16_WORD_SWAP_BIOS(bios,name,offset,length,hash) \
ROMX_LOAD(name, offset, length, hash, ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(bios+1)) /* Note '+1' */
ROM_START( aes )
ROM_REGION16_BE( 0x20000, "mainbios", 0 )
ROM_SYSTEM_BIOS( 0, "asia", "Asia AES" )
@ -1851,9 +2032,11 @@ DRIVER_INIT_MEMBER(neogeo_state, neogeo)
}
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT */
CONS( 1990, neogeo, 0, 0, mvs, neogeo_6slot, neogeo_state, neogeo, "SNK", "Neo-Geo", MACHINE_IS_BIOS_ROOT | MACHINE_SUPPORTS_SAVE )
CONS( 1990, aes, 0, 0, aes, aes, driver_device, 0, "SNK", "Neo-Geo AES", MACHINE_SUPPORTS_SAVE )
// Include standalone drivers for the single games
#include "neodriv.inc"

View File

@ -893,21 +893,21 @@ static ADDRESS_MAP_START( neocd_main_map, AS_PROGRAM, 16, ngcd_state )
AM_RANGE(0x300000, 0x300001) AM_MIRROR(0x01fffe) AM_DEVREAD8("ctrl1", neogeo_control_port_device, ctrl_r, 0xff00)
AM_RANGE(0x320000, 0x320001) AM_MIRROR(0x01fffe) AM_READ_PORT("AUDIO") AM_WRITE8(audio_command_w, 0xff00)
AM_RANGE(0x340000, 0x340001) AM_MIRROR(0x01fffe) AM_DEVREAD8("ctrl1", neogeo_control_port_device, ctrl_r, 0xff00)
AM_RANGE(0x360000, 0x37ffff) AM_READ(neogeo_unmapped_r)
AM_RANGE(0x360000, 0x37ffff) AM_READ(unmapped_r)
AM_RANGE(0x380000, 0x380001) AM_MIRROR(0x01fffe) AM_READ(aes_in2_r)
AM_RANGE(0x380000, 0x38007f) AM_MIRROR(0x01ff80) AM_WRITE8(io_control_w, 0x00ff)
AM_RANGE(0x3a0000, 0x3a001f) AM_MIRROR(0x01ffe0) AM_READ(neogeo_unmapped_r) AM_WRITE8(system_control_w, 0x00ff)
AM_RANGE(0x3c0000, 0x3c0007) AM_MIRROR(0x01fff8) AM_READ(neogeo_video_register_r)
AM_RANGE(0x3c0000, 0x3c000f) AM_MIRROR(0x01fff0) AM_WRITE(neogeo_video_register_w)
AM_RANGE(0x3e0000, 0x3fffff) AM_READ(neogeo_unmapped_r)
AM_RANGE(0x400000, 0x401fff) AM_MIRROR(0x3fe000) AM_READWRITE(neogeo_paletteram_r, neogeo_paletteram_w)
AM_RANGE(0x3a0000, 0x3a001f) AM_MIRROR(0x01ffe0) AM_READ(unmapped_r) AM_WRITE8(system_control_w, 0x00ff)
AM_RANGE(0x3c0000, 0x3c0007) AM_MIRROR(0x01fff8) AM_READ(video_register_r)
AM_RANGE(0x3c0000, 0x3c000f) AM_MIRROR(0x01fff0) AM_WRITE(video_register_w)
AM_RANGE(0x3e0000, 0x3fffff) AM_READ(unmapped_r)
AM_RANGE(0x400000, 0x401fff) AM_MIRROR(0x3fe000) AM_READWRITE(paletteram_r, paletteram_w)
AM_RANGE(0x800000, 0x803fff) AM_READWRITE(neocd_memcard_r, neocd_memcard_w)
AM_RANGE(0xc00000, 0xc7ffff) AM_MIRROR(0x080000) AM_ROM AM_REGION("mainbios", 0)
AM_RANGE(0xd00000, 0xdfffff) AM_READ(neogeo_unmapped_r)
AM_RANGE(0xd00000, 0xdfffff) AM_READ(unmapped_r)
AM_RANGE(0xe00000, 0xefffff) AM_READWRITE8(neocd_transfer_r,neocd_transfer_w, 0xffff)
AM_RANGE(0xf00000, 0xfeffff) AM_READ(neogeo_unmapped_r)
AM_RANGE(0xf00000, 0xfeffff) AM_READ(unmapped_r)
AM_RANGE(0xff0000, 0xff01ff) AM_READWRITE(neocd_control_r, neocd_control_w) // CDROM / DMA
AM_RANGE(0xff0200, 0xffffff) AM_READ(neogeo_unmapped_r)
AM_RANGE(0xff0200, 0xffffff) AM_READ(unmapped_r)
ADDRESS_MAP_END

View File

@ -60,6 +60,15 @@ INPUT_PORTS_END
*
*************************************/
#define ROM_Y_ZOOM \
ROM_REGION( 0x20000, "zoomy", 0 ) \
ROM_LOAD( "000-lo.lo", 0x00000, 0x20000, CRC(5a86cff2) SHA1(5992277debadeb64d1c1c64b0a92d9293eaf7e4a) )
#define NO_DELTAT_REGION
/****************************************
ID-2680
. MV-0 ????

View File

@ -67,11 +67,11 @@ public:
DECLARE_READ8_MEMBER(audio_command_r);
DECLARE_READ8_MEMBER(audio_cpu_bank_select_r);
DECLARE_WRITE8_MEMBER(audio_cpu_enable_nmi_w);
DECLARE_READ16_MEMBER(neogeo_unmapped_r);
DECLARE_READ16_MEMBER(neogeo_paletteram_r);
DECLARE_WRITE16_MEMBER(neogeo_paletteram_w);
DECLARE_READ16_MEMBER(neogeo_video_register_r);
DECLARE_WRITE16_MEMBER(neogeo_video_register_w);
DECLARE_READ16_MEMBER(unmapped_r);
DECLARE_READ16_MEMBER(paletteram_r);
DECLARE_WRITE16_MEMBER(paletteram_w);
DECLARE_READ16_MEMBER(video_register_r);
DECLARE_WRITE16_MEMBER(video_register_w);
DECLARE_READ16_MEMBER(in0_r);
DECLARE_READ16_MEMBER(in1_r);
@ -114,26 +114,24 @@ protected:
void update_interrupts();
void create_interrupt_timers();
void start_interrupt_timers();
void neogeo_acknowledge_interrupt(UINT16 data);
void acknowledge_interrupt(UINT16 data);
void neogeo_main_cpu_banking_init();
void neogeo_audio_cpu_banking_init(int set_entry);
void adjust_display_position_interrupt_timer();
void neogeo_set_display_position_interrupt_control(UINT16 data);
void neogeo_set_display_counter_msb(UINT16 data);
void neogeo_set_display_counter_lsb(UINT16 data);
void set_video_control( UINT16 data );
void set_display_position_interrupt_control(UINT16 data);
void set_display_counter_msb(UINT16 data);
void set_display_counter_lsb(UINT16 data);
void set_video_control(UINT16 data);
void create_rgb_lookups();
void set_pens();
void neogeo_set_screen_shadow( int data );
void neogeo_set_palette_bank( int data );
void set_screen_shadow(int data);
void set_palette_bank(int data);
void audio_cpu_check_nmi();
void set_save_ram_unlock( UINT8 data );
void set_outputs( );
void set_output_latch( UINT8 data );
void set_output_data( UINT8 data );
void set_save_ram_unlock(UINT8 data);
void set_outputs();
void set_output_latch(UINT8 data);
void set_output_data(UINT8 data);
// device overrides
virtual void machine_start() override;
@ -234,6 +232,26 @@ protected:
neogeo_cart_slot_device* m_slots[6];
};
class aes_state : public neogeo_state
{
public:
aes_state(const machine_config &mconfig, device_type type, const char *tag)
: neogeo_state(mconfig, type, tag)
, m_io_in2(*this, "IN2")
{}
DECLARE_READ16_MEMBER(aes_in2_r);
DECLARE_INPUT_CHANGED_MEMBER(aes_jp1);
DECLARE_MACHINE_START(aes);
protected:
required_ioport m_io_in2;
};
#include "bus/neogeo/prot_pcm2.h"
#include "bus/neogeo/prot_cmc.h"
#include "bus/neogeo/prot_pvc.h"
@ -276,209 +294,10 @@ class neopcb_state : public neogeo_state
};
class aes_state : public neogeo_state
{
public:
aes_state(const machine_config &mconfig, device_type type, const char *tag)
: neogeo_state(mconfig, type, tag)
, m_io_in2(*this, "IN2")
{ }
DECLARE_READ16_MEMBER(aes_in2_r);
DECLARE_INPUT_CHANGED_MEMBER(aes_jp1);
DECLARE_MACHINE_START(aes);
protected:
required_ioport m_io_in2;
};
/*----------- defined in drivers/neogeo.c -----------*/
MACHINE_CONFIG_EXTERN( neogeo_base );
MACHINE_CONFIG_EXTERN( neogeo_arcade );
INPUT_PORTS_EXTERN(neogeo);
INPUT_PORTS_EXTERN(aes);
ADDRESS_MAP_EXTERN(neogeo_main_map,16);
/*************************************
*
* Neo-Geo bios
*
*************************************
These are the known Bios Roms, Set options.bios to the one you want.
The Universe bios roms are supported because they're now used on enough PCBs
to be considered 'in active arcade use' rather than just homebrew hacks.
Some may be missing, there have been multiple CRCs reported for the same
revision in some cases (the Universe bios has an option for entering / displaying
a serial number; these should be noted as such if they're added).
Universe bios prior to version 1.3 was incompatible with AES.
The 'japan-hotel' BIOS is a dump of an MVS which could be found in some japanese
hotels. it is a custom MVS mobo which uses MVS carts but it hasn't jamma
connector and it's similar to a console with a coin mechanism, so it's a sort
of little coin op console installed in hotels.
The sp-45.sp1 bios is the latest 'ASIA' revision. Japan-j3.bin is the latest 'JAPAN'
revision. Both of them are also used in the sp-4x.sp1 bios of the Jamma PCB boards.
The current Neo-Geo MVS system set (SFIX/SM1/000-LO) used is from a NEO-MVH MV1FS board.
Other boards (MV1xx / MV2x / MV4x /MV6x) other system sets?
Zoom ROM (LO) 128K TC531000CP 1x 128Kx8 Zoom look-up table ROM
Fix ROM (SFIX) 128K 27C1000 1x 128Kx8 Text layer graphics ROM
Sound ROM (SM1) 128K 27C1000/23C1000 1x 128Kx8 Z80 program ROM
*/
#define ROM_LOAD16_WORD_SWAP_BIOS(bios,name,offset,length,hash) \
ROMX_LOAD(name, offset, length, hash, ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(bios+1)) /* Note '+1' */
#define NEOGEO_UNIBIOS(x) \
ROM_SYSTEM_BIOS( x+ 0, "unibios32", "Universe Bios (Hack, Ver. 3.2)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 0, "uni-bios_3_2.rom", 0x00000, 0x020000, CRC(a4e8b9b3) SHA1(c92f18c3f1edda543d264ecd0ea915240e7c8258) ) /* Universe Bios v3.2 (hack) */ \
ROM_SYSTEM_BIOS( x+ 1, "unibios31", "Universe Bios (Hack, Ver. 3.1)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 1, "uni-bios_3_1.rom", 0x00000, 0x020000, CRC(0c58093f) SHA1(29329a3448c2505e1ff45ffa75e61e9693165153) ) /* Universe Bios v3.1 (hack) */ \
ROM_SYSTEM_BIOS( x+ 2, "unibios30", "Universe Bios (Hack, Ver. 3.0)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 2, "uni-bios_3_0.rom", 0x00000, 0x020000, CRC(a97c89a9) SHA1(97a5eff3b119062f10e31ad6f04fe4b90d366e7f) ) /* Universe Bios v3.0 (hack) */ \
ROM_SYSTEM_BIOS( x+ 3, "unibios23", "Universe Bios (Hack, Ver. 2.3)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 3, "uni-bios_2_3.rom", 0x00000, 0x020000, CRC(27664eb5) SHA1(5b02900a3ccf3df168bdcfc98458136fd2b92ac0) ) /* Universe Bios v2.3 (hack) */ \
ROM_SYSTEM_BIOS( x+ 4, "unibios23o", "Universe Bios (Hack, Ver. 2.3, older?)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 4, "uni-bios_2_3o.rom", 0x00000, 0x020000, CRC(601720ae) SHA1(1b8a72c720cdb5ee3f1d735bbcf447b09204b8d9) ) /* Universe Bios v2.3 (hack) alt version, withdrawn? */ \
ROM_SYSTEM_BIOS( x+ 5, "unibios22", "Universe Bios (Hack, Ver. 2.2)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 5, "uni-bios_2_2.rom", 0x00000, 0x020000, CRC(2d50996a) SHA1(5241a4fb0c63b1a23fd1da8efa9c9a9bd3b4279c) ) /* Universe Bios v2.2 (hack) */ \
ROM_SYSTEM_BIOS( x+ 6, "unibios21", "Universe Bios (Hack, Ver. 2.1)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 6, "uni-bios_2_1.rom", 0x00000, 0x020000, CRC(8dabf76b) SHA1(c23732c4491d966cf0373c65c83c7a4e88f0082c) ) /* Universe Bios v2.1 (hack) */ \
ROM_SYSTEM_BIOS( x+ 7, "unibios20", "Universe Bios (Hack, Ver. 2.0)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 7, "uni-bios_2_0.rom", 0x00000, 0x020000, CRC(0c12c2ad) SHA1(37bcd4d30f3892078b46841d895a6eff16dc921e) ) /* Universe Bios v2.0 (hack) */ \
ROM_SYSTEM_BIOS( x+ 8, "unibios13", "Universe Bios (Hack, Ver. 1.3)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 8, "uni-bios_1_3.rom", 0x00000, 0x020000, CRC(b24b44a0) SHA1(eca8851d30557b97c309a0d9f4a9d20e5b14af4e) ) /* Universe Bios v1.3 (hack) */
#define NEOGEO_UNIBIOS_1_2_AND_OLDER(x) \
ROM_SYSTEM_BIOS( x+ 9, "unibios12", "Universe Bios (Hack, Ver. 1.2)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 9, "uni-bios_1_2.rom", 0x00000, 0x020000, CRC(4fa698e9) SHA1(682e13ec1c42beaa2d04473967840c88fd52c75a) ) /* Universe Bios v1.2 (hack) */ \
ROM_SYSTEM_BIOS( x+10, "unibios12o", "Universe Bios (Hack, Ver. 1.2, older)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+10, "uni-bios_1_2o.rom", 0x00000, 0x020000, CRC(e19d3ce9) SHA1(af88ef837f44a3af2d7144bb46a37c8512b67770) ) /* Universe Bios v1.2 (hack) alt version */ \
ROM_SYSTEM_BIOS( x+11, "unibios11", "Universe Bios (Hack, Ver. 1.1)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+11, "uni-bios_1_1.rom", 0x00000, 0x020000, CRC(5dda0d84) SHA1(4153d533c02926a2577e49c32657214781ff29b7) ) /* Universe Bios v1.1 (hack) */ \
ROM_SYSTEM_BIOS( x+12, "unibios10", "Universe Bios (Hack, Ver. 1.0)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+12, "uni-bios_1_0.rom", 0x00000, 0x020000, CRC(0ce453a0) SHA1(3b4c0cd26c176fc6b26c3a2f95143dd478f6abf9) ) /* Universe Bios v1.0 (hack) */
#define NEOGEO_BIOS \
ROM_REGION16_BE( 0x80000, "mainbios", 0 ) \
ROM_SYSTEM_BIOS( 0, "euro", "Europe MVS (Ver. 2)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 0, "sp-s2.sp1", 0x00000, 0x020000, CRC(9036d879) SHA1(4f5ed7105b7128794654ce82b51723e16e389543) ) /* Europe, 1 Slot, has also been found on 2 Slot and 4 Slot (the old hacks were designed for this one) */ \
ROM_SYSTEM_BIOS( 1, "euro-s1", "Europe MVS (Ver. 1)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 1, "sp-s.sp1", 0x00000, 0x020000, CRC(c7f2fa45) SHA1(09576ff20b4d6b365e78e6a5698ea450262697cd) ) /* Europe, 4 Slot */ \
\
ROM_SYSTEM_BIOS( 2, "us", "US MVS (Ver. 2?)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 2, "sp-u2.sp1", 0x00000, 0x020000, CRC(e72943de) SHA1(5c6bba07d2ec8ac95776aa3511109f5e1e2e92eb) ) /* US, 2 Slot */ \
ROM_SYSTEM_BIOS( 3, "us-e", "US MVS (Ver. 1)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 3, "sp-e.sp1", 0x00000, 0x020000, CRC(2723a5b5) SHA1(5dbff7531cf04886cde3ef022fb5ca687573dcb8) ) /* US, 6 Slot (V5?) */ \
ROM_SYSTEM_BIOS( 4, "us-v2", "US MVS (4 slot, Ver 2)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 4, "v2.bin", 0x00000, 0x020000, CRC(62f021f4) SHA1(62d372269e1b3161c64ae21123655a0a22ffd1bb) ) /* US, 4 slot */ \
\
ROM_SYSTEM_BIOS( 5, "asia", "Asia MVS (Ver. 3)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 5, "asia-s3.rom", 0x00000, 0x020000, CRC(91b64be3) SHA1(720a3e20d26818632aedf2c2fd16c54f213543e1) ) /* Asia */ \
\
ROM_SYSTEM_BIOS( 6, "japan", "Japan MVS (Ver. 3)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 6, "vs-bios.rom", 0x00000, 0x020000, CRC(f0e8f27d) SHA1(ecf01eda815909f1facec62abf3594eaa8d11075) ) /* Japan, Ver 6 VS Bios */ \
ROM_SYSTEM_BIOS( 7, "japan-s2", "Japan MVS (Ver. 2)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 7, "sp-j2.sp1", 0x00000, 0x020000, CRC(acede59c) SHA1(b6f97acd282fd7e94d9426078a90f059b5e9dd91) ) /* Japan, Older */ \
ROM_SYSTEM_BIOS( 8, "japan-s1", "Japan MVS (Ver. 1)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 8, "sp1.jipan.1024", 0x00000, 0x020000, CRC(9fb0abe4) SHA1(18a987ce2229df79a8cf6a84f968f0e42ce4e59d) ) /* Japan, Older */ \
ROM_SYSTEM_BIOS( 9, "mv1c", "NEO-MVH MV1C" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 9, "sp-45.sp1", 0x00000, 0x080000, CRC(03cc9f6a) SHA1(cdf1f49e3ff2bac528c21ed28449cf35b7957dc1) ) /* Latest Asia bios */ \
ROM_SYSTEM_BIOS( 10, "japan-j3", "Japan MVS (J3)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 10, "japan-j3.bin", 0x00000, 0x020000, CRC(dff6d41f) SHA1(e92910e20092577a4523a6b39d578a71d4de7085) ) /* Latest Japan bios; correct chip label unknown */ \
ROM_SYSTEM_BIOS( 11, "japan-hotel", "Custom Japanese Hotel" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 11, "sp-1v1_3db8c.bin", 0x00000, 0x020000, CRC(162f0ebe) SHA1(fe1c6dd3dfcf97d960065b1bb46c1e11cb7bf271) ) /* 'rare MVS found in japanese hotels' shows v1.3 in test mode */ \
\
NEOGEO_UNIBIOS(12) \
NEOGEO_UNIBIOS_1_2_AND_OLDER(12)
#define NEO_BIOS_AUDIO_64K(name, hash) \
NEOGEO_BIOS \
ROM_REGION( 0x20000, "audiobios", 0 ) \
ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) ) \
ROM_REGION( 0x20000, "cslot1:audiocpu", 0 ) \
ROM_LOAD( name, 0x00000, 0x10000, hash ) \
ROM_RELOAD( 0x10000, 0x10000 ) \
ROM_REGION( 0x10000, "ymsnd", ROMREGION_ERASEFF )
#define NEO_BIOS_AUDIO_128K(name, hash) \
NEOGEO_BIOS \
ROM_REGION( 0x20000, "audiobios", 0 ) \
ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) ) \
ROM_REGION( 0x30000, "cslot1:audiocpu", 0 ) \
ROM_LOAD( name, 0x00000, 0x20000, hash ) \
ROM_RELOAD( 0x10000, 0x20000 ) \
ROM_REGION( 0x10000, "ymsnd", ROMREGION_ERASEFF )
#define NEO_BIOS_AUDIO_256K(name, hash) \
NEOGEO_BIOS \
ROM_REGION( 0x20000, "audiobios", 0 ) \
ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) ) \
ROM_REGION( 0x50000, "cslot1:audiocpu", 0 ) \
ROM_LOAD( name, 0x00000, 0x40000, hash ) \
ROM_RELOAD( 0x10000, 0x40000 ) \
ROM_REGION( 0x10000, "ymsnd", ROMREGION_ERASEFF )
#define NEO_BIOS_AUDIO_512K(name, hash) \
NEOGEO_BIOS \
ROM_REGION( 0x20000, "audiobios", 0 ) \
ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) ) \
ROM_REGION( 0x90000, "cslot1:audiocpu", 0 ) \
ROM_LOAD( name, 0x00000, 0x80000, hash ) \
ROM_RELOAD( 0x10000, 0x80000 ) \
ROM_REGION( 0x10000, "ymsnd", ROMREGION_ERASEFF )
#define NEO_BIOS_AUDIO_ENCRYPTED_128K(name, hash) \
NEOGEO_BIOS \
ROM_REGION( 0x20000, "audiobios", 0 ) \
ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) ) \
ROM_REGION( 0x90000, "cslot1:audiocpu", ROMREGION_ERASEFF ) \
ROM_REGION( 0x80000, "cslot1:audiocrypt", 0 ) \
ROM_LOAD( name, 0x00000, 0x20000, hash ) \
ROM_REGION( 0x10000, "ymsnd", ROMREGION_ERASEFF )
#define NEO_BIOS_AUDIO_ENCRYPTED_256K(name, hash) \
NEOGEO_BIOS \
ROM_REGION( 0x20000, "audiobios", 0 ) \
ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) ) \
ROM_REGION( 0x90000, "cslot1:audiocpu", ROMREGION_ERASEFF ) \
ROM_REGION( 0x80000, "cslot1:audiocrypt", 0 ) \
ROM_LOAD( name, 0x00000, 0x40000, hash ) \
ROM_REGION( 0x10000, "ymsnd", ROMREGION_ERASEFF )
#define NEO_BIOS_AUDIO_ENCRYPTED_512K(name, hash) \
NEOGEO_BIOS \
ROM_REGION( 0x20000, "audiobios", 0 ) \
ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) ) \
ROM_REGION( 0x90000, "cslot1:audiocpu", ROMREGION_ERASEFF ) \
ROM_REGION( 0x80000, "cslot1:audiocrypt", 0 ) \
ROM_LOAD( name, 0x00000, 0x80000, hash ) \
ROM_REGION( 0x10000, "ymsnd", ROMREGION_ERASEFF )
#define NO_DELTAT_REGION
#define NEO_SFIX_64K(name, hash) \
ROM_REGION( 0x20000, "cslot1:fixed", 0 ) \
ROM_LOAD( name, 0x000000, 0x10000, hash ) \
ROM_REGION( 0x20000, "fixedbios", 0 ) \
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) ) \
ROM_Y_ZOOM
#define NEO_SFIX_128K(name, hash) \
ROM_REGION( 0x20000, "cslot1:fixed", 0 ) \
ROM_LOAD( name, 0x000000, 0x20000, hash ) \
ROM_REGION( 0x20000, "fixedbios", 0 ) \
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) ) \
ROM_Y_ZOOM
#define ROM_Y_ZOOM \
ROM_REGION( 0x20000, "zoomy", 0 ) \
ROM_LOAD( "000-lo.lo", 0x00000, 0x20000, CRC(5a86cff2) SHA1(5992277debadeb64d1c1c64b0a92d9293eaf7e4a) )

View File

@ -1,215 +0,0 @@
// license:BSD-3-Clause
// copyright-holders:Bryan McPhail,Ernesto Corvi,Andrew Prime,Zsolt Vasvari
// thanks-to:Fuzz
/***************************************************************************
Neo-Geo hardware encryption devices
NeoGeo 'C' (Graphics) Rom encryption
CMC42 and CMC50 protection chips
Also contains 'S' (Text Layer) data on these games
M1 (Z80) rom is also encrypted for CMC50
The M1 roms contain some additional data at 0xf800. Some of this
is said to be related to the C rom encryption.
If CMC50 is used, data located at 0xff00 - 0xffff is required for
m1 encryption checksum?.
Later games use additional basic scrambling on top of the standard
CMC scramble.
NeoGeo 'P' Rom Encryption
Used on various games
kof98
- unique early encryption
kof99, garou, garouh, mslug3, kof2000
- complex SMA chip which appears to contain part of the game rom
internally and decrypts the 68k code on the board. Also has a
random number generator and custom bankswitching
(see machine/neoprot.c)
kof2002, matrim, samsho5, samsh5p
- some basic block / bank swapping
svc, kof2003, mslug5
- different scrambling with additional xor
NeoGeo 'V' Rom encryption
NEO-PCM2 chip used on various games
type1 used on pnyaa, rotd, mslug4
type2 used on kof2002, matrim, mslug5, svc,
samsho5, samsh5s, kof2003
***************************************************************************/
#include "emu.h"
#include "includes/neogeo.h"
/* ms5pcb and svcpcb have an additional scramble on top of the standard CMC scrambling */
void neogeo_noslot_state::svcpcb_gfx_decrypt()
{
static const UINT8 xorval[ 4 ] = { 0x34, 0x21, 0xc4, 0xe9 };
int i;
int ofst;
int rom_size = memregion( "sprites" )->bytes();
UINT8 *rom = memregion( "sprites" )->base();
dynamic_buffer buf( rom_size );
for( i = 0; i < rom_size; i++ )
{
rom[ i ] ^= xorval[ (i % 4) ];
}
for( i = 0; i < rom_size; i += 4 )
{
UINT32 rom32 = rom[i] | rom[i+1]<<8 | rom[i+2]<<16 | rom[i+3]<<24;
rom32 = BITSWAP32( rom32, 0x09, 0x0d, 0x13, 0x00, 0x17, 0x0f, 0x03, 0x05, 0x04, 0x0c, 0x11, 0x1e, 0x12, 0x15, 0x0b, 0x06, 0x1b, 0x0a, 0x1a, 0x1c, 0x14, 0x02, 0x0e, 0x1d, 0x18, 0x08, 0x01, 0x10, 0x19, 0x1f, 0x07, 0x16 );
buf[i] = rom32 & 0xff;
buf[i+1] = (rom32>>8) & 0xff;
buf[i+2] = (rom32>>16) & 0xff;
buf[i+3] = (rom32>>24) & 0xff;
}
for( i = 0; i < rom_size / 4; i++ )
{
ofst = BITSWAP24( (i & 0x1fffff), 0x17, 0x16, 0x15, 0x04, 0x0b, 0x0e, 0x08, 0x0c, 0x10, 0x00, 0x0a, 0x13, 0x03, 0x06, 0x02, 0x07, 0x0d, 0x01, 0x11, 0x09, 0x14, 0x0f, 0x12, 0x05 );
ofst ^= 0x0c8923;
ofst += (i & 0xffe00000);
memcpy( &rom[ i * 4 ], &buf[ ofst * 4 ], 0x04 );
}
}
/* and a further swap on the s1 data */
void neogeo_noslot_state::svcpcb_s1data_decrypt()
{
int i;
UINT8 *s1 = memregion( "fixed" )->base();
size_t s1_size = memregion( "fixed" )->bytes();
for( i = 0; i < s1_size; i++ ) // Decrypt S
{
s1[ i ] = BITSWAP8( s1[ i ] ^ 0xd2, 4, 0, 7, 2, 5, 1, 6, 3 );
}
}
/* kf2k3pcb has an additional scramble on top of the standard CMC scrambling */
/* Thanks to Razoola & Halrin for the info */
void neogeo_noslot_state::kf2k3pcb_gfx_decrypt()
{
static const UINT8 xorval[ 4 ] = { 0x34, 0x21, 0xc4, 0xe9 };
int i;
int ofst;
int rom_size = memregion( "sprites" )->bytes();
UINT8 *rom = memregion( "sprites" )->base();
dynamic_buffer buf( rom_size );
for ( i = 0; i < rom_size; i++ )
{
rom[ i ] ^= xorval[ (i % 4) ];
}
for ( i = 0; i < rom_size; i +=4 )
{
UINT32 rom32 = rom[i] | rom[i+1]<<8 | rom[i+2]<<16 | rom[i+3]<<24;
rom32 = BITSWAP32( rom32, 0x09, 0x0d, 0x13, 0x00, 0x17, 0x0f, 0x03, 0x05, 0x04, 0x0c, 0x11, 0x1e, 0x12, 0x15, 0x0b, 0x06, 0x1b, 0x0a, 0x1a, 0x1c, 0x14, 0x02, 0x0e, 0x1d, 0x18, 0x08, 0x01, 0x10, 0x19, 0x1f, 0x07, 0x16 );
buf[i] = rom32 & 0xff;
buf[i+1] = (rom32>>8) & 0xff;
buf[i+2] = (rom32>>16) & 0xff;
buf[i+3] = (rom32>>24) & 0xff;
}
for ( i = 0; i < rom_size; i+=4 )
{
ofst = BITSWAP24( (i & 0x7fffff), 0x17, 0x15, 0x0a, 0x14, 0x13, 0x16, 0x12, 0x11, 0x10, 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00 );
ofst ^= 0x000000;
ofst += (i & 0xff800000);
memcpy( &rom[ ofst ], &buf[ i ], 0x04 );
}
}
/* and a further swap on the s1 data */
void neogeo_noslot_state::kf2k3pcb_decrypt_s1data()
{
UINT8 *src;
UINT8 *dst;
int i;
int tx_size = memregion( "fixed" )->bytes();
int srom_size = memregion( "sprites" )->bytes();
src = memregion( "sprites" )->base() + srom_size - 0x1000000 - 0x80000; // Decrypt S
dst = memregion( "fixed" )->base();
for( i = 0; i < tx_size / 2; i++ )
{
dst[ i ] = src[ (i & ~0x1f) + ((i & 7) << 2) + ((~i & 8) >> 2) + ((i & 0x10) >> 4) ];
}
src = memregion( "sprites" )->base() + srom_size - 0x80000;
dst = memregion( "fixed" )->base() + 0x80000;
for( i = 0; i < tx_size / 2; i++ )
{
dst[ i ] = src[ (i & ~0x1f) + ((i & 7) << 2) + ((~i & 8) >> 2) + ((i & 0x10) >> 4) ];
}
dst = memregion( "fixed" )->base();
for( i = 0; i < tx_size; i++ )
{
dst[ i ] = BITSWAP8( dst[ i ] ^ 0xd2, 4, 0, 7, 2, 5, 1, 6, 3 );
}
}
/***************************************************************************
NeoGeo 'SP1' (BIOS) ROM encryption
***************************************************************************/
/* only found on kf2k3pcb */
void neogeo_noslot_state::kf2k3pcb_sp1_decrypt()
{
static const UINT8 address[0x40] = {
0x04,0x0a,0x04,0x0a,0x04,0x0a,0x04,0x0a,
0x0a,0x04,0x0a,0x04,0x0a,0x04,0x0a,0x04,
0x09,0x07,0x09,0x07,0x09,0x07,0x09,0x07,
0x09,0x09,0x04,0x04,0x09,0x09,0x04,0x04,
0x0b,0x0d,0x0b,0x0d,0x03,0x05,0x03,0x05,
0x0e,0x0e,0x03,0x03,0x0e,0x0e,0x03,0x03,
0x03,0x05,0x0b,0x0d,0x03,0x05,0x0b,0x0d,
0x04,0x00,0x04,0x00,0x0e,0x0a,0x0e,0x0a
};
UINT16 *rom = (UINT16 *)memregion("mainbios")->base();
std::vector<UINT16> buf(0x80000/2);
int i, addr;
for (i = 0; i < 0x80000/2; i++)
{
// address xor
addr = i ^ 0x0020;
if ( i & 0x00020) addr ^= 0x0010;
if (~i & 0x00010) addr ^= 0x0040;
if (~i & 0x00004) addr ^= 0x0080;
if ( i & 0x00200) addr ^= 0x0100;
if (~i & 0x02000) addr ^= 0x0400;
if (~i & 0x10000) addr ^= 0x1000;
if ( i & 0x02000) addr ^= 0x8000;
addr ^= address[((i >> 1) & 0x38) | (i & 7)];
buf[i] = rom[addr];
// data xor
if (buf[i] & 0x0004) buf[i] ^= 0x0001;
if (buf[i] & 0x0010) buf[i] ^= 0x0002;
if (buf[i] & 0x0020) buf[i] ^= 0x0008;
}
memcpy(rom, &buf[0], 0x80000);
}

View File

@ -28292,8 +28292,6 @@ twinbee // GX412 (c) 1985
@source:neogeo.cpp
neogeo // NeoGeo MVS
aes // NeoGeo AES
@source:neogeo_noslot.cpp
2020bb // 0030 (c) 1991 SNK / Pallas
2020bba // 0030 (c) 1991 SNK / Pallas
2020bbh // 0030 (c) 1991 SNK / Pallas
@ -28598,7 +28596,7 @@ nextstc //
acheart //
acheartf // (c) 2006 Examu
@source:ng_aes.cpp
@source:neogeocd.cpp
neocd // NeoGeo CD
neocdz // NeoGeo CDZ
neocdzj //

View File

@ -13,9 +13,6 @@
#define NUM_PENS (0x1000)
/*************************************
*
* Palette handling
@ -74,27 +71,27 @@ void neogeo_state::set_pens()
}
void neogeo_state::neogeo_set_screen_shadow( int data )
void neogeo_state::set_screen_shadow(int data)
{
m_screen_shadow = data;
set_pens();
}
void neogeo_state::neogeo_set_palette_bank( int data )
void neogeo_state::set_palette_bank(int data)
{
m_palette_bank = data ? 0x1000 : 0;
set_pens();
}
READ16_MEMBER(neogeo_state::neogeo_paletteram_r)
READ16_MEMBER(neogeo_state::paletteram_r)
{
return m_paletteram[m_palette_bank + offset];
}
WRITE16_MEMBER(neogeo_state::neogeo_paletteram_w)
WRITE16_MEMBER(neogeo_state::paletteram_w)
{
offset += m_palette_bank;
data = COMBINE_DATA(&m_paletteram[offset]);
@ -181,7 +178,7 @@ UINT32 neogeo_state::screen_update_neogeo(screen_device &screen, bitmap_rgb32 &b
*
*************************************/
UINT16 neogeo_state::get_video_control( )
UINT16 neogeo_state::get_video_control()
{
UINT16 ret;
UINT16 v_counter;
@ -221,24 +218,24 @@ UINT16 neogeo_state::get_video_control( )
}
void neogeo_state::set_video_control( UINT16 data )
void neogeo_state::set_video_control(UINT16 data)
{
if (VERBOSE) logerror("%s: video control write %04x\n", machine().describe_context(), data);
m_sprgen->set_auto_animation_speed(data >> 8);
m_sprgen->set_auto_animation_disabled(data & 0x0008);
neogeo_set_display_position_interrupt_control(data & 0x00f0);
set_display_position_interrupt_control(data & 0x00f0);
}
READ16_MEMBER(neogeo_state::neogeo_video_register_r)
READ16_MEMBER(neogeo_state::video_register_r)
{
UINT16 ret;
/* accessing the LSB only is not mapped */
if (mem_mask == 0x00ff)
ret = neogeo_unmapped_r(space, 0, 0xffff) & 0x00ff;
ret = unmapped_r(space, 0, 0xffff) & 0x00ff;
else
{
switch (offset)
@ -255,7 +252,7 @@ READ16_MEMBER(neogeo_state::neogeo_video_register_r)
}
WRITE16_MEMBER(neogeo_state::neogeo_video_register_w)
WRITE16_MEMBER(neogeo_state::video_register_w)
{
/* accessing the LSB only is not mapped */
if (mem_mask != 0x00ff)
@ -270,9 +267,9 @@ WRITE16_MEMBER(neogeo_state::neogeo_video_register_w)
case 0x01: m_sprgen->set_videoram_data(data); break;
case 0x02: m_sprgen->set_videoram_modulo(data); break;
case 0x03: set_video_control(data); break;
case 0x04: neogeo_set_display_counter_msb(data); break;
case 0x05: neogeo_set_display_counter_lsb(data); break;
case 0x06: neogeo_acknowledge_interrupt(data); break;
case 0x04: set_display_counter_msb(data); break;
case 0x05: set_display_counter_lsb(data); break;
case 0x06: acknowledge_interrupt(data); break;
case 0x07: break; // d0: pause timer for 32 lines when in PAL mode (LSPC2 only)
}
}