mirror of
https://github.com/holub/mame
synced 2025-05-24 23:05:32 +03:00
Optimized PGM video rendering for a speedup in some video heavy cases [David Haywood]
Reinstated the old KOV protection simulation given that the ARM still hasn't been dumped [David Haywood] Added some bootleg sets from FBA, nw
This commit is contained in:
parent
97e7d02034
commit
2de7203e12
@ -194,7 +194,7 @@ bits(7:4) and bit(24)), X, and Y:
|
||||
#define LOG_VBLANK_SWAP (0)
|
||||
#define LOG_FIFO (0)
|
||||
#define LOG_FIFO_VERBOSE (0)
|
||||
#define LOG_REGISTERS (1)
|
||||
#define LOG_REGISTERS (0)
|
||||
#define LOG_WAITS (0)
|
||||
#define LOG_LFB (0)
|
||||
#define LOG_TEXTURE_RAM (0)
|
||||
|
@ -623,7 +623,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( pgm_basic_mem, AS_PROGRAM, 16)
|
||||
AM_IMPORT_FROM(pgm_mem)
|
||||
AM_RANGE(0x100000, 0x2fffff) AM_ROMBANK("bank1") /* Game ROM */
|
||||
AM_RANGE(0x100000, 0x3fffff) AM_ROMBANK("bank1") /* Game ROM */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( killbld_mem, AS_PROGRAM, 16)
|
||||
@ -835,6 +835,19 @@ static INPUT_PORTS_START( sango )
|
||||
PORT_CONFSETTING( 0x0005, DEF_STR( World ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( sango_ch )
|
||||
PORT_INCLUDE ( pgm )
|
||||
|
||||
PORT_MODIFY("Region") /* Region - supplied by protection device */
|
||||
PORT_CONFNAME( 0x000f, 0x0000, DEF_STR( Region ) )
|
||||
PORT_CONFSETTING( 0x0000, DEF_STR( China ) )
|
||||
PORT_CONFSETTING( 0x0001, DEF_STR( Taiwan ) )
|
||||
PORT_CONFSETTING( 0x0002, "Japan (Alta license)" )
|
||||
PORT_CONFSETTING( 0x0003, DEF_STR( Korea ) )
|
||||
PORT_CONFSETTING( 0x0004, DEF_STR( Hong_Kong ) )
|
||||
PORT_CONFSETTING( 0x0005, DEF_STR( World ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( dw3 )
|
||||
PORT_INCLUDE ( pgm )
|
||||
|
||||
@ -1115,7 +1128,7 @@ static MACHINE_RESET( pgm )
|
||||
static MACHINE_RESET( killbld );
|
||||
static MACHINE_RESET( dw3 );
|
||||
static MACHINE_RESET( olds );
|
||||
|
||||
extern MACHINE_RESET( kov );
|
||||
|
||||
MACHINE_CONFIG_FRAGMENT( pgmbase )
|
||||
/* basic machine hardware */
|
||||
@ -1206,6 +1219,13 @@ static MACHINE_CONFIG_DERIVED( kov_disabled_arm, pgm ) // for simulated cases
|
||||
MCFG_DEVICE_DISABLE()
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( kov_simulated_arm, kov_disabled_arm ) // for simulated cases
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_PROGRAM_MAP(kov_map)
|
||||
|
||||
MCFG_MACHINE_RESET(kov)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
/******* ARM 55857F *******/
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( kov2, pgm )
|
||||
@ -2060,6 +2080,7 @@ ROM_START( kovplus )
|
||||
ROM_LOAD( "m0600.rom", 0x400000, 0x400000, CRC(3ada4fd6) SHA1(4c87adb25d31cbd41f04fbffe31f7bc37173da76) )
|
||||
ROM_END
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Sangoku Senki Plus / Knights of Valour Plus (Alt 119 Ver.)
|
||||
@ -2122,6 +2143,91 @@ ROM_START( kovplusa )
|
||||
ROM_LOAD( "m0600.rom", 0x400000, 0x400000, CRC(3ada4fd6) SHA1(4c87adb25d31cbd41f04fbffe31f7bc37173da76) )
|
||||
ROM_END
|
||||
|
||||
|
||||
ROM_START( kovsgqyz )
|
||||
ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
|
||||
PGM_68K_BIOS
|
||||
ROM_LOAD16_WORD_SWAP( "pgm_sgqyz.rom", 0x100000, 0x400000, CRC(18e1eed9) SHA1(db18d9121bb533140957e9c58dbc38211d164b01) )
|
||||
|
||||
ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
|
||||
ROM_LOAD( "kovsgqyz_igs027a.bin", 0x000000, 0x04000, NO_DUMP ) // bootleg is probably a different device
|
||||
|
||||
ROM_REGION( 0xc00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
|
||||
PGM_VIDEO_BIOS
|
||||
ROM_LOAD( "t0600.rom", 0x180000, 0x800000, CRC(4acc1ad6) SHA1(0668dbd5e856c2406910c6b7382548b37c631780) )
|
||||
|
||||
ROM_REGION( 0x2000000, "sprcol", 0 ) /* Sprite Colour Data */
|
||||
ROM_LOAD( "a0600.rom", 0x0000000, 0x0800000, CRC(d8167834) SHA1(fa55a99629d03b2ea253392352f70d2c8639a991) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
|
||||
ROM_LOAD( "a0601.rom", 0x0800000, 0x0800000, CRC(ff7a4373) SHA1(7def9fca7513ad5a117da230bebd2e3c78679041) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
|
||||
ROM_LOAD( "a0602.rom", 0x1000000, 0x0800000, CRC(e7a32959) SHA1(3d0ed684dc5b269238890836b2ce7ef46aa5265b) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
|
||||
ROM_LOAD( "qyza0603.rom", 0x1800000, 0x0800000, CRC(c8b92220) SHA1(4f9c43970d92ac8a8f1563021022797ae8e32012) )
|
||||
|
||||
ROM_REGION( 0x1000000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */
|
||||
ROM_LOAD( "b0600.rom", 0x0000000, 0x0800000, CRC(7d3cd059) SHA1(00cf994b63337e0e4ebe96453daf45f24192af1c) )
|
||||
ROM_LOAD( "qyzb0601.rom", 0x0800000, 0x0800000, CRC(64f55882) SHA1(ab9ac1396587c3d78d06f6ec83cab61d6a9faacd) )
|
||||
|
||||
ROM_REGION( 0x800000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
|
||||
PGM_AUDIO_BIOS
|
||||
ROM_LOAD( "m0600.rom", 0x400000, 0x400000, CRC(3ada4fd6) SHA1(4c87adb25d31cbd41f04fbffe31f7bc37173da76) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( kovsgqyza )
|
||||
ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
|
||||
PGM_68K_BIOS
|
||||
ROM_LOAD16_WORD_SWAP( "pgm_sgqyza.rom", 0x100000, 0x400000, CRC(5a30dcb7) SHA1(64f34faf99a19c0a54899990695129c512d5a3c8) )
|
||||
|
||||
ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
|
||||
ROM_LOAD( "kovsgqyza_igs027a.bin", 0x000000, 0x04000, NO_DUMP ) // bootleg is probably a different device
|
||||
|
||||
ROM_REGION( 0xc00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
|
||||
PGM_VIDEO_BIOS
|
||||
ROM_LOAD( "t0600.rom", 0x180000, 0x800000, CRC(4acc1ad6) SHA1(0668dbd5e856c2406910c6b7382548b37c631780) )
|
||||
|
||||
ROM_REGION( 0x2000000, "sprcol", 0 ) /* Sprite Colour Data */
|
||||
ROM_LOAD( "a0600.rom", 0x0000000, 0x0800000, CRC(d8167834) SHA1(fa55a99629d03b2ea253392352f70d2c8639a991) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
|
||||
ROM_LOAD( "a0601.rom", 0x0800000, 0x0800000, CRC(ff7a4373) SHA1(7def9fca7513ad5a117da230bebd2e3c78679041) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
|
||||
ROM_LOAD( "a0602.rom", 0x1000000, 0x0800000, CRC(e7a32959) SHA1(3d0ed684dc5b269238890836b2ce7ef46aa5265b) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
|
||||
ROM_LOAD( "qyza0603.rom", 0x1800000, 0x0800000, CRC(c8b92220) SHA1(4f9c43970d92ac8a8f1563021022797ae8e32012) )
|
||||
|
||||
ROM_REGION( 0x1000000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */
|
||||
ROM_LOAD( "b0600.rom", 0x0000000, 0x0800000, CRC(7d3cd059) SHA1(00cf994b63337e0e4ebe96453daf45f24192af1c) )
|
||||
ROM_LOAD( "qyzb0601.rom", 0x0800000, 0x0800000, CRC(64f55882) SHA1(ab9ac1396587c3d78d06f6ec83cab61d6a9faacd) )
|
||||
|
||||
ROM_REGION( 0x800000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
|
||||
PGM_AUDIO_BIOS
|
||||
ROM_LOAD( "m0600.rom", 0x400000, 0x400000, CRC(3ada4fd6) SHA1(4c87adb25d31cbd41f04fbffe31f7bc37173da76) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( kovsgqyzb )
|
||||
ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
|
||||
PGM_68K_BIOS
|
||||
ROM_LOAD16_WORD_SWAP( "pgm_sgqyzb.rom", 0x100000, 0x400000, CRC(18b8b9c0) SHA1(f4937aa21cd11af16fb50e7a75c8d4c4ed27c5cf) )
|
||||
|
||||
ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
|
||||
ROM_LOAD( "kovsgqyzb_igs027a.bin", 0x000000, 0x04000, NO_DUMP ) // bootleg is probably a different device
|
||||
|
||||
ROM_REGION( 0xc00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
|
||||
PGM_VIDEO_BIOS
|
||||
ROM_LOAD( "t0600.rom", 0x180000, 0x800000, CRC(4acc1ad6) SHA1(0668dbd5e856c2406910c6b7382548b37c631780) )
|
||||
|
||||
ROM_REGION( 0x2000000, "sprcol", 0 ) /* Sprite Colour Data */
|
||||
ROM_LOAD( "a0600.rom", 0x0000000, 0x0800000, CRC(d8167834) SHA1(fa55a99629d03b2ea253392352f70d2c8639a991) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
|
||||
ROM_LOAD( "a0601.rom", 0x0800000, 0x0800000, CRC(ff7a4373) SHA1(7def9fca7513ad5a117da230bebd2e3c78679041) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
|
||||
ROM_LOAD( "a0602.rom", 0x1000000, 0x0800000, CRC(e7a32959) SHA1(3d0ed684dc5b269238890836b2ce7ef46aa5265b) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
|
||||
ROM_LOAD( "qyza0603.rom", 0x1800000, 0x0800000, CRC(c8b92220) SHA1(4f9c43970d92ac8a8f1563021022797ae8e32012) )
|
||||
|
||||
ROM_REGION( 0x1000000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */
|
||||
ROM_LOAD( "b0600.rom", 0x0000000, 0x0800000, CRC(7d3cd059) SHA1(00cf994b63337e0e4ebe96453daf45f24192af1c) )
|
||||
ROM_LOAD( "qyzb0601.rom", 0x0800000, 0x0800000, CRC(64f55882) SHA1(ab9ac1396587c3d78d06f6ec83cab61d6a9faacd) )
|
||||
|
||||
ROM_REGION( 0x800000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
|
||||
PGM_AUDIO_BIOS
|
||||
ROM_LOAD( "m0600.rom", 0x400000, 0x400000, CRC(3ada4fd6) SHA1(4c87adb25d31cbd41f04fbffe31f7bc37173da76) )
|
||||
ROM_END
|
||||
|
||||
|
||||
|
||||
|
||||
ROM_START( kovsh )
|
||||
ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
|
||||
PGM_68K_BIOS
|
||||
@ -2301,6 +2407,36 @@ ROM_START( kovqhsgs )
|
||||
ROM_IGNORE( 0x400000 ) // c00000-ffffff empty
|
||||
ROM_END
|
||||
|
||||
|
||||
ROM_START( kovlsqh )
|
||||
ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
|
||||
PGM_68K_BIOS
|
||||
ROM_LOAD16_WORD_SWAP( "lsqh_v200cn.rom", 0x100000, 0x400000, CRC(9935a27a) SHA1(3075935293172466c4bd997dcb67f864ae26493e) )
|
||||
|
||||
ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
|
||||
ROM_LOAD( "qhsg_prot.c51", 0x000000, 0x04000, BAD_DUMP CRC(0f09a5c1) SHA1(621b38c05f33277608d58b49822aebc930ae4870) )
|
||||
|
||||
ROM_REGION( 0xc00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
|
||||
PGM_VIDEO_BIOS
|
||||
ROM_LOAD( "lsqh2_t01.rom",0x180000, 0x800000, CRC(d498d97f) SHA1(97a7b6d2ed1170449e7c2899448af7cbbca4c94f) )
|
||||
ROM_IGNORE( 0x800000 ) // second half identical
|
||||
|
||||
ROM_REGION( 0x3000000, "sprcol", 0 ) /* Sprite Colour Data */
|
||||
ROM_LOAD( "lsqh2_a01.rom", 0x0000000, 0x1000000, CRC(25ae3efd) SHA1(083d977602ddb5ad54fbdcba000cd4287de8d463) )
|
||||
ROM_LOAD( "lsqh2_a23.rom", 0x1000000, 0x1000000, CRC(7a779112) SHA1(0a7d36b3715063d8eac629b95a9bb3ecd8e54fca) )
|
||||
ROM_LOAD( "lsqh2_a45.rom", 0x2000000, 0x1000000, CRC(5d7de052) SHA1(7663b6cf09f65c4644661005a38f9aba84a32913) )
|
||||
|
||||
ROM_REGION( 0x1000000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */
|
||||
ROM_LOAD( "lsqh2_b01.rom", 0x0000000, 0x1000000, CRC(df7ca696) SHA1(7af3d27957a39de7e4873867c9972c05af7e7964) )
|
||||
|
||||
ROM_REGION( 0xc00000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
|
||||
PGM_AUDIO_BIOS
|
||||
ROM_LOAD( "lsqh2_m01.rom",0x400000, 0x400000, CRC(01af1b65) SHA1(6cf523fa8f1e03f974771611bb9a4e08a4d4443f) )
|
||||
ROM_IGNORE( 0x400000 ) // 400000-7fffff empty
|
||||
ROM_CONTINUE( 0x800000, 0x400000 )
|
||||
ROM_IGNORE( 0x400000 ) // c00000-ffffff empty
|
||||
ROM_END
|
||||
|
||||
/*
|
||||
|
||||
p0701_v105.u2
|
||||
@ -3084,7 +3220,7 @@ ROM_START( kov2p )
|
||||
ROM_LOAD16_WORD_SWAP( "v204-32m.rom", 0x100000, 0x400000, CRC(583e0650) SHA1(2e5656dd9c6cba9f84af9baa3f5f70cdccf9db47) )
|
||||
|
||||
ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
|
||||
ROM_LOAD( "kov2p_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
|
||||
ROM_LOAD( "kov2p_igs027a.bin", 0x000000, 0x04000, BAD_DUMP CRC(e0d7679f) SHA1(e1c2d127eba4ddbeb8ad173c55b90ac1467e1ca8) ) // NOT for this version, works with a hack
|
||||
|
||||
ROM_REGION32_LE( 0x400000, "user1", 0 ) /* Protection Data (encrypted external ARM data) */
|
||||
ROM_LOAD( "v200-16.rom", 0x000000, 0x200000, CRC(16a0c11f) SHA1(ce449cef76ebd5657d49b57951e2eb0f132e203e) )
|
||||
@ -3115,7 +3251,7 @@ ROM_START( kov2p205 )
|
||||
ROM_LOAD16_WORD_SWAP( "u8-27322.rom", 0x100000, 0x400000, CRC(3a2cc0de) SHA1(d7511478b34bfb03b2fb5b8268b60502d05b9414) )
|
||||
|
||||
ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
|
||||
ROM_LOAD( "kov2p_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
|
||||
ROM_LOAD( "kov2p_igs027a.bin", 0x000000, 0x04000, BAD_DUMP CRC(e0d7679f) SHA1(e1c2d127eba4ddbeb8ad173c55b90ac1467e1ca8) ) // NOT for this version, works with a hack
|
||||
|
||||
ROM_REGION32_LE( 0x400000, "user1", 0 ) /* Protection Data (encrypted external ARM data) */
|
||||
ROM_LOAD( "v200-16.rom", 0x000000, 0x200000, CRC(16a0c11f) SHA1(ce449cef76ebd5657d49b57951e2eb0f132e203e) )
|
||||
@ -4292,6 +4428,15 @@ static DRIVER_INIT( kov )
|
||||
pgm_basic_init(machine);
|
||||
pgm_kov_decrypt(machine);
|
||||
kovsh_latch_init(machine);
|
||||
install_protection_asic_sim_kov(machine);
|
||||
}
|
||||
|
||||
static DRIVER_INIT( kovboot )
|
||||
{
|
||||
pgm_basic_init(machine);
|
||||
// pgm_kov_decrypt(machine);
|
||||
kovsh_latch_init(machine);
|
||||
install_protection_asic_sim_kov(machine);
|
||||
}
|
||||
|
||||
static DRIVER_INIT( pstar )
|
||||
@ -4373,12 +4518,6 @@ static DRIVER_INIT( kov2 )
|
||||
kov2_latch_init(machine);
|
||||
}
|
||||
|
||||
static DRIVER_INIT( kov2p )
|
||||
{
|
||||
pgm_basic_init(machine);
|
||||
pgm_kov2p_decrypt(machine);
|
||||
kov2_latch_init(machine);
|
||||
}
|
||||
|
||||
static DRIVER_INIT( martmast )
|
||||
{
|
||||
@ -5669,6 +5808,35 @@ static DRIVER_INIT( oldsplus )
|
||||
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x4f0000, 0x4fffff, FUNC(oldsplus_protram_r));
|
||||
}
|
||||
|
||||
static DRIVER_INIT( kov2p )
|
||||
{
|
||||
// this hacks the identification of the kov2 rom to return the string required for kov2p
|
||||
// this isn't guaranteed to work properly (and definitely wouldn't on real hardware due to the internal
|
||||
// ROM uploading the encryption table) The internal ROM should be dumped properly.
|
||||
UINT8 *mem8 = (UINT8 *)machine.region("user1")->base();
|
||||
pgm_basic_init(machine);
|
||||
pgm_kov2p_decrypt(machine);
|
||||
kov2_latch_init(machine);
|
||||
mem8[0xDE] = 0xC0;
|
||||
mem8[0xDF] = 0x46;
|
||||
mem8[0x4ED8] = 0xA8;// B0
|
||||
mem8[0x4EDC] = 0x9C;// A4
|
||||
mem8[0x4EE0] = 0x5C;// 64
|
||||
mem8[0x4EE4] = 0x94;// 9C
|
||||
mem8[0x4EE8] = 0xE8;// F0
|
||||
mem8[0x4EEC] = 0x6C;// 74
|
||||
mem8[0x4EF0] = 0xD4;// DC
|
||||
mem8[0x4EF4] = 0x50;// 58
|
||||
mem8[0x4EF8] = 0x80;// 88
|
||||
mem8[0x4EFC] = 0x9C;// A4
|
||||
mem8[0x4F00] = 0x28;// 30
|
||||
mem8[0x4F04] = 0x30;// 38
|
||||
mem8[0x4F08] = 0x34;// 3C
|
||||
mem8[0x4F0C] = 0x1C;// 24
|
||||
mem8[0x1FFFFC] = 0x33;
|
||||
mem8[0x1FFFFD] = 0x99;
|
||||
}
|
||||
|
||||
/*** GAME ********************************************************************/
|
||||
|
||||
GAME( 1997, pgm, 0, pgm, pgm, pgm, ROT0, "IGS", "PGM (Polygame Master) System BIOS", GAME_IS_BIOS_ROOT )
|
||||
@ -5706,6 +5874,9 @@ GAME( 2000, kov2102, kov2, kov2, sango, kov2, ROT0, "IGS
|
||||
GAME( 2000, kov2101, kov2, kov2, sango, kov2, ROT0, "IGS", "Knights of Valour 2 / Sangoku Senki 2 (ver. 101, 101, 100HK)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 11/29/00 11:03:08 V100 (Ext. Arm V100, Int. Arm V100HK)
|
||||
GAME( 2000, kov2100, kov2, kov2, sango, kov2, ROT0, "IGS", "Knights of Valour 2 / Sangoku Senki 2 (ver. 100, 100, 100HK)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 11/29/00 11:03:08 V100 (Ext. Arm V100, Int. Arm V100HK)
|
||||
|
||||
GAME( 2001, kov2p, pgm, kov2, sango, kov2p, ROT0, "IGS", "Knights of Valour 2 Plus - Nine Dragons / Sangoku Senki 2 Plus - Nine Dragons (ver. M204XX)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
GAME( 2001, kov2p205, kov2p, kov2, sango, kov2p, ROT0, "IGS", "Knights of Valour 2 Plus - Nine Dragons / Sangoku Senki 2 Plus - Nine Dragons (ver. M205XX)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
|
||||
GAME( 2001, martmast, pgm, kov2, sango, martmast, ROT0, "IGS", "Martial Masters (ver. 104, 102, 102US)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 68k V104, Ext Arm 102, Int Arm 102US
|
||||
GAME( 2001, martmastc, martmast, kov2, sango, martmast, ROT0, "IGS", "Martial Masters (ver. 104, 102, 101CN)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 68k V104, Ext Arm 102, Int Arm 101CN
|
||||
GAME( 2001, martmastc102, martmast, kov2, sango, martmast, ROT0, "IGS", "Martial Masters (ver. 102, 101, 101CN)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 68k V102, Ext Arm 101, Int Arm 101CN
|
||||
@ -5722,6 +5893,21 @@ GAME( 1998, olds, pgm, olds, olds, olds, ROT0, "IGS
|
||||
GAME( 1998, olds100, olds, olds, olds, olds, ROT0, "IGS", "Oriental Legend Special / Xi You Shi E Zhuan Super (ver. 100)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1998, olds100a, olds, olds, olds, olds, ROT0, "IGS", "Oriental Legend Special / Xi You Shi E Zhuan Super (alt ver. 100)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // crashes on some bosses, high score table etc.
|
||||
|
||||
GAME( 1999, kov, pgm, kov_simulated_arm, sango, kov, ROT0, "IGS", "Knights of Valour / Sangoku Senki (ver. 117)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // V0008 04/27/99 10:33:33
|
||||
GAME( 1999, kov115, kov, kov_simulated_arm, sango, kov, ROT0, "IGS", "Knights of Valour / Sangoku Senki (ver. 115)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // V0006 02/22/99 11:53:18
|
||||
GAME( 1999, kov100, kov, kov_simulated_arm, sango, kov, ROT0, "IGS", "Knights of Valour / Sangoku Senki (ver. 100, Japanese Board)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // V0002 01/31/99 01:54:16
|
||||
|
||||
GAME( 1999, kovplus, pgm, kov_simulated_arm, sango, kov, ROT0, "IGS", "Knights of Valour Plus / Sangoku Senki Plus (ver. 119)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
GAME( 1999, kovplusa, kovplus, kov_simulated_arm, sango, kov, ROT0, "IGS", "Knights of Valour Plus / Sangoku Senki Plus (alt ver. 119)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
|
||||
// modified title screen is only visible for china region, so use that by default. Character select portraits don't seem quite right (different protection?)
|
||||
GAME( 1999, kovsgqyz, kovplus, kov_simulated_arm, sango_ch, kovboot, ROT0, "bootleg", "Knights of Valour: SanGuo QunYingZhuan / Sangoku Senki: SanGuo QunYingZhuan (bootleg, set 1)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
GAME( 1999, kovsgqyza, kovplus, kov_simulated_arm, sango_ch, kovboot, ROT0, "bootleg", "Knights of Valour: SanGuo QunYingZhuan / Sangoku Senki: SanGuo QunYingZhuan (bootleg, set 2)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
GAME( 1999, kovsgqyzb, kovplus, kov_simulated_arm, sango_ch, kovboot, ROT0, "bootleg", "Knights of Valour: SanGuo QunYingZhuan / Sangoku Senki: SanGuo QunYingZhuan (bootleg, set 3)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
|
||||
|
||||
|
||||
|
||||
/* -----------------------------------------------------------------------------------------------------------------------
|
||||
NOT Working (mostly due to needing internal protection roms dumped)
|
||||
-----------------------------------------------------------------------------------------------------------------------*/
|
||||
@ -5733,22 +5919,10 @@ GAME( 1998, drgw3100, drgw3, dw3, dw3, drgw3, ROT0, "IGS
|
||||
|
||||
GAME( 1998, dwex, pgm, dw3, dw3, drgw3, ROT0, "IGS", "Dragon World 3 EX (ver. 100)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
|
||||
|
||||
|
||||
GAME( 1999, kov, pgm, kov_disabled_arm, sango, kov, ROT0, "IGS", "Knights of Valour / Sangoku Senki (ver. 117)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // V0008 04/27/99 10:33:33
|
||||
GAME( 1999, kov115, kov, kov_disabled_arm, sango, kov, ROT0, "IGS", "Knights of Valour / Sangoku Senki (ver. 115)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // V0006 02/22/99 11:53:18
|
||||
GAME( 1999, kov100, kov, kov_disabled_arm, sango, kov, ROT0, "IGS", "Knights of Valour / Sangoku Senki (ver. 100, Japanese Board)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // V0002 01/31/99 01:54:16
|
||||
|
||||
GAME( 1999, kovplus, pgm, kov_disabled_arm, sango, kov, ROT0, "IGS", "Knights of Valour Plus / Sangoku Senki Plus (ver. 119)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
GAME( 1999, kovplusa, kovplus, kov_disabled_arm, sango, kov, ROT0, "IGS", "Knights of Valour Plus / Sangoku Senki Plus (alt ver. 119)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
|
||||
GAME( 1999, puzlstar, pgm, kov_disabled_arm, sango, pstar, ROT0, "IGS", "Puzzle Star (ver. 100MG)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
|
||||
GAME( 2001, py2k2, pgm, kov_disabled_arm, photoy2k, py2k2, ROT0, "IGS", "Photo Y2K 2", GAME_NOT_WORKING ) /* need internal rom of IGS027A */
|
||||
|
||||
|
||||
GAME( 2001, kov2p, pgm, kov2, sango, kov2p, ROT0, "IGS", "Knights of Valour 2 Plus - Nine Dragons / Sangoku Senki 2 Plus - Nine Dragons (ver. M204XX)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
GAME( 2001, kov2p205, kov2p, kov2, sango, kov2p, ROT0, "IGS", "Knights of Valour 2 Plus - Nine Dragons / Sangoku Senki 2 Plus - Nine Dragons (ver. M205XX)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
|
||||
GAME( 2001, ddp2, pgm, kov2_disabled_arm, ddp2, ddp2, ROT270, "IGS", "Bee Storm - DoDonPachi II (ver. 102)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
GAME( 2001, ddp2101, ddp2, kov2_disabled_arm, ddp2, ddp2, ROT270, "IGS", "Bee Storm - DoDonPachi II (ver. 101)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
GAME( 2001, ddp2100, ddp2, kov2_disabled_arm, ddp2, ddp2, ROT270, "IGS", "Bee Storm - DoDonPachi II (ver. 100)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
@ -5769,6 +5943,7 @@ GAME( 2004, oldsplus, pgm, svg_disabled_arm, oldsplus, oldsplu
|
||||
|
||||
GAME( 2004, kovshp, pgm, kov, sango, kovshp, ROT0, "IGS", "Knights of Valour Super Heroes Plus / Sangoku Senki Super Heroes Plus (ver. 100)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
// these bootlegs are clones of this instead
|
||||
GAME( 2004, kovlsqh, kovshp, kov, sango, kovlsqh2, ROT0, "bootleg", "Knights of Valour: Luan Shi Quan Huang / Sangoku Senki: Luan Shi Quan Huang (ver. 200CN)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
GAME( 2004, kovlsqh2, kovshp, kov, sango, kovlsqh2, ROT0, "bootleg", "Knights of Valour: Luan Shi Quan Huang 2 / Sangoku Senki: Luan Shi Quan Huang 2 (ver. 200CN)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
GAME( 2004, kovlsjb, kovshp, kov, sango, kovlsqh2, ROT0, "bootleg", "Knights of Valour: Luan Shi Jie Ba / Sangoku Senki: Luan Shi Jie Ba (ver. 200CN)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
GAME( 2004, kovlsjba, kovshp, kov, sango, kovlsqh2, ROT0, "bootleg", "Knights of Valour: Luan Shi Jie Ba / Sangoku Senki: Luan Shi Jie Ba (alt ver. 200CN)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "emu.h"
|
||||
#include "cpu/arm7/arm7.h"
|
||||
#include "cpu/arm7/arm7core.h"
|
||||
#include "sound/ymz770.h"
|
||||
|
||||
class pgm2_state : public driver_device
|
||||
{
|
||||
@ -57,17 +58,56 @@ static MACHINE_RESET( pgm2 )
|
||||
|
||||
}
|
||||
|
||||
static const gfx_layout tiles8x8_layout =
|
||||
{
|
||||
8,8,
|
||||
RGN_FRAC(1,1),
|
||||
4,
|
||||
{ 0, 1, 2, 3 },
|
||||
{ 4, 0, 12, 8, 20, 16, 28, 24 },
|
||||
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
|
||||
32*8
|
||||
};
|
||||
|
||||
/* slightly odd decode, and ends up with multiple letters in a single 32x32 tile, can probably specify corners, or needs an address line swap before decode */
|
||||
/* actually 7bpp? roms report fixed bits, but should be good dumps */
|
||||
static const gfx_layout tiles32x32x8_layout =
|
||||
{
|
||||
32,32,
|
||||
RGN_FRAC(1,1),
|
||||
8,
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7 },
|
||||
{ 0*8, 2*8, 1*8, 3*8, 4*8, 6*8, 5*8, 7*8, 8*8, 10*8, 9*8, 11*8, 12*8, 14*8, 13*8, 15*8,
|
||||
16*8, 18*8, 17*8, 19*8, 20*8, 22*8, 21*8, 23*8, 24*8, 26*8, 25*8, 27*8, 28*8, 30*8, 29*8, 31*8 },
|
||||
{ 0*256, 1*256, 2*256, 3*256, 4*256, 5*256, 6*256, 7*256, 8*256, 9*256, 10*256, 11*256, 12*256, 13*256, 14*256, 15*256,
|
||||
16*256, 17*256, 18*256, 19*256, 20*256, 21*256, 22*256, 23*256, 24*256, 25*256, 26*256, 27*256, 28*256, 29*256, 30*256, 31*256
|
||||
},
|
||||
256*32
|
||||
};
|
||||
|
||||
|
||||
static GFXDECODE_START( pgm2 )
|
||||
GFXDECODE_ENTRY( "tiles", 0, tiles8x8_layout, 0, 16 )
|
||||
GFXDECODE_ENTRY( "bgtile", 0, tiles32x32x8_layout, 0, 16 )
|
||||
// not tile based
|
||||
GFXDECODE_ENTRY( "spritesa", 0, tiles8x8_layout, 0, 16 )
|
||||
GFXDECODE_ENTRY( "spritesb", 0, tiles8x8_layout, 0, 16 )
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( pgm2, pgm2_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", ARM7, 20000000) // ??
|
||||
MCFG_CPU_ADD("maincpu", ARM7, 20000000) // ?? unknown CPU, has internal ROM.
|
||||
MCFG_CPU_PROGRAM_MAP(pgm2_map)
|
||||
MCFG_DEVICE_DISABLE()
|
||||
|
||||
|
||||
MCFG_MACHINE_START( pgm2 )
|
||||
MCFG_MACHINE_RESET( pgm2 )
|
||||
|
||||
MCFG_GFXDECODE(pgm2)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
@ -81,27 +121,113 @@ static MACHINE_CONFIG_START( pgm2, pgm2_state )
|
||||
MCFG_PALETTE_LENGTH(0x1000)
|
||||
|
||||
MCFG_VIDEO_START(pgm2)
|
||||
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
MCFG_YMZ770_ADD("ymz770", 16384000)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
ROM_START( orleg2 )
|
||||
ROM_REGION( 0x800000, "maincpu", 0 ) /* 68000 Code */
|
||||
ROM_REGION( 0x800000, "maincpu", 0 ) /* External Code (Internal is missing) */
|
||||
ROM_LOAD16_WORD_SWAP( "xyj2_v104cn.u7", 0x000000, 0x800000, CRC(7c24a4f5) SHA1(3cd9f9264ef2aad0869afdf096e88eb8d74b2570) )
|
||||
|
||||
ROM_REGION( 0xc00000, "tiles", ROMREGION_ERASEFF ) /* 8x8 Text Tiles + 32x32 BG Tiles */
|
||||
ROM_REGION( 0x1c00000, "sprcol", ROMREGION_ERASEFF ) /* Sprite Colour Data */
|
||||
ROM_REGION( 0x1000000, "sprmask", ROMREGION_ERASEFF ) /* Sprite Masks + Colour Indexes */
|
||||
ROM_REGION( 0x1000000, "ics", ROMREGION_ERASEFF ) /* Samples - (8 bit mono 11025Hz) - */
|
||||
ROM_REGION( 0x0200000, "tiles", ROMREGION_ERASEFF )
|
||||
ROM_LOAD( "ig-a.u4", 0x000000, 0x0200000, CRC(fa444c32) SHA1(31e5e3efa92d52bf9ab97a0ece51e3b77f52ce8a) )
|
||||
|
||||
ROM_REGION( 0x2000000, "others", 0 )
|
||||
ROM_LOAD16_WORD_SWAP( "ig-a.u26", 0x000000, 0x2000000, CRC(7051d020) SHA1(3d9b24c6fda4c9699bb9f00742e0888059b623e1) )
|
||||
ROM_LOAD16_WORD_SWAP( "ig-a.u35", 0x000000, 0x0800000, CRC(083a8315) SHA1(0dba25e132fbb12faa59ced648c27b881dc73478) )
|
||||
ROM_LOAD16_WORD_SWAP( "ig-a.u36", 0x000000, 0x0800000, CRC(e197221d) SHA1(5574b1e3da4b202db725be906dd868edc2fd4634) )
|
||||
ROM_REGION( 0x1000000, "bgtile", 0 )
|
||||
ROM_LOAD16_BYTE( "ig-a.u35", 0x000000, 0x0800000, CRC(083a8315) SHA1(0dba25e132fbb12faa59ced648c27b881dc73478) )
|
||||
ROM_LOAD16_BYTE( "ig-a.u36", 0x000001, 0x0800000, CRC(e197221d) SHA1(5574b1e3da4b202db725be906dd868edc2fd4634) )
|
||||
|
||||
/* probably sprites - mask data and colour data like PGM1? */
|
||||
ROM_REGION( 0x2000000, "spritesa", 0 )
|
||||
ROM_LOAD( "ig-a.u12", 0x000000, 0x1000000, CRC(113a331c) SHA1(ee6b31bb2b052cc8799573de0d2f0a83f0ab4f6a) )
|
||||
ROM_LOAD( "ig-a.u16", 0x000001, 0x1000000, CRC(fbf411c8) SHA1(5089b5cc9bbf6496ef1367c6255e63e9ab895117) )
|
||||
|
||||
ROM_REGION( 0x4000000, "spritesb", 0 )
|
||||
ROM_LOAD16_BYTE( "ig-a.u18", 0x000000, 0x2000000, CRC(43501fa6) SHA1(58ccce6d393964b771fec3f5c583e3ede57482a3) )
|
||||
ROM_LOAD16_BYTE( "ig-a.u26", 0x000001, 0x2000000, CRC(7051d020) SHA1(3d9b24c6fda4c9699bb9f00742e0888059b623e1) )
|
||||
|
||||
ROM_REGION( 0x1000000, "ymz770", ROMREGION_ERASEFF ) /* ymz770? */
|
||||
ROM_LOAD16_WORD_SWAP( "ig-a.u2", 0x000000, 0x1000000, CRC(8250688c) SHA1(d2488477afc528aeee96826065deba2bce4f0a7d) )
|
||||
ROM_LOAD16_WORD_SWAP( "ig-a.u4", 0x000000, 0x0200000, CRC(fa444c32) SHA1(31e5e3efa92d52bf9ab97a0ece51e3b77f52ce8a) )
|
||||
ROM_LOAD16_WORD_SWAP( "ig-a.u12", 0x000000, 0x1000000, CRC(113a331c) SHA1(ee6b31bb2b052cc8799573de0d2f0a83f0ab4f6a) )
|
||||
ROM_LOAD16_WORD_SWAP( "ig-a.u16", 0x000000, 0x1000000, CRC(fbf411c8) SHA1(5089b5cc9bbf6496ef1367c6255e63e9ab895117) )
|
||||
ROM_LOAD16_WORD_SWAP( "ig-a.u18", 0x000000, 0x2000000, CRC(43501fa6) SHA1(58ccce6d393964b771fec3f5c583e3ede57482a3) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( orleg2o )
|
||||
ROM_REGION( 0x800000, "maincpu", 0 ) /* External Code (Internal is missing) */
|
||||
ROM_LOAD16_WORD_SWAP( "xyj2_v103cn.u7", 0x000000, 0x800000, CRC(21c1fae8) SHA1(36eeb7a5e8dc8ee7c834f3ff1173c28cf6c2f1a3) )
|
||||
|
||||
ROM_REGION( 0x0200000, "tiles", ROMREGION_ERASEFF )
|
||||
ROM_LOAD( "ig-a.u4", 0x000000, 0x0200000, CRC(fa444c32) SHA1(31e5e3efa92d52bf9ab97a0ece51e3b77f52ce8a) )
|
||||
|
||||
ROM_REGION( 0x1000000, "bgtile", 0 )
|
||||
ROM_LOAD16_BYTE( "ig-a.u35", 0x000000, 0x0800000, CRC(083a8315) SHA1(0dba25e132fbb12faa59ced648c27b881dc73478) )
|
||||
ROM_LOAD16_BYTE( "ig-a.u36", 0x000001, 0x0800000, CRC(e197221d) SHA1(5574b1e3da4b202db725be906dd868edc2fd4634) )
|
||||
|
||||
/* probably sprites - mask data and colour data like PGM1? */
|
||||
ROM_REGION( 0x2000000, "spritesa", 0 )
|
||||
ROM_LOAD( "ig-a.u12", 0x000000, 0x1000000, CRC(113a331c) SHA1(ee6b31bb2b052cc8799573de0d2f0a83f0ab4f6a) )
|
||||
ROM_LOAD( "ig-a.u16", 0x000001, 0x1000000, CRC(fbf411c8) SHA1(5089b5cc9bbf6496ef1367c6255e63e9ab895117) )
|
||||
|
||||
ROM_REGION( 0x4000000, "spritesb", 0 )
|
||||
ROM_LOAD16_BYTE( "ig-a.u18", 0x000000, 0x2000000, CRC(43501fa6) SHA1(58ccce6d393964b771fec3f5c583e3ede57482a3) )
|
||||
ROM_LOAD16_BYTE( "ig-a.u26", 0x000001, 0x2000000, CRC(7051d020) SHA1(3d9b24c6fda4c9699bb9f00742e0888059b623e1) )
|
||||
|
||||
ROM_REGION( 0x1000000, "ymz770", ROMREGION_ERASEFF ) /* ymz770? */
|
||||
ROM_LOAD16_WORD_SWAP( "ig-a.u2", 0x000000, 0x1000000, CRC(8250688c) SHA1(d2488477afc528aeee96826065deba2bce4f0a7d) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( kov2nl )
|
||||
ROM_REGION( 0x800000, "maincpu", 0 ) /* External Code (Internal is missing) */
|
||||
ROM_LOAD16_WORD_SWAP( "gsyx_v302cn.u7", 0x000000, 0x800000, CRC(b19cf540) SHA1(25da5804bbfd7ef2cdf5cc5aabaa803d18b98929) )
|
||||
|
||||
ROM_REGION( 0x0200000, "tiles", ROMREGION_ERASEFF )
|
||||
ROM_LOAD( "ig-a3.u4", 0x000000, 0x0200000, CRC(214530ff) SHA1(4231a02054b0345392a077042b95779fd45d6c22) )
|
||||
|
||||
ROM_REGION( 0x1000000, "bgtile", 0 )
|
||||
ROM_LOAD16_BYTE( "ig-a3.u35", 0x000000, 0x0800000, CRC(2d46b1f6) SHA1(ea8c805eda6292e86a642e9633d8fee7054d10b1) )
|
||||
ROM_LOAD16_BYTE( "ig-a3.u36", 0x000001, 0x0800000, CRC(df710c36) SHA1(f826c3f496c4f17b46d18af1d8e02cac7b7027ac) )
|
||||
|
||||
/* probably sprites - mask data and colour data like PGM1? */
|
||||
ROM_REGION( 0x2000000, "spritesa", 0 )
|
||||
ROM_LOAD( "ig-a3.u12", 0x000000, 0x1000000, CRC(0bf63836) SHA1(b8e4f1951f8074b475b795bd7840c5a375b6f5ef) )
|
||||
ROM_LOAD( "ig-a3.u16", 0x000001, 0x1000000, CRC(4a378542) SHA1(5d06a8a8796285a786ebb690c34610f923ef5570) )
|
||||
|
||||
ROM_REGION( 0x4000000, "spritesb", 0 )
|
||||
ROM_LOAD16_BYTE( "ig-a3.u18", 0x000000, 0x2000000, CRC(8d923e1f) SHA1(14371cf385dd8857017d3111cd4710f4291b1ae2) )
|
||||
ROM_LOAD16_BYTE( "ig-a3.u26", 0x000001, 0x2000000, CRC(5b6fbf3f) SHA1(d1f52e230b91ee6cde939d7c2b74da7fd6527e73) )
|
||||
|
||||
ROM_REGION( 0x2000000, "ymz770", ROMREGION_ERASEFF ) /* ymz770? */
|
||||
ROM_LOAD16_WORD_SWAP( "ig-a3.u37", 0x000000, 0x2000000, CRC(45cdf422) SHA1(8005d284bcee73cff37a147fcd1c3e9f039a7203) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( kov2nlo )
|
||||
ROM_REGION( 0x800000, "maincpu", 0 ) /* External Code (Internal is missing) */
|
||||
ROM_LOAD16_WORD_SWAP( "gsyx_v301cn.u7", 0x000000, 0x800000, CRC(c4595c2c) SHA1(09e379556ef76f81a63664f46d3f1415b315f384) )
|
||||
|
||||
ROM_REGION( 0x0200000, "tiles", ROMREGION_ERASEFF )
|
||||
ROM_LOAD( "ig-a3.u4", 0x000000, 0x0200000, CRC(214530ff) SHA1(4231a02054b0345392a077042b95779fd45d6c22) )
|
||||
|
||||
ROM_REGION( 0x1000000, "bgtile", 0 )
|
||||
ROM_LOAD16_BYTE( "ig-a3.u35", 0x000000, 0x0800000, CRC(2d46b1f6) SHA1(ea8c805eda6292e86a642e9633d8fee7054d10b1) )
|
||||
ROM_LOAD16_BYTE( "ig-a3.u36", 0x000001, 0x0800000, CRC(df710c36) SHA1(f826c3f496c4f17b46d18af1d8e02cac7b7027ac) )
|
||||
|
||||
/* probably sprites - mask data and colour data like PGM1? */
|
||||
ROM_REGION( 0x2000000, "spritesa", 0 )
|
||||
ROM_LOAD( "ig-a3.u12", 0x000000, 0x1000000, CRC(0bf63836) SHA1(b8e4f1951f8074b475b795bd7840c5a375b6f5ef) )
|
||||
ROM_LOAD( "ig-a3.u16", 0x000001, 0x1000000, CRC(4a378542) SHA1(5d06a8a8796285a786ebb690c34610f923ef5570) )
|
||||
|
||||
ROM_REGION( 0x4000000, "spritesb", 0 )
|
||||
ROM_LOAD16_BYTE( "ig-a3.u18", 0x000000, 0x2000000, CRC(8d923e1f) SHA1(14371cf385dd8857017d3111cd4710f4291b1ae2) )
|
||||
ROM_LOAD16_BYTE( "ig-a3.u26", 0x000001, 0x2000000, CRC(5b6fbf3f) SHA1(d1f52e230b91ee6cde939d7c2b74da7fd6527e73) )
|
||||
|
||||
ROM_REGION( 0x2000000, "ymz770", ROMREGION_ERASEFF ) /* ymz770? */
|
||||
ROM_LOAD16_WORD_SWAP( "ig-a3.u37", 0x000000, 0x2000000, CRC(45cdf422) SHA1(8005d284bcee73cff37a147fcd1c3e9f039a7203) )
|
||||
ROM_END
|
||||
|
||||
|
||||
/* PGM2 */
|
||||
GAME( 2007, orleg2, 0, pgm2, pgm2, 0, ROT0, "IGS", "Oriental Legend 2", GAME_IS_SKELETON )
|
||||
GAME( 2007, orleg2, 0, pgm2, pgm2, 0, ROT0, "IGS", "Oriental Legend 2 (V104, China)", GAME_IS_SKELETON )
|
||||
GAME( 2007, orleg2o, orleg2, pgm2, pgm2, 0, ROT0, "IGS", "Oriental Legend 2 (V103, China)", GAME_IS_SKELETON )
|
||||
|
||||
GAME( 2008, kov2nl, 0, pgm2, pgm2, 0, ROT0, "IGS", "Knights of Valour 2 New Legend (V302, China)", GAME_IS_SKELETON )
|
||||
GAME( 2008, kov2nlo, kov2nl, pgm2, pgm2, 0, ROT0, "IGS", "Knights of Valour 2 New Legend (V301, China)", GAME_IS_SKELETON )
|
||||
|
@ -88,6 +88,11 @@ public:
|
||||
cpu_device *m_prot;
|
||||
device_t *m_ics;
|
||||
|
||||
/* used by rendering */
|
||||
UINT8 *m_bdata;
|
||||
size_t m_bdatasize;
|
||||
int m_aoffset;
|
||||
int m_boffset;
|
||||
|
||||
/* hack */
|
||||
int m_irq4_disabled;
|
||||
@ -157,6 +162,8 @@ READ16_HANDLER( oldsplus_protram_r );
|
||||
READ16_HANDLER( oldsplus_r );
|
||||
WRITE16_HANDLER( oldsplus_w );
|
||||
|
||||
MACHINE_RESET( kov );
|
||||
void install_protection_asic_sim_kov(running_machine &machine);
|
||||
|
||||
/*----------- defined in video/pgm.c -----------*/
|
||||
|
||||
|
@ -1130,3 +1130,199 @@ WRITE16_HANDLER( oldsplus_w )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Old KOV and bootlegs sim ... really these should be read out... */
|
||||
|
||||
static const UINT8 kov_BATABLE[0x40] = {
|
||||
0x00,0x29,0x2c,0x35,0x3a,0x41,0x4a,0x4e,0x57,0x5e,0x77,0x79,0x7a,0x7b,0x7c,0x7d,
|
||||
0x7e,0x7f,0x80,0x81,0x82,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x90,
|
||||
0x95,0x96,0x97,0x98,0x99,0x9a,0x9b,0x9c,0x9e,0xa3,0xd4,0xa9,0xaf,0xb5,0xbb,0xc1
|
||||
};
|
||||
|
||||
static const UINT8 kov_B0TABLE[16] = { 2, 0, 1, 4, 3 }; // Maps char portraits to tables
|
||||
|
||||
static UINT32 kov_slots[16];
|
||||
static UINT16 kov_internal_slot;
|
||||
static UINT16 kov_key;
|
||||
static UINT32 kov_response;
|
||||
static UINT16 kov_value;
|
||||
|
||||
static UINT16 kov_c0_value;
|
||||
static UINT16 kov_cb_value;
|
||||
static UINT16 kov_fe_value;
|
||||
|
||||
WRITE16_HANDLER( kov_asic_sim_w )
|
||||
{
|
||||
switch ((offset*2) & 0x06)
|
||||
{
|
||||
case 0: kov_value = data; return;
|
||||
|
||||
case 2:
|
||||
{
|
||||
if ((data >> 8) == 0xff) kov_key = 0xffff;
|
||||
|
||||
kov_value ^= kov_key;
|
||||
|
||||
// bprintf (PRINT_NORMAL, _T("ASIC27 command: %2.2x data: %4.4x\n"), (data ^ kov_key) & 0xff, kov_value);
|
||||
|
||||
switch ((data ^ kov_key) & 0xff)
|
||||
{
|
||||
case 0x67: // unknown or status check?
|
||||
case 0x8e:
|
||||
case 0xa3:
|
||||
case 0x33: // kovsgqyz (a3)
|
||||
case 0x3a: // kovplus
|
||||
case 0xc5: // kovplus
|
||||
kov_response = 0x880000;
|
||||
break;
|
||||
|
||||
case 0x99: // Reset
|
||||
kov_response = 0x880000;
|
||||
kov_key = 0;
|
||||
break;
|
||||
|
||||
case 0x9d: // Sprite palette offset
|
||||
kov_response = 0xa00000 + ((kov_value & 0x1f) * 0x40);
|
||||
break;
|
||||
|
||||
case 0xb0: // Read from data table
|
||||
kov_response = kov_B0TABLE[kov_value & 0x0f];
|
||||
break;
|
||||
|
||||
case 0xb4: // Copy slot 'a' to slot 'b'
|
||||
case 0xb7: // kovsgqyz (b4)
|
||||
{
|
||||
kov_response = 0x880000;
|
||||
|
||||
if (kov_value == 0x0102) kov_value = 0x0100; // why?
|
||||
|
||||
kov_slots[(kov_value >> 8) & 0x0f] = kov_slots[(kov_value >> 0) & 0x0f];
|
||||
}
|
||||
break;
|
||||
|
||||
case 0xba: // Read from data table
|
||||
kov_response = kov_BATABLE[kov_value & 0x3f];
|
||||
break;
|
||||
|
||||
case 0xc0: // Text layer 'x' select
|
||||
kov_response = 0x880000;
|
||||
kov_c0_value = kov_value;
|
||||
break;
|
||||
|
||||
case 0xc3: // Text layer offset
|
||||
kov_response = 0x904000 + ((kov_c0_value + (kov_value * 0x40)) * 4);
|
||||
break;
|
||||
|
||||
case 0xcb: // Background layer 'x' select
|
||||
kov_response = 0x880000;
|
||||
kov_cb_value = kov_value;
|
||||
break;
|
||||
|
||||
case 0xcc: // Background layer offset
|
||||
if (kov_value & 0x400) kov_value = -(0x400 - (kov_value & 0x3ff));
|
||||
kov_response = 0x900000 + ((kov_cb_value + (kov_value * 0x40)) * 4);
|
||||
break;
|
||||
|
||||
case 0xd0: // Text palette offset
|
||||
case 0xcd: // kovsgqyz (d0)
|
||||
kov_response = 0xa01000 + (kov_value * 0x20);
|
||||
break;
|
||||
|
||||
case 0xd6: // Copy slot to slot 0
|
||||
kov_response = 0x880000;
|
||||
kov_slots[0] = kov_slots[kov_value & 0x0f];
|
||||
break;
|
||||
|
||||
case 0xdc: // Background palette offset
|
||||
case 0x11: // kovsgqyz (dc)
|
||||
kov_response = 0xa00800 + (kov_value * 0x40);
|
||||
break;
|
||||
|
||||
case 0xe0: // Sprite palette offset
|
||||
case 0x9e: // kovsgqyz (e0)
|
||||
kov_response = 0xa00000 + ((kov_value & 0x1f) * 0x40);
|
||||
break;
|
||||
|
||||
case 0xe5: // Write slot (low)
|
||||
{
|
||||
kov_response = 0x880000;
|
||||
|
||||
INT32 sel = (kov_internal_slot >> 12) & 0x0f;
|
||||
kov_slots[sel] = (kov_slots[sel] & 0x00ff0000) | ((kov_value & 0xffff) << 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0xe7: // Write slot (and slot select) (high)
|
||||
{
|
||||
kov_response = 0x880000;
|
||||
kov_internal_slot = kov_value;
|
||||
|
||||
INT32 sel = (kov_internal_slot >> 12) & 0x0f;
|
||||
kov_slots[sel] = (kov_slots[sel] & 0x0000ffff) | ((kov_value & 0x00ff) << 16);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0xf0: // Some sort of status read?
|
||||
kov_response = 0x00c000;
|
||||
break;
|
||||
|
||||
case 0xf8: // Read slot
|
||||
case 0xab: // kovsgqyz (f8)
|
||||
kov_response = kov_slots[kov_value & 0x0f] & 0x00ffffff;
|
||||
break;
|
||||
|
||||
case 0xfc: // Adjust damage level to char experience level
|
||||
kov_response = (kov_value * kov_fe_value) >> 6;
|
||||
break;
|
||||
|
||||
case 0xfe: // Damage level adjust
|
||||
kov_response = 0x880000;
|
||||
kov_fe_value = kov_value;
|
||||
break;
|
||||
|
||||
default:
|
||||
kov_response = 0x880000;
|
||||
// bprintf (PRINT_NORMAL, _T("Unknown ASIC27 command: %2.2x data: %4.4x\n"), (data ^ kov_key) & 0xff, kov_value);
|
||||
break;
|
||||
}
|
||||
|
||||
kov_key = (kov_key + 0x0100) & 0xff00;
|
||||
if (kov_key == 0xff00) kov_key = 0x0100;
|
||||
kov_key |= kov_key >> 8;
|
||||
}
|
||||
return;
|
||||
|
||||
case 4: return;
|
||||
}
|
||||
}
|
||||
|
||||
READ16_HANDLER( kov_asic_sim_r )
|
||||
{
|
||||
switch ((offset*2) & 0x02)
|
||||
{
|
||||
case 0: return (kov_response >> 0) ^ kov_key;
|
||||
case 2: return (kov_response >> 16) ^ kov_key;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
MACHINE_RESET( kov )
|
||||
{
|
||||
kov_internal_slot = 0;
|
||||
kov_key = 0;
|
||||
kov_response = 0;
|
||||
kov_value = 0;
|
||||
|
||||
kov_c0_value = 0;
|
||||
kov_cb_value = 0;
|
||||
kov_fe_value = 0;
|
||||
|
||||
cputag_set_input_line(machine, "soundcpu", INPUT_LINE_HALT, ASSERT_LINE);
|
||||
}
|
||||
|
||||
void install_protection_asic_sim_kov(running_machine &machine)
|
||||
{
|
||||
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0x500000, 0x500003, FUNC(kov_asic_sim_r), FUNC(kov_asic_sim_w));
|
||||
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x4f0000, 0x4fffff, FUNC(sango_protram_r));
|
||||
}
|
||||
|
@ -8859,11 +8859,15 @@ killbld104 // (c) 1998
|
||||
kov // (c) 1999
|
||||
kovplus // (c) 1999
|
||||
kovplusa // (c) 1999
|
||||
kovsgqyz // bootleg
|
||||
kovsgqyza // bootleg
|
||||
kovsgqyzb // bootleg
|
||||
kov115 // (c) 1999
|
||||
kov100 // (c) 1999
|
||||
kovsh // (c) 1999
|
||||
kovsh103 // (c) 1999
|
||||
kovqhsgs // bootleg
|
||||
kovlsqh // bootleg
|
||||
kovlsqh2 // bootleg
|
||||
kovlsjb // bootleg
|
||||
kovlsjba // bootleg
|
||||
@ -8909,6 +8913,9 @@ ddpdojb // (c) 2002 Cave
|
||||
ddpdojblk // (c) 2002 Cave
|
||||
espgal // (c) 2003 Cave
|
||||
orleg2 // (c) 2007
|
||||
orleg2o //
|
||||
kov2nl // (c) 2008
|
||||
kov2nlo //
|
||||
|
||||
// IGS PC based HW
|
||||
speeddrv // (c) 2004
|
||||
|
@ -4,205 +4,318 @@
|
||||
#include "emu.h"
|
||||
#include "includes/pgm.h"
|
||||
|
||||
/* Sprites - These are a pain! */
|
||||
/******************************************************************************
|
||||
Sprites
|
||||
|
||||
/* this decodes one of the funky sprites to a bitmap so we can draw it more easily -- slow but easier to use*/
|
||||
static void pgm_prepare_sprite( running_machine &machine, int wide, int high, int palt, int boffset )
|
||||
these are fairly complex to render due to the data format, unless you
|
||||
pre-decode the data you have to draw pixels in the order they're decoded from
|
||||
the ROM which becomes quite complex with flipped and zoomed cases
|
||||
******************************************************************************/
|
||||
|
||||
// nothing pri is 0
|
||||
// bg pri is 2
|
||||
// sprite already here is 1 / 3
|
||||
|
||||
INLINE void pgm_draw_pix( int xdrawpos, int pri, UINT16* dest, UINT8* destpri, UINT16 srcdat)
|
||||
{
|
||||
pgm_state *state = machine.driver_data<pgm_state>();
|
||||
UINT8 *bdata = machine.region("sprmask")->base();
|
||||
size_t bdatasize = machine.region("sprmask")->bytes() - 1;
|
||||
UINT8 *adata = state->m_sprite_a_region;
|
||||
size_t adatasize = state->m_sprite_a_region_size - 1;
|
||||
int xcnt, ycnt;
|
||||
|
||||
UINT32 aoffset;
|
||||
UINT16 msk;
|
||||
|
||||
aoffset = (bdata[(boffset + 3) & bdatasize] << 24) | (bdata[(boffset + 2) & bdatasize] << 16) |
|
||||
(bdata[(boffset + 1) & bdatasize] << 8) | (bdata[(boffset + 0) & bdatasize] << 0);
|
||||
aoffset = aoffset >> 2; aoffset *= 3;
|
||||
|
||||
boffset += 4; /* because the first dword is the a data offset */
|
||||
|
||||
for (ycnt = 0 ; ycnt < high ; ycnt++)
|
||||
if ((xdrawpos >= 0) && (xdrawpos < 448))
|
||||
{
|
||||
for (xcnt = 0 ; xcnt < wide ; xcnt++)
|
||||
if (!(destpri[xdrawpos]&1))
|
||||
{
|
||||
int x;
|
||||
|
||||
msk = ((bdata[(boffset + 1) & bdatasize] << 8) |( bdata[(boffset + 0) & bdatasize] << 0));
|
||||
|
||||
for (x = 0; x < 16; x++)
|
||||
if (!pri)
|
||||
{
|
||||
if (!(msk & 0x0001))
|
||||
{
|
||||
state->m_sprite_temp_render[(ycnt * (wide * 16))+(xcnt * 16 + x)] = adata[aoffset & adatasize] + palt * 32;
|
||||
aoffset++;
|
||||
}
|
||||
else
|
||||
{
|
||||
state->m_sprite_temp_render[(ycnt * (wide * 16)) + (xcnt * 16 + x)] = 0x8000;
|
||||
}
|
||||
msk >>= 1;
|
||||
dest[xdrawpos] = srcdat;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(destpri[xdrawpos]&2))
|
||||
{
|
||||
dest[xdrawpos] = srcdat;
|
||||
}
|
||||
}
|
||||
|
||||
boffset += 2;
|
||||
}
|
||||
|
||||
destpri[xdrawpos]|=1;
|
||||
}
|
||||
}
|
||||
|
||||
INLINE void pgm_draw_pix_nopri( int xdrawpos, UINT16* dest, UINT8* destpri, UINT16 srcdat)
|
||||
{
|
||||
if ((xdrawpos >= 0) && (xdrawpos < 448))
|
||||
{
|
||||
if (!(destpri[xdrawpos]&1))
|
||||
{
|
||||
dest[xdrawpos] = srcdat;
|
||||
}
|
||||
destpri[xdrawpos]|=1;
|
||||
}
|
||||
}
|
||||
|
||||
// in the dest bitmap 0x10000 is used to mark 'used pixel' and 0x8000 is used to mark 'high priority'
|
||||
static void draw_sprite_line( running_machine &machine, int wide, UINT32* dest, int xzoom, int xgrow, int yoffset, int flip, int xpos, int pri )
|
||||
INLINE void pgm_draw_pix_pri( int xdrawpos, UINT16* dest, UINT8* destpri, UINT16 srcdat)
|
||||
{
|
||||
if ((xdrawpos >= 0) && (xdrawpos < 448))
|
||||
{
|
||||
if (!(destpri[xdrawpos]&1))
|
||||
{
|
||||
if (!(destpri[xdrawpos]&2))
|
||||
{
|
||||
dest[xdrawpos] = srcdat;
|
||||
}
|
||||
}
|
||||
destpri[xdrawpos]|=1;
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
Full Sprite Renderer
|
||||
for complex zoomed cases
|
||||
*************************************************************************/
|
||||
|
||||
static void draw_sprite_line( running_machine &machine, int wide, UINT16* dest, UINT8* destpri, int xzoom, int xgrow, int flip, int xpos, int pri, int realxsize, int palt, int draw )
|
||||
{
|
||||
pgm_state *state = machine.driver_data<pgm_state>();
|
||||
int xcnt,xcntdraw;
|
||||
int xzoombit;
|
||||
int xoffset;
|
||||
int xoffset = 0;
|
||||
int xdrawpos = 0;
|
||||
|
||||
UINT8 *adata = state->m_sprite_a_region;
|
||||
size_t adatasize = state->m_sprite_a_region_size - 1;
|
||||
|
||||
UINT16 msk;
|
||||
UINT16 srcdat;
|
||||
|
||||
xcnt = 0;
|
||||
xcntdraw = 0;
|
||||
while (xcnt < wide * 16)
|
||||
|
||||
for (xcnt = 0 ; xcnt < wide ; xcnt++)
|
||||
{
|
||||
UINT32 srcdat;
|
||||
if (!(flip & 0x01))
|
||||
xoffset = xcnt;
|
||||
else
|
||||
xoffset = (wide * 16) - xcnt - 1;
|
||||
int x;
|
||||
|
||||
srcdat = state->m_sprite_temp_render[yoffset + xoffset];
|
||||
xzoombit = (xzoom >> (xcnt & 0x1f)) & 1;
|
||||
msk = ((state->m_bdata[(state->m_boffset + 1) & state->m_bdatasize] << 8) |( state->m_bdata[(state->m_boffset + 0) & state->m_bdatasize] << 0));
|
||||
|
||||
if (xzoombit == 1 && xgrow == 1)
|
||||
{ // double this column
|
||||
xdrawpos = xpos + xcntdraw;
|
||||
if (!(srcdat & 0x8000))
|
||||
{
|
||||
if ((xdrawpos >= 0) && (xdrawpos < 448))
|
||||
{
|
||||
if (pri)
|
||||
dest[xdrawpos] = srcdat | 0x8000 | 0x10000;
|
||||
else
|
||||
dest[xdrawpos] = srcdat | 0x10000;
|
||||
}
|
||||
}
|
||||
xcntdraw++;
|
||||
|
||||
xdrawpos = xpos + xcntdraw;
|
||||
|
||||
if (!(srcdat & 0x8000))
|
||||
{
|
||||
if ((xdrawpos >= 0) && (xdrawpos < 448))
|
||||
{
|
||||
if (pri)
|
||||
dest[xdrawpos] = srcdat | 0x8000 | 0x10000;
|
||||
else
|
||||
dest[xdrawpos] = srcdat | 0x10000;
|
||||
}
|
||||
}
|
||||
xcntdraw++;
|
||||
}
|
||||
else if (xzoombit == 1 && xgrow == 0)
|
||||
for (x = 0; x < 16; x++)
|
||||
{
|
||||
/* skip this column */
|
||||
}
|
||||
else //normal column
|
||||
{
|
||||
xdrawpos = xpos + xcntdraw;
|
||||
if (!(srcdat & 0x8000))
|
||||
if (!(msk & 0x0001))
|
||||
{
|
||||
if ((xdrawpos >= 0) && (xdrawpos < 448))
|
||||
srcdat = adata[state->m_aoffset & adatasize] + palt * 32;
|
||||
state->m_aoffset++;
|
||||
|
||||
if (draw)
|
||||
{
|
||||
if (pri)
|
||||
dest[xdrawpos] = srcdat | 0x8000 | 0x10000;
|
||||
else
|
||||
dest[xdrawpos] = srcdat | 0x10000;
|
||||
xzoombit = (xzoom >> (xoffset & 0x1f)) & 1;
|
||||
xoffset++;
|
||||
|
||||
if (xzoombit == 1 && xgrow == 1)
|
||||
{ // double this column
|
||||
|
||||
if (!(flip & 0x01))
|
||||
xdrawpos = xpos + xcntdraw;
|
||||
else
|
||||
xdrawpos = xpos + realxsize - xcntdraw;
|
||||
|
||||
pgm_draw_pix(xdrawpos, pri, dest, destpri, srcdat);
|
||||
|
||||
xcntdraw++;
|
||||
|
||||
if (!(flip & 0x01))
|
||||
xdrawpos = xpos + xcntdraw;
|
||||
else
|
||||
xdrawpos = xpos + realxsize - xcntdraw;
|
||||
|
||||
pgm_draw_pix(xdrawpos, pri, dest, destpri, srcdat);
|
||||
|
||||
xcntdraw++;
|
||||
}
|
||||
else if (xzoombit == 1 && xgrow == 0)
|
||||
{
|
||||
/* skip this column */
|
||||
}
|
||||
else //normal column
|
||||
{
|
||||
if (!(flip & 0x01))
|
||||
xdrawpos = xpos + xcntdraw;
|
||||
else
|
||||
xdrawpos = xpos + realxsize - xcntdraw;
|
||||
|
||||
pgm_draw_pix(xdrawpos, pri, dest, destpri, srcdat);
|
||||
|
||||
xcntdraw++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
xcntdraw++;
|
||||
else
|
||||
{
|
||||
xzoombit = (xzoom >> (xoffset & 0x1f)) & 1;
|
||||
xoffset++;
|
||||
if (xzoombit == 1 && xgrow == 1) { xcntdraw+=2; }
|
||||
else if (xzoombit == 1 && xgrow == 0) { }
|
||||
else { xcntdraw++; }
|
||||
}
|
||||
|
||||
msk >>= 1;
|
||||
|
||||
|
||||
}
|
||||
|
||||
xcnt++;
|
||||
|
||||
if (xdrawpos == 448) xcnt = wide*16;
|
||||
state->m_boffset += 2;
|
||||
}
|
||||
}
|
||||
/* this just loops over our decoded bitmap and puts it on the screen */
|
||||
static void draw_sprite_new_zoomed( running_machine &machine, int wide, int high, int xpos, int ypos, int palt, int boffset, int flip, bitmap_t &bitmap, UINT32 xzoom, int xgrow, UINT32 yzoom, int ygrow, int pri )
|
||||
|
||||
static void draw_sprite_new_zoomed( pgm_state *state, running_machine &machine, int wide, int high, int xpos, int ypos, int palt, int flip, bitmap_t &bitmap, bitmap_t &priority_bitmap, UINT32 xzoom, int xgrow, UINT32 yzoom, int ygrow, int pri )
|
||||
{
|
||||
int ycnt;
|
||||
int ydrawpos;
|
||||
UINT32 *dest;
|
||||
int yoffset;
|
||||
UINT16 *dest;
|
||||
UINT8* destpri;
|
||||
int ycntdraw;
|
||||
int yzoombit;
|
||||
int xzoombit;
|
||||
int xcnt;
|
||||
|
||||
|
||||
state->m_aoffset = (state->m_bdata[(state->m_boffset + 3) & state->m_bdatasize] << 24) | (state->m_bdata[(state->m_boffset + 2) & state->m_bdatasize] << 16) |
|
||||
(state->m_bdata[(state->m_boffset + 1) & state->m_bdatasize] << 8) | (state->m_bdata[(state->m_boffset + 0) & state->m_bdatasize] << 0);
|
||||
state->m_aoffset = state->m_aoffset >> 2; state->m_aoffset *= 3;
|
||||
|
||||
state->m_boffset+=4;
|
||||
|
||||
/* precalculate where drawing will end, for flipped zoomed cases. */
|
||||
/* if we're to avoid pre-decoding the data for each sprite each time we draw then we have to draw the sprite data
|
||||
in the order it is in ROM due to the nature of the compresson scheme. This means drawing upwards from the end point
|
||||
in the case of flipped sprites */
|
||||
ycnt = 0;
|
||||
ycntdraw = 0;
|
||||
int realysize = 0;
|
||||
|
||||
while (ycnt < high)
|
||||
{
|
||||
yzoombit = (yzoom >> (ycnt & 0x1f)) & 1;
|
||||
if (yzoombit == 1 && ygrow == 1) { realysize+=2; }
|
||||
else if (yzoombit == 1 && ygrow == 0) { }
|
||||
else { realysize++; };
|
||||
|
||||
ycnt++;
|
||||
}
|
||||
realysize--;
|
||||
|
||||
int realxsize = 0;
|
||||
|
||||
while (xcnt < wide * 16)
|
||||
{
|
||||
xzoombit = (xzoom >> (xcnt & 0x1f)) & 1;
|
||||
if (xzoombit == 1 && xgrow == 1) { realxsize+=2; }
|
||||
else if (xzoombit == 1 && xgrow == 0) { }
|
||||
else { realxsize++; };
|
||||
|
||||
xcnt++;
|
||||
}
|
||||
realxsize--;
|
||||
|
||||
pgm_prepare_sprite(machine, wide,high, palt, boffset);
|
||||
|
||||
/* now draw it */
|
||||
ycnt = 0;
|
||||
ycntdraw = 0;
|
||||
|
||||
while (ycnt < high)
|
||||
{
|
||||
yzoombit = (yzoom >> (ycnt & 0x1f)) & 1;
|
||||
|
||||
if (yzoombit == 1 && ygrow == 1) // double this line
|
||||
{
|
||||
ydrawpos = ypos + ycntdraw;
|
||||
|
||||
int temp_aoffset = state->m_aoffset;
|
||||
int temp_boffset = state->m_boffset;
|
||||
|
||||
if (!(flip & 0x02))
|
||||
yoffset = (ycnt * (wide * 16));
|
||||
ydrawpos = ypos + ycntdraw;
|
||||
else
|
||||
yoffset = ((high - ycnt - 1) * (wide * 16));
|
||||
ydrawpos = ypos + realysize - ycntdraw;
|
||||
|
||||
if ((ydrawpos >= 0) && (ydrawpos < 224))
|
||||
{
|
||||
dest = &bitmap.pix32(ydrawpos);
|
||||
draw_sprite_line(machine, wide, dest, xzoom, xgrow, yoffset, flip, xpos, pri);
|
||||
dest = &bitmap.pix16(ydrawpos);
|
||||
destpri = &priority_bitmap.pix8(ydrawpos);
|
||||
draw_sprite_line(machine, wide, dest, destpri, xzoom, xgrow, flip, xpos, pri, realxsize, palt, 1);
|
||||
}
|
||||
ycntdraw++;
|
||||
|
||||
ydrawpos = ypos + ycntdraw;
|
||||
if (!(flip & 0x02))
|
||||
yoffset = (ycnt * (wide * 16));
|
||||
else
|
||||
yoffset = ((high - ycnt - 1) * (wide * 16));
|
||||
{
|
||||
draw_sprite_line(machine, wide, NULL, NULL, xzoom, xgrow, flip, xpos, pri, realxsize, palt, 0);
|
||||
}
|
||||
|
||||
ycntdraw++;
|
||||
|
||||
// we need to draw this line again, so restore our pointers to previous values
|
||||
state->m_aoffset = temp_aoffset;
|
||||
state->m_boffset = temp_boffset;
|
||||
|
||||
if (!(flip & 0x02))
|
||||
ydrawpos = ypos + ycntdraw;
|
||||
else
|
||||
ydrawpos = ypos + realysize - ycntdraw;
|
||||
|
||||
if ((ydrawpos >= 0) && (ydrawpos < 224))
|
||||
{
|
||||
dest = &bitmap.pix32(ydrawpos);
|
||||
draw_sprite_line(machine, wide, dest, xzoom, xgrow, yoffset, flip, xpos, pri);
|
||||
dest = &bitmap.pix16(ydrawpos);
|
||||
destpri = &priority_bitmap.pix8(ydrawpos);
|
||||
draw_sprite_line(machine, wide, dest, destpri, xzoom, xgrow, flip, xpos, pri, realxsize, palt, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
draw_sprite_line(machine, wide, NULL, NULL, xzoom, xgrow, flip, xpos, pri, realxsize, palt, 0);
|
||||
|
||||
if (!(flip & 0x02))
|
||||
{
|
||||
if (ydrawpos>224)
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ydrawpos<0)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ycntdraw++;
|
||||
|
||||
if (ydrawpos ==224)
|
||||
ycnt = high;
|
||||
}
|
||||
else if (yzoombit == 1 && ygrow == 0)
|
||||
{
|
||||
/* skip this line */
|
||||
/* we should process anyway if we don't do the pre-decode.. */
|
||||
draw_sprite_line(machine, wide, NULL, NULL, xzoom, xgrow, flip, xpos, pri, realxsize, palt, 0);
|
||||
}
|
||||
else /* normal line */
|
||||
{
|
||||
ydrawpos = ypos + ycntdraw;
|
||||
|
||||
if (!(flip & 0x02))
|
||||
yoffset = (ycnt * (wide * 16));
|
||||
ydrawpos = ypos + ycntdraw;
|
||||
else
|
||||
yoffset = ((high - ycnt - 1) * (wide * 16));
|
||||
ydrawpos = ypos + realysize - ycntdraw;
|
||||
|
||||
if ((ydrawpos >= 0) && (ydrawpos < 224))
|
||||
{
|
||||
dest = &bitmap.pix32(ydrawpos);
|
||||
draw_sprite_line(machine, wide, dest, xzoom, xgrow, yoffset, flip, xpos, pri);
|
||||
dest = &bitmap.pix16(ydrawpos);
|
||||
destpri = &priority_bitmap.pix8(ydrawpos);
|
||||
draw_sprite_line(machine, wide, dest, destpri, xzoom, xgrow, flip, xpos, pri, realxsize, palt, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
draw_sprite_line(machine, wide, NULL, NULL, xzoom, xgrow, flip, xpos, pri, realxsize, palt, 0);
|
||||
|
||||
if (!(flip & 0x02))
|
||||
{
|
||||
if (ydrawpos>224)
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ydrawpos<0)
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
ycntdraw++;
|
||||
|
||||
if (ydrawpos == 224)
|
||||
ycnt = high;
|
||||
ycntdraw++;
|
||||
}
|
||||
|
||||
ycnt++;
|
||||
@ -210,7 +323,170 @@ static void draw_sprite_new_zoomed( running_machine &machine, int wide, int high
|
||||
}
|
||||
|
||||
|
||||
static void draw_sprites( running_machine &machine, bitmap_t& spritebitmap, UINT16 *sprite_source )
|
||||
static void draw_sprite_line_basic( running_machine &machine, int wide, UINT16* dest, UINT8* destpri, int flip, int xpos, int pri, int realxsize, int palt, int draw )
|
||||
{
|
||||
pgm_state *state = machine.driver_data<pgm_state>();
|
||||
int xcnt,xcntdraw;
|
||||
int xoffset = 0;
|
||||
int xdrawpos = 0;
|
||||
UINT8 *adata = state->m_sprite_a_region;
|
||||
size_t adatasize = state->m_sprite_a_region_size - 1;
|
||||
|
||||
UINT16 msk;
|
||||
UINT16 srcdat;
|
||||
|
||||
xcnt = 0;
|
||||
xcntdraw = 0;
|
||||
|
||||
if (!pri)
|
||||
{
|
||||
for (xcnt = 0 ; xcnt < wide ; xcnt++)
|
||||
{
|
||||
int x;
|
||||
|
||||
msk = ((state->m_bdata[(state->m_boffset + 1) & state->m_bdatasize] << 8) |( state->m_bdata[(state->m_boffset + 0) & state->m_bdatasize] << 0));
|
||||
|
||||
for (x = 0; x < 16; x++)
|
||||
{
|
||||
if (!(msk & 0x0001))
|
||||
{
|
||||
srcdat = adata[state->m_aoffset & adatasize] + palt * 32;
|
||||
state->m_aoffset++;
|
||||
|
||||
if (draw)
|
||||
{
|
||||
xoffset++;
|
||||
|
||||
if (!(flip & 0x01))
|
||||
xdrawpos = xpos + xcntdraw;
|
||||
else
|
||||
xdrawpos = xpos + realxsize - xcntdraw;
|
||||
|
||||
pgm_draw_pix_nopri(xdrawpos, dest, destpri, srcdat);
|
||||
|
||||
xcntdraw++;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
xoffset++;
|
||||
xcntdraw++;
|
||||
}
|
||||
|
||||
msk >>= 1;
|
||||
}
|
||||
|
||||
state->m_boffset += 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (xcnt = 0 ; xcnt < wide ; xcnt++)
|
||||
{
|
||||
int x;
|
||||
|
||||
msk = ((state->m_bdata[(state->m_boffset + 1) & state->m_bdatasize] << 8) |( state->m_bdata[(state->m_boffset + 0) & state->m_bdatasize] << 0));
|
||||
|
||||
for (x = 0; x < 16; x++)
|
||||
{
|
||||
if (!(msk & 0x0001))
|
||||
{
|
||||
srcdat = adata[state->m_aoffset & adatasize] + palt * 32;
|
||||
state->m_aoffset++;
|
||||
|
||||
if (draw)
|
||||
{
|
||||
xoffset++;
|
||||
|
||||
if (!(flip & 0x01))
|
||||
xdrawpos = xpos + xcntdraw;
|
||||
else
|
||||
xdrawpos = xpos + realxsize - xcntdraw;
|
||||
|
||||
pgm_draw_pix_pri(xdrawpos, dest, destpri, srcdat);
|
||||
|
||||
xcntdraw++;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
xoffset++;
|
||||
xcntdraw++;
|
||||
}
|
||||
|
||||
msk >>= 1;
|
||||
}
|
||||
|
||||
state->m_boffset += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
Basic Sprite Renderer
|
||||
simplified version for non-zoomed cases, a bit faster
|
||||
*************************************************************************/
|
||||
|
||||
static void draw_sprite_new_basic( pgm_state *state, running_machine &machine, int wide, int high, int xpos, int ypos, int palt, int flip, bitmap_t &bitmap, bitmap_t &priority_bitmap, int pri )
|
||||
{
|
||||
int ycnt;
|
||||
int ydrawpos;
|
||||
UINT16 *dest;
|
||||
UINT8* destpri;
|
||||
int ycntdraw;
|
||||
|
||||
state->m_aoffset = (state->m_bdata[(state->m_boffset + 3) & state->m_bdatasize] << 24) | (state->m_bdata[(state->m_boffset + 2) & state->m_bdatasize] << 16) |
|
||||
(state->m_bdata[(state->m_boffset + 1) & state->m_bdatasize] << 8) | (state->m_bdata[(state->m_boffset + 0) & state->m_bdatasize] << 0);
|
||||
state->m_aoffset = state->m_aoffset >> 2; state->m_aoffset *= 3;
|
||||
|
||||
state->m_boffset+=4;
|
||||
|
||||
int realysize = high-1;
|
||||
int realxsize = (wide * 16)-1;
|
||||
|
||||
/* now draw it */
|
||||
ycnt = 0;
|
||||
ycntdraw = 0;
|
||||
|
||||
while (ycnt < high)
|
||||
{
|
||||
|
||||
if (!(flip & 0x02))
|
||||
ydrawpos = ypos + ycntdraw;
|
||||
else
|
||||
ydrawpos = ypos + realysize - ycntdraw;
|
||||
|
||||
if ((ydrawpos >= 0) && (ydrawpos < 224))
|
||||
{
|
||||
dest = &bitmap.pix16(ydrawpos);
|
||||
destpri = &priority_bitmap.pix8(ydrawpos);
|
||||
draw_sprite_line_basic(machine, wide, dest, destpri, flip, xpos, pri, realxsize, palt, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
draw_sprite_line_basic(machine, wide, NULL, NULL, flip, xpos, pri, realxsize, palt, 0);
|
||||
|
||||
if (!(flip & 0x02))
|
||||
{
|
||||
if (ydrawpos>224)
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ydrawpos<0)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ycntdraw++;
|
||||
ycnt++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void draw_sprites( pgm_state *state, running_machine &machine, bitmap_t& spritebitmap, UINT16 *sprite_source, bitmap_t& priority_bitmap )
|
||||
{
|
||||
/* ZZZZ Zxxx xxxx xxxx
|
||||
zzzz z-yy yyyy yyyy
|
||||
@ -219,11 +495,18 @@ static void draw_sprites( running_machine &machine, bitmap_t& spritebitmap, UINT
|
||||
wwww wwwh hhhh hhhh
|
||||
*/
|
||||
|
||||
|
||||
pgm_state *state = machine.driver_data<pgm_state>();
|
||||
const UINT16 *finish = state->m_spritebufferram + (0xa00 / 2);
|
||||
|
||||
UINT16* start = sprite_source;
|
||||
|
||||
while (sprite_source < finish)
|
||||
{
|
||||
if (!sprite_source[4]) break; /* is this right? */
|
||||
sprite_source += 5;
|
||||
}
|
||||
sprite_source-=5;
|
||||
|
||||
while (sprite_source >= start)
|
||||
{
|
||||
int xpos = sprite_source[0] & 0x07ff;
|
||||
int ypos = sprite_source[1] & 0x03ff;
|
||||
@ -261,13 +544,13 @@ static void draw_sprites( running_machine &machine, bitmap_t& spritebitmap, UINT
|
||||
if (xpos > 0x3ff) xpos -=0x800;
|
||||
if (ypos > 0x1ff) ypos -=0x400;
|
||||
|
||||
if (!sprite_source[4]) break; /* is this right? */
|
||||
|
||||
//if ((priority == 1) && (pri == 0)) break;
|
||||
|
||||
draw_sprite_new_zoomed(machine, wide, high, xpos, ypos, palt, boff, flip, spritebitmap, xzoom, xgrow, yzoom, ygrow, pri);
|
||||
state->m_boffset = boff;
|
||||
if ((!xzoom) && (!yzoom)) draw_sprite_new_basic(state, machine, wide, high, xpos, ypos, palt, flip, spritebitmap, priority_bitmap, pri );
|
||||
else draw_sprite_new_zoomed(state, machine, wide, high, xpos, ypos, palt, flip, spritebitmap, priority_bitmap, xzoom, xgrow, yzoom, ygrow, pri );
|
||||
|
||||
sprite_source += 5;
|
||||
sprite_source -= 5;
|
||||
}
|
||||
}
|
||||
|
||||
@ -339,6 +622,11 @@ VIDEO_START( pgm )
|
||||
pgm_state *state = machine.driver_data<pgm_state>();
|
||||
int i;
|
||||
|
||||
state->m_bdata = machine.region("sprmask")->base();
|
||||
state->m_bdatasize = machine.region("sprmask")->bytes() - 1;
|
||||
state->m_aoffset = 0;
|
||||
state->m_boffset = 0;
|
||||
|
||||
state->m_tx_tilemap = tilemap_create(machine, get_pgm_tx_tilemap_tile_info, tilemap_scan_rows, 8, 8, 64, 32);
|
||||
tilemap_set_transparent_pen(state->m_tx_tilemap, 15);
|
||||
|
||||
@ -346,20 +634,13 @@ VIDEO_START( pgm )
|
||||
tilemap_set_transparent_pen(state->m_bg_tilemap, 31);
|
||||
tilemap_set_scroll_rows(state->m_bg_tilemap, 16 * 32);
|
||||
|
||||
state->m_tmppgmbitmap = auto_bitmap_alloc(machine, 448, 224, BITMAP_FORMAT_RGB32);
|
||||
|
||||
for (i = 0; i < 0x1200 / 2; i++)
|
||||
palette_set_color(machine, i, MAKE_RGB(0, 0, 0));
|
||||
|
||||
state->m_spritebufferram = auto_alloc_array(machine, UINT16, 0xa00/2);
|
||||
|
||||
/* we render each sprite to a bitmap then copy the bitmap to screen bitmap with zooming */
|
||||
/* easier this way because of the funky sprite format */
|
||||
state->m_sprite_temp_render = auto_alloc_array(machine, UINT16, 0x400*0x200);
|
||||
|
||||
state->save_pointer(NAME(state->m_spritebufferram), 0xa00/2);
|
||||
state->save_pointer(NAME(state->m_sprite_temp_render), 0x400*0x200);
|
||||
state->save_item(NAME(*state->m_tmppgmbitmap));
|
||||
}
|
||||
|
||||
SCREEN_UPDATE( pgm )
|
||||
@ -367,55 +648,29 @@ SCREEN_UPDATE( pgm )
|
||||
pgm_state *state = screen.machine().driver_data<pgm_state>();
|
||||
int y;
|
||||
|
||||
bitmap.fill(get_black_pen(screen.machine()), cliprect);
|
||||
state->m_tmppgmbitmap->fill(0x00000000, cliprect);
|
||||
bitmap.fill(0x3ff, cliprect); // ddp2 igs logo needs 0x3ff
|
||||
|
||||
draw_sprites(screen.machine(), *state->m_tmppgmbitmap, state->m_spritebufferram);
|
||||
screen.machine().priority_bitmap.fill(0, cliprect);
|
||||
|
||||
tilemap_set_scrolly(state->m_bg_tilemap,0, state->m_videoregs[0x2000/2]);
|
||||
|
||||
for (y = 0; y < 224; y++)
|
||||
tilemap_set_scrollx(state->m_bg_tilemap, (y + state->m_videoregs[0x2000 / 2]) & 0x1ff, state->m_videoregs[0x3000 / 2] + state->m_rowscrollram[y]);
|
||||
|
||||
{
|
||||
int y, x;
|
||||
|
||||
for (y = 0; y < 224; y++)
|
||||
{
|
||||
UINT32* src = &state->m_tmppgmbitmap->pix32(y);
|
||||
UINT16* dst = &bitmap.pix16(y);
|
||||
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 2);
|
||||
|
||||
for (x = 0; x < 448; x++)
|
||||
{
|
||||
if (src[x] & 0x10000)
|
||||
if ((src[x] & 0x8000) == 0x8000)
|
||||
dst[x] = src[x] & 0x7fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
|
||||
{
|
||||
int y, x;
|
||||
|
||||
for (y = 0; y < 224; y++)
|
||||
{
|
||||
UINT32* src = &state->m_tmppgmbitmap->pix32(y);
|
||||
UINT16* dst = &bitmap.pix16(y);
|
||||
|
||||
for (x = 0; x < 448; x++)
|
||||
{
|
||||
if (src[x] & 0x10000)
|
||||
if ((src[x] & 0x8000) == 0x0000)
|
||||
dst[x] = src[x];
|
||||
}
|
||||
}
|
||||
}
|
||||
draw_sprites(state, screen.machine(), bitmap, state->m_spritebufferram, screen.machine().priority_bitmap);
|
||||
|
||||
tilemap_set_scrolly(state->m_tx_tilemap, 0, state->m_videoregs[0x5000/2]);
|
||||
tilemap_set_scrollx(state->m_tx_tilemap, 0, state->m_videoregs[0x6000/2]); // Check
|
||||
|
||||
|
||||
tilemap_draw(bitmap, cliprect, state->m_tx_tilemap, 0, 0);
|
||||
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
SCREEN_EOF( pgm )
|
||||
|
Loading…
Reference in New Issue
Block a user