Quickly hooked up vram for invqix, nw

This commit is contained in:
Angelo Salese 2012-08-05 14:05:44 +00:00
parent 74367954c6
commit 4c9f548bc6
2 changed files with 49 additions and 25 deletions

View File

@ -62,38 +62,38 @@ One has the secondary label 351100195 with a serial number labeled:
The other has the secondary label 351100210 with a serial number labeled:
S/N: SIURxxxx (xxxx=number of PCB)
SPACE INVADERS U/R
Memory map:
000000-1fffff: program ROM
200000-20ffff: VRAM?
200000-20ffff: Work RAM
400000-400001: ??? (M5296 Watchdog??)
600000-61ffff: work RAM?
600000-61ffff: VRAM
I/O map:
port 2 bit 6: FPGA chip select
port 2 bit 7: FPGA clock in
port 3 bit 0: FPGA status (1 for ready)
port 3 bit 1: FPGA download successful (1 if OK, 0 if failed)
port 3 bit 2: EEPROM chip select
port 3 bit 3: EEPROM clock
port 3 bit 4: EEPROM data to EEPROM
port 3 bit 5: EEPROM data from EEPROM
port 6 bit 3: FPGA data bit in
port G bit 0: framebuffer bank select? toggled each frame
IRQ0 and IRQ1 are valid. Mainline explicitly waits on IRQ1, but IRQ0 does a ton of processing.
No other IRQ vectors are valid.
main loop at 117ea:
117ea: jsr WaitForIRQ1
117ee: jsr ToggleBit0OfPortG
117f2: jsr 11306
117f6: jsr 1918
117fa: bra 117ea
***************************************************************************/
#include "emu.h"
@ -107,7 +107,8 @@ public:
invqix_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_eeprom(*this, "eeprom")
m_eeprom(*this, "eeprom"),
m_vram(*this, "vram")
{ }
UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
@ -126,6 +127,7 @@ protected:
// devices
required_device<cpu_device> m_maincpu;
required_device<eeprom_device> m_eeprom;
required_shared_ptr<UINT16> m_vram;
// driver_device overrides
virtual void video_start();
@ -138,6 +140,28 @@ void invqix_state::video_start()
UINT32 invqix_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
int x,y;
for(y=0;y<256;y++)
{
for(x=0;x<256;x++)
{
UINT8 r,g,b;
int pen_data;
pen_data = (m_vram[x+y*256]);
b = (pen_data & 0x001f);
g = (pen_data & 0x03e0) >> 5;
r = (pen_data & 0x7c00) >> 10;
r = (r << 3) | (r & 0x7);
g = (g << 3) | (g & 0x7);
b = (b << 3) | (b & 0x7);
if(cliprect.contains(x, y))
bitmap.pix32(y, x) = r << 16 | g << 8 | b;
}
}
return 0;
}
@ -186,7 +210,7 @@ READ8_MEMBER(invqix_state::porta_r)
static ADDRESS_MAP_START(invqix_prg_map, AS_PROGRAM, 32, invqix_state)
AM_RANGE(0x000000, 0x1fffff) AM_ROM AM_REGION("program", 0)
AM_RANGE(0x200000, 0x20ffff) AM_RAM
AM_RANGE(0x600000, 0x61ffff) AM_RAM
AM_RANGE(0x600000, 0x61ffff) AM_RAM AM_SHARE("vram")
ADDRESS_MAP_END
static ADDRESS_MAP_START(invqix_io_map, AS_IO, 8, invqix_state)
@ -206,14 +230,14 @@ static MACHINE_CONFIG_START( invqix, invqix_state )
MCFG_CPU_PROGRAM_MAP(invqix_prg_map)
MCFG_CPU_IO_MAP(invqix_io_map)
MCFG_CPU_VBLANK_INT("screen", irq1_line_hold)
MCFG_CPU_PERIODIC_INT(irq0_line_hold, 60)
MCFG_CPU_PERIODIC_INT(irq0_line_hold, 60)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_UPDATE_DRIVER(invqix_state, screen_update)
MCFG_SCREEN_SIZE(640, 480)
MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 479)
MCFG_SCREEN_VISIBLE_AREA(0, 256, 0, 240)
MCFG_PALETTE_LENGTH(65536)
@ -229,13 +253,13 @@ MACHINE_CONFIG_END
ROM_START( invqix )
ROM_REGION(0x200000, "program", 0)
ROM_LOAD( "f34-02.ic2", 0x000000, 0x200000, CRC(035ace40) SHA1(e61f180024102c7a136b1c7f974c71e5dc698a1e) )
ROM_LOAD( "f34-02.ic2", 0x000000, 0x200000, CRC(035ace40) SHA1(e61f180024102c7a136b1c7f974c71e5dc698a1e) )
ROM_REGION(0x1000000, "oki", 0)
ROM_LOAD( "f34-01.ic13", 0x000000, 0x200000, CRC(7b055722) SHA1(8152bf04a58de15aefc4244e40733275e21818e1) )
ROM_LOAD( "f34-01.ic13", 0x000000, 0x200000, CRC(7b055722) SHA1(8152bf04a58de15aefc4244e40733275e21818e1) )
ROM_REGION(0x80, "eeprom", 0)
ROM_LOAD16_WORD_SWAP( "93c46.ic6", 0x000000, 0x000080, CRC(564b744e) SHA1(4d9ea7dc253797c513258d07a936dfb63d8ed18c) )
ROM_LOAD16_WORD_SWAP( "93c46.ic6", 0x000000, 0x000080, CRC(564b744e) SHA1(4d9ea7dc253797c513258d07a936dfb63d8ed18c) )
ROM_END
GAME(2003, invqix, 0, invqix, invqix, invqix_state, 0, ROT0, "Namco/Taito", "Space Invaders / Qix Silver Anniversary Edition (Ver. 2.03)", GAME_NOT_WORKING )
GAME(2003, invqix, 0, invqix, invqix, invqix_state, 0, ROT270, "Namco/Taito", "Space Invaders / Qix Silver Anniversary Edition (Ver. 2.03)", GAME_NOT_WORKING )

View File

@ -3681,9 +3681,9 @@ static void stdragona_gfx_unmangle(running_machine &machine, const char *region)
static DRIVER_INIT( 64street )
{
megasys1_state *state = machine.driver_data<megasys1_state>();
// UINT16 *RAM = (UINT16 *) state->memregion("maincpu")->base();
// RAM[0x006b8/2] = 0x6004; // d8001 test
// RAM[0x10EDE/2] = 0x6012; // watchdog
// UINT16 *ROM = (UINT16 *) state->memregion("maincpu")->base();
// ROM[0x006b8/2] = 0x6004; // d8001 test
// ROM[0x10EDE/2] = 0x6012; // watchdog
state->m_ip_select_values[0] = 0x57;
state->m_ip_select_values[1] = 0x53;
@ -3867,16 +3867,16 @@ WRITE16_MEMBER(megasys1_state::iganinju_mcu_hs_w)
static DRIVER_INIT( iganinju )
{
//UINT16 *RAM;
//UINT16 *ROM;
phantasm_rom_decode(machine, "maincpu");
//RAM = (UINT16 *) machine.root_device().memregion("maincpu")->base();
//ROM = (UINT16 *) machine.root_device().memregion("maincpu")->base();
megasys1_state *state = machine.driver_data<megasys1_state>();
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler(0x00000, 0x3ffff, read16_delegate(FUNC(megasys1_state::iganinju_mcu_hs_r),state));
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_write_handler(0x2f000, 0x2f009, write16_delegate(FUNC(megasys1_state::iganinju_mcu_hs_w),state));
//RAM[0x00006e/2] = 0x0420; // the only game that does
//ROM[0x00006e/2] = 0x0420; // the only game that does
// not like lev 3 interrupts
}
@ -3895,7 +3895,7 @@ WRITE16_MEMBER(megasys1_state::okim6295_both_2_w)
static DRIVER_INIT( jitsupro )
{
//UINT16 *RAM = (UINT16 *) machine.root_device().memregion("maincpu")->base();
//UINT16 *ROM = (UINT16 *) machine.root_device().memregion("maincpu")->base();
astyanax_rom_decode(machine, "maincpu"); // Code