mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
Added PR-8210 support to the ldplayer. Fixed step forward command on the PR-8210.
02136: cubeqst: from minimal UI cubeqst requires the optional CHD 02127: xymg: The game name should be Xing Yun Man Guan and "Pin Yin:"should be omitted 02138: flamegun: Debugger/Cheat System upper case cpu tag of MAIN doesn't work 02139: In audio/system16.c, there is a reference to REGION_SOUND1 02133: chindrah: The title of Zhong Guo Long?(Hong Kong,V011H) is Dong Fang Zhi Zhu(Hong Kong, V011H) 02126: corrupt CHDs are reported as missing
This commit is contained in:
parent
ba5fd30bf8
commit
7521888dd7
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1169,7 +1169,6 @@ src/mame/audio/sprint4.h svneol=native#text/plain
|
||||
src/mame/audio/starwars.c svneol=native#text/plain
|
||||
src/mame/audio/subs.c svneol=native#text/plain
|
||||
src/mame/audio/suna8.c svneol=native#text/plain
|
||||
src/mame/audio/system16.c svneol=native#text/plain
|
||||
src/mame/audio/t5182.c svneol=native#text/plain
|
||||
src/mame/audio/t5182.h svneol=native#text/plain
|
||||
src/mame/audio/taito_en.c svneol=native#text/plain
|
||||
|
@ -437,6 +437,10 @@ static int audit_one_disk(core_options *options, const rom_entry *rom, const gam
|
||||
else if (hash_data_has_info(record->exphash, HASH_INFO_NO_DUMP))
|
||||
set_status(record, AUDIT_STATUS_NOT_FOUND, SUBSTATUS_NOT_FOUND_NODUMP);
|
||||
|
||||
/* not found but optional */
|
||||
else if (DISK_ISOPTIONAL(rom))
|
||||
set_status(record, AUDIT_STATUS_NOT_FOUND, SUBSTATUS_NOT_FOUND_OPTIONAL);
|
||||
|
||||
/* not found at all */
|
||||
else
|
||||
set_status(record, AUDIT_STATUS_NOT_FOUND, SUBSTATUS_NOT_FOUND);
|
||||
|
@ -2132,6 +2132,23 @@ UINT64 debug_read_opcode(offs_t address, int size, int arg)
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
expression_cpu_index - return the CPU index
|
||||
based on a case insensitive tag search
|
||||
-------------------------------------------------*/
|
||||
|
||||
static int expression_cpu_index(running_machine *machine, const char *tag)
|
||||
{
|
||||
int index;
|
||||
|
||||
for (index = 0; index < ARRAY_LENGTH(machine->config->cpu); index++)
|
||||
if (machine->config->cpu[index].tag != NULL && mame_stricmp(machine->config->cpu[index].tag, tag) == 0)
|
||||
return index;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
expression_read_memory - read 1,2,4 or 8 bytes
|
||||
at the given offset in the given address
|
||||
@ -2147,14 +2164,14 @@ static UINT64 expression_read_memory(const char *name, int space, UINT32 address
|
||||
case EXPSPACE_PROGRAM:
|
||||
case EXPSPACE_DATA:
|
||||
case EXPSPACE_IO:
|
||||
cpuindex = (name != NULL) ? mame_find_cpu_index(Machine, name) : cpu_getactivecpu();
|
||||
cpuindex = (name != NULL) ? expression_cpu_index(Machine, name) : cpu_getactivecpu();
|
||||
if (cpuindex < 0)
|
||||
break;
|
||||
return expression_read_address_space(cpuindex, ADDRESS_SPACE_PROGRAM + (space - EXPSPACE_PROGRAM), address, size);
|
||||
|
||||
case EXPSPACE_OPCODE:
|
||||
case EXPSPACE_RAMWRITE:
|
||||
cpuindex = (name != NULL) ? mame_find_cpu_index(Machine, name) : cpu_getactivecpu();
|
||||
cpuindex = (name != NULL) ? expression_cpu_index(Machine, name) : cpu_getactivecpu();
|
||||
if (cpuindex < 0)
|
||||
break;
|
||||
if (name == NULL)
|
||||
@ -2356,7 +2373,7 @@ static void expression_write_memory(const char *name, int space, UINT32 address,
|
||||
case EXPSPACE_PROGRAM:
|
||||
case EXPSPACE_DATA:
|
||||
case EXPSPACE_IO:
|
||||
cpuindex = (name != NULL) ? mame_find_cpu_index(Machine, name) : cpu_getactivecpu();
|
||||
cpuindex = (name != NULL) ? expression_cpu_index(Machine, name) : cpu_getactivecpu();
|
||||
if (cpuindex < 0)
|
||||
break;
|
||||
expression_write_address_space(cpuindex, ADDRESS_SPACE_PROGRAM + (space - EXPSPACE_PROGRAM), address, size, data);
|
||||
@ -2364,7 +2381,7 @@ static void expression_write_memory(const char *name, int space, UINT32 address,
|
||||
|
||||
case EXPSPACE_OPCODE:
|
||||
case EXPSPACE_RAMWRITE:
|
||||
cpuindex = (name != NULL) ? mame_find_cpu_index(Machine, name) : cpu_getactivecpu();
|
||||
cpuindex = (name != NULL) ? expression_cpu_index(Machine, name) : cpu_getactivecpu();
|
||||
if (cpuindex < 0)
|
||||
break;
|
||||
expression_write_program_direct(cpuindex, (space == EXPSPACE_OPCODE), address, size, data);
|
||||
@ -2589,7 +2606,7 @@ static EXPRERR expression_validate(const char *name, int space)
|
||||
case EXPSPACE_PROGRAM:
|
||||
case EXPSPACE_DATA:
|
||||
case EXPSPACE_IO:
|
||||
cpuindex = (name != NULL) ? mame_find_cpu_index(Machine, name) : cpu_getactivecpu();
|
||||
cpuindex = (name != NULL) ? expression_cpu_index(Machine, name) : cpu_getactivecpu();
|
||||
if (cpuindex < 0)
|
||||
return (name == NULL) ? EXPRERR_MISSING_MEMORY_NAME : EXPRERR_INVALID_MEMORY_NAME;
|
||||
if (cpunum_addrbus_width(cpuindex, ADDRESS_SPACE_PROGRAM + (space - EXPSPACE_PROGRAM)) == 0)
|
||||
@ -2598,7 +2615,7 @@ static EXPRERR expression_validate(const char *name, int space)
|
||||
|
||||
case EXPSPACE_OPCODE:
|
||||
case EXPSPACE_RAMWRITE:
|
||||
cpuindex = (name != NULL) ? mame_find_cpu_index(Machine, name) : cpu_getactivecpu();
|
||||
cpuindex = (name != NULL) ? expression_cpu_index(Machine, name) : cpu_getactivecpu();
|
||||
if (cpuindex < 0)
|
||||
return (name == NULL) ? EXPRERR_MISSING_MEMORY_NAME : EXPRERR_INVALID_MEMORY_NAME;
|
||||
break;
|
||||
|
@ -2602,9 +2602,12 @@ static void pr8210_command(laserdisc_state *ld)
|
||||
break;
|
||||
|
||||
case 0x04: CMDPRINTF(("pr8210: Step forward\n"));
|
||||
/* step forward */
|
||||
/* step forward one frame */
|
||||
if (laserdisc_ready(ld))
|
||||
set_state(ld, LASERDISC_STEPPING_FORWARD, PR8210_STEP_SPEED, NULL_TARGET_FRAME);
|
||||
{
|
||||
set_state(ld, LASERDISC_STEPPING_FORWARD, STOP_SPEED, NULL_TARGET_FRAME);
|
||||
add_to_current_track(ld, ONE_TRACK);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x06 : CMDPRINTF(("pr8210: Chapter\n"));
|
||||
|
@ -1004,10 +1004,10 @@ static void process_disk_entries(rom_load_data *romdata, const char *regiontag,
|
||||
err = open_disk_image(Machine->gamedrv, romp, &chd.origfile, &chd.origchd);
|
||||
if (err != CHDERR_NONE)
|
||||
{
|
||||
if (err == CHDERR_UNSUPPORTED_VERSION)
|
||||
sprintf(&romdata->errorbuf[strlen(romdata->errorbuf)], "%s UNSUPPORTED CHD VERSION\n", astring_c(filename));
|
||||
else
|
||||
if (err == CHDERR_FILE_NOT_FOUND)
|
||||
sprintf(&romdata->errorbuf[strlen(romdata->errorbuf)], "%s NOT FOUND\n", astring_c(filename));
|
||||
else
|
||||
sprintf(&romdata->errorbuf[strlen(romdata->errorbuf)], "%s CHD ERROR: %s\n", astring_c(filename), chd_error_string(err));
|
||||
|
||||
/* if this is NO_DUMP, keep going, though the system may not be able to handle it */
|
||||
if (hash_data_has_info(ROM_GETHASHDATA(romp), HASH_INFO_NO_DUMP) || DISK_ISOPTIONAL(romp))
|
||||
@ -1043,10 +1043,7 @@ static void process_disk_entries(rom_load_data *romdata, const char *regiontag,
|
||||
err = open_disk_diff(Machine->gamedrv, romp, chd.origchd, &chd.difffile, &chd.diffchd);
|
||||
if (err != CHDERR_NONE)
|
||||
{
|
||||
if (err == CHDERR_UNSUPPORTED_VERSION)
|
||||
sprintf(&romdata->errorbuf[strlen(romdata->errorbuf)], "%s UNSUPPORTED CHD VERSION\n", astring_c(filename));
|
||||
else
|
||||
sprintf(&romdata->errorbuf[strlen(romdata->errorbuf)], "%s: CAN'T OPEN DIFF FILE\n", astring_c(filename));
|
||||
sprintf(&romdata->errorbuf[strlen(romdata->errorbuf)], "%s DIFF CHD ERROR: %s\n", astring_c(filename), chd_error_string(err));
|
||||
romdata->errors++;
|
||||
continue;
|
||||
}
|
||||
|
@ -39,5 +39,6 @@ const game_driver * const drivers[] =
|
||||
#else /* DRIVER_RECURSIVE */
|
||||
|
||||
DRIVER( ldv1000 ) /* Pioneer LD-V1000 */
|
||||
DRIVER( pr8210 ) /* Pioneer PR-8210 */
|
||||
|
||||
#endif /* DRIVER_RECURSIVE */
|
||||
|
@ -60,93 +60,15 @@ static input_port_value last_controls;
|
||||
static UINT8 playing;
|
||||
static UINT8 displaying;
|
||||
|
||||
static UINT8 pr8210_last_was_number;
|
||||
static emu_timer *pr8210_bit_timer;
|
||||
static UINT32 pr8210_command_buffer_in, pr8210_command_buffer_out;
|
||||
static UINT8 pr8210_command_buffer[10];
|
||||
|
||||
static void (*execute_command)(const device_config *laserdisc, int command);
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* LD-V1000 implementation
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void ldv1000_execute(const device_config *laserdisc, int command)
|
||||
{
|
||||
static const UINT8 digits[10] = { 0x3f, 0x0f, 0x8f, 0x4f, 0x2f, 0xaf, 0x6f, 0x1f, 0x9f, 0x5f };
|
||||
switch (command)
|
||||
{
|
||||
case CMD_SCAN_REVERSE:
|
||||
laserdisc_data_w(laserdisc, 0xf8);
|
||||
playing = TRUE;
|
||||
break;
|
||||
|
||||
case CMD_SCAN_REVERSE_END:
|
||||
laserdisc_data_w(laserdisc, 0xfd);
|
||||
playing = TRUE;
|
||||
break;
|
||||
|
||||
case CMD_STEP_REVERSE:
|
||||
laserdisc_data_w(laserdisc, 0xfe);
|
||||
playing = FALSE;
|
||||
break;
|
||||
|
||||
case CMD_SCAN_FORWARD:
|
||||
laserdisc_data_w(laserdisc, 0xf0);
|
||||
playing = TRUE;
|
||||
break;
|
||||
|
||||
case CMD_SCAN_FORWARD_END:
|
||||
laserdisc_data_w(laserdisc, 0xfd);
|
||||
playing = TRUE;
|
||||
break;
|
||||
|
||||
case CMD_STEP_FORWARD:
|
||||
laserdisc_data_w(laserdisc, 0xf6);
|
||||
playing = FALSE;
|
||||
break;
|
||||
|
||||
case CMD_PLAY:
|
||||
laserdisc_data_w(laserdisc, 0xfd);
|
||||
playing = TRUE;
|
||||
break;
|
||||
|
||||
case CMD_PAUSE:
|
||||
laserdisc_data_w(laserdisc, 0xa0);
|
||||
playing = FALSE;
|
||||
break;
|
||||
|
||||
case CMD_DISPLAY_ON:
|
||||
laserdisc_data_w(laserdisc, digits[1]);
|
||||
laserdisc_data_w(laserdisc, 0xf1);
|
||||
break;
|
||||
|
||||
case CMD_DISPLAY_OFF:
|
||||
laserdisc_data_w(laserdisc, digits[0]);
|
||||
laserdisc_data_w(laserdisc, 0xf1);
|
||||
break;
|
||||
|
||||
case CMD_0:
|
||||
case CMD_1:
|
||||
case CMD_2:
|
||||
case CMD_3:
|
||||
case CMD_4:
|
||||
case CMD_5:
|
||||
case CMD_6:
|
||||
case CMD_7:
|
||||
case CMD_8:
|
||||
case CMD_9:
|
||||
laserdisc_data_w(laserdisc, digits[command - CMD_0]);
|
||||
break;
|
||||
|
||||
case CMD_SEARCH:
|
||||
laserdisc_data_w(laserdisc, 0xf7);
|
||||
playing = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Timers and sync
|
||||
@ -244,7 +166,7 @@ static TIMER_CALLBACK( autoplay )
|
||||
const device_config *laserdisc = device_list_first(machine->config->devicelist, LASERDISC);
|
||||
|
||||
/* start playing */
|
||||
laserdisc_data_w(laserdisc, 0xfd);
|
||||
(*execute_command)(laserdisc, CMD_PLAY);
|
||||
playing = TRUE;
|
||||
displaying = FALSE;
|
||||
}
|
||||
@ -261,6 +183,240 @@ static MACHINE_RESET( ldplayer )
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* PR-8210 implementation
|
||||
*
|
||||
*************************************/
|
||||
|
||||
INLINE void pr8210_add_command(UINT8 command)
|
||||
{
|
||||
pr8210_command_buffer[pr8210_command_buffer_in++ % ARRAY_LENGTH(pr8210_command_buffer)] = (command & 0x1f) | 0x20;
|
||||
pr8210_command_buffer[pr8210_command_buffer_in++ % ARRAY_LENGTH(pr8210_command_buffer)] = (command & 0x1f) | 0x20;
|
||||
pr8210_command_buffer[pr8210_command_buffer_in++ % ARRAY_LENGTH(pr8210_command_buffer)] = 0x00 | 0x20;
|
||||
}
|
||||
|
||||
|
||||
static TIMER_CALLBACK( pr8210_bit_off_callback )
|
||||
{
|
||||
const device_config *laserdisc = ptr;
|
||||
|
||||
/* deassert the control line */
|
||||
laserdisc_line_w(laserdisc, LASERDISC_LINE_CONTROL, CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
static TIMER_CALLBACK( pr8210_bit_callback )
|
||||
{
|
||||
attotime duration = ATTOTIME_IN_MSEC(30);
|
||||
const device_config *laserdisc = ptr;
|
||||
UINT8 bitsleft = param >> 16;
|
||||
UINT8 data = param;
|
||||
|
||||
/* if we have bits, process */
|
||||
if (bitsleft != 0)
|
||||
{
|
||||
/* assert the line and set a timer for deassertion */
|
||||
laserdisc_line_w(laserdisc, LASERDISC_LINE_CONTROL, ASSERT_LINE);
|
||||
timer_set(ATTOTIME_IN_USEC(250), ptr, 0, pr8210_bit_off_callback);
|
||||
|
||||
/* space 0 bits apart by 1msec, and 1 bits by 2msec */
|
||||
duration = attotime_mul(ATTOTIME_IN_MSEC(1), (data & 0x80) ? 2 : 1);
|
||||
data <<= 1;
|
||||
bitsleft--;
|
||||
}
|
||||
|
||||
/* if we're out of bits, queue up the next command */
|
||||
else if (bitsleft == 0 && pr8210_command_buffer_in != pr8210_command_buffer_out)
|
||||
{
|
||||
data = pr8210_command_buffer[pr8210_command_buffer_out++ % ARRAY_LENGTH(pr8210_command_buffer)];
|
||||
bitsleft = 12;
|
||||
}
|
||||
timer_adjust_oneshot(pr8210_bit_timer, duration, (bitsleft << 16) | data);
|
||||
}
|
||||
|
||||
|
||||
static MACHINE_START( pr8210 )
|
||||
{
|
||||
const device_config *laserdisc = device_list_first(machine->config->devicelist, LASERDISC);
|
||||
MACHINE_START_CALL(ldplayer);
|
||||
pr8210_bit_timer = timer_alloc(pr8210_bit_callback, (void *)laserdisc);
|
||||
}
|
||||
|
||||
|
||||
static MACHINE_RESET( pr8210 )
|
||||
{
|
||||
MACHINE_RESET_CALL(ldplayer);
|
||||
timer_adjust_oneshot(pr8210_bit_timer, attotime_zero, 0);
|
||||
}
|
||||
|
||||
|
||||
static void pr8210_execute(const device_config *laserdisc, int command)
|
||||
{
|
||||
static const UINT8 digits[10] = { 0x01, 0x11, 0x09, 0x19, 0x05, 0x15, 0x0d, 0x1d, 0x03, 0x13 };
|
||||
int prev_was_number = pr8210_last_was_number;
|
||||
|
||||
pr8210_last_was_number = FALSE;
|
||||
switch (command)
|
||||
{
|
||||
case CMD_SCAN_REVERSE:
|
||||
pr8210_add_command(0x1c);
|
||||
playing = TRUE;
|
||||
break;
|
||||
|
||||
case CMD_SCAN_REVERSE_END:
|
||||
pr8210_add_command(0x14);
|
||||
playing = TRUE;
|
||||
break;
|
||||
|
||||
case CMD_STEP_REVERSE:
|
||||
pr8210_add_command(0x12);
|
||||
playing = FALSE;
|
||||
break;
|
||||
|
||||
case CMD_SCAN_FORWARD:
|
||||
pr8210_add_command(0x08);
|
||||
playing = TRUE;
|
||||
break;
|
||||
|
||||
case CMD_SCAN_FORWARD_END:
|
||||
pr8210_add_command(0x14);
|
||||
playing = TRUE;
|
||||
break;
|
||||
|
||||
case CMD_STEP_FORWARD:
|
||||
pr8210_add_command(0x04);
|
||||
playing = FALSE;
|
||||
break;
|
||||
|
||||
case CMD_PLAY:
|
||||
pr8210_add_command(0x14);
|
||||
playing = TRUE;
|
||||
break;
|
||||
|
||||
case CMD_PAUSE:
|
||||
pr8210_add_command(0x0a);
|
||||
playing = FALSE;
|
||||
break;
|
||||
|
||||
case CMD_DISPLAY_ON:
|
||||
// pr8210_add_command(digits[1]);
|
||||
// pr8210_add_command(0xf1);
|
||||
break;
|
||||
|
||||
case CMD_DISPLAY_OFF:
|
||||
// pr8210_add_command(digits[0]);
|
||||
// pr8210_add_command(0xf1);
|
||||
break;
|
||||
|
||||
case CMD_0:
|
||||
case CMD_1:
|
||||
case CMD_2:
|
||||
case CMD_3:
|
||||
case CMD_4:
|
||||
case CMD_5:
|
||||
case CMD_6:
|
||||
case CMD_7:
|
||||
case CMD_8:
|
||||
case CMD_9:
|
||||
if (!prev_was_number)
|
||||
pr8210_add_command(0x1a);
|
||||
pr8210_add_command(digits[command - CMD_0]);
|
||||
pr8210_last_was_number = TRUE;
|
||||
break;
|
||||
|
||||
case CMD_SEARCH:
|
||||
pr8210_add_command(0x1a);
|
||||
playing = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* LD-V1000 implementation
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void ldv1000_execute(const device_config *laserdisc, int command)
|
||||
{
|
||||
static const UINT8 digits[10] = { 0x3f, 0x0f, 0x8f, 0x4f, 0x2f, 0xaf, 0x6f, 0x1f, 0x9f, 0x5f };
|
||||
switch (command)
|
||||
{
|
||||
case CMD_SCAN_REVERSE:
|
||||
laserdisc_data_w(laserdisc, 0xf8);
|
||||
playing = TRUE;
|
||||
break;
|
||||
|
||||
case CMD_SCAN_REVERSE_END:
|
||||
laserdisc_data_w(laserdisc, 0xfd);
|
||||
playing = TRUE;
|
||||
break;
|
||||
|
||||
case CMD_STEP_REVERSE:
|
||||
laserdisc_data_w(laserdisc, 0xfe);
|
||||
playing = FALSE;
|
||||
break;
|
||||
|
||||
case CMD_SCAN_FORWARD:
|
||||
laserdisc_data_w(laserdisc, 0xf0);
|
||||
playing = TRUE;
|
||||
break;
|
||||
|
||||
case CMD_SCAN_FORWARD_END:
|
||||
laserdisc_data_w(laserdisc, 0xfd);
|
||||
playing = TRUE;
|
||||
break;
|
||||
|
||||
case CMD_STEP_FORWARD:
|
||||
laserdisc_data_w(laserdisc, 0xf6);
|
||||
playing = FALSE;
|
||||
break;
|
||||
|
||||
case CMD_PLAY:
|
||||
laserdisc_data_w(laserdisc, 0xfd);
|
||||
playing = TRUE;
|
||||
break;
|
||||
|
||||
case CMD_PAUSE:
|
||||
laserdisc_data_w(laserdisc, 0xa0);
|
||||
playing = FALSE;
|
||||
break;
|
||||
|
||||
case CMD_DISPLAY_ON:
|
||||
laserdisc_data_w(laserdisc, digits[1]);
|
||||
laserdisc_data_w(laserdisc, 0xf1);
|
||||
break;
|
||||
|
||||
case CMD_DISPLAY_OFF:
|
||||
laserdisc_data_w(laserdisc, digits[0]);
|
||||
laserdisc_data_w(laserdisc, 0xf1);
|
||||
break;
|
||||
|
||||
case CMD_0:
|
||||
case CMD_1:
|
||||
case CMD_2:
|
||||
case CMD_3:
|
||||
case CMD_4:
|
||||
case CMD_5:
|
||||
case CMD_6:
|
||||
case CMD_7:
|
||||
case CMD_8:
|
||||
case CMD_9:
|
||||
laserdisc_data_w(laserdisc, digits[command - CMD_0]);
|
||||
break;
|
||||
|
||||
case CMD_SEARCH:
|
||||
laserdisc_data_w(laserdisc, 0xf7);
|
||||
playing = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Port definitions
|
||||
@ -323,6 +479,14 @@ static MACHINE_DRIVER_START( ldv1000 )
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
|
||||
static MACHINE_DRIVER_START( pr8210 )
|
||||
MDRV_IMPORT_FROM(ldplayer_ntsc)
|
||||
MDRV_MACHINE_START(pr8210)
|
||||
MDRV_MACHINE_RESET(pr8210)
|
||||
MDRV_LASERDISC_ADD("laserdisc", PIONEER_PR8210)
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
@ -335,6 +499,11 @@ ROM_START( ldv1000 )
|
||||
ROM_END
|
||||
|
||||
|
||||
ROM_START( pr8210 )
|
||||
DISK_REGION( "laserdisc" )
|
||||
ROM_END
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
@ -406,6 +575,7 @@ static DRIVER_INIT( ldplayer )
|
||||
|
||||
|
||||
static DRIVER_INIT( ldv1000 ) { execute_command = ldv1000_execute; DRIVER_INIT_CALL(ldplayer); }
|
||||
static DRIVER_INIT( pr8210 ) { execute_command = pr8210_execute; DRIVER_INIT_CALL(ldplayer); }
|
||||
|
||||
|
||||
|
||||
@ -415,4 +585,5 @@ static DRIVER_INIT( ldv1000 ) { execute_command = ldv1000_execute; DRIVER_INIT_C
|
||||
*
|
||||
*************************************/
|
||||
|
||||
GAME( 2008, ldv1000, 0, ldv1000, ldplayer, ldv1000, ROT0, "MAME", "LDV-1000 Simulator", 0 )
|
||||
GAME( 2008, ldv1000, 0, ldv1000, ldplayer, ldv1000, ROT0, "MAME", "Pioneer LDV-1000 Simulator", 0 )
|
||||
GAME( 2008, pr8210, 0, pr8210, ldplayer, pr8210, ROT0, "MAME", "Pioneer PR-8210 Simulator", 0 )
|
||||
|
@ -1,115 +0,0 @@
|
||||
// system 16 - 7751 emulation, based on monster bash code.
|
||||
#include "driver.h"
|
||||
#include "cpu/i8039/i8039.h"
|
||||
#include "sound/dac.h"
|
||||
|
||||
static UINT32 port_8255_c03 = 0;
|
||||
static UINT32 port_8255_c47 = 0;
|
||||
static UINT32 port_7751_p27 = 0;
|
||||
static UINT32 rom_offset = 0;
|
||||
static UINT32 rom_base = 0;
|
||||
static UINT32 rom_bank = 0;
|
||||
|
||||
static TIMER_CALLBACK( trigger_7751_sound )
|
||||
{
|
||||
int data = param;
|
||||
|
||||
/* I think this is correct for 128k sound roms,
|
||||
it's OK for smaller roms */
|
||||
if((data&0xf) == 0xc) rom_bank=0;
|
||||
else if((data&0xf) == 0xd) rom_bank=0x4000;
|
||||
else if((data&0xf) == 0xb) rom_bank=0xc000;
|
||||
else if((data&0xf) == 0xa) rom_bank=0x8000;
|
||||
|
||||
else if((data&0xf) == 0xf) rom_bank=0x1c000;
|
||||
else if((data&0xf) == 0xe) rom_bank=0x18000;
|
||||
else if((data&0xf) == 0x7) rom_bank=0x14000;
|
||||
else if((data&0xf) == 0x6) rom_bank=0x10000;
|
||||
|
||||
port_8255_c03 = (data>>5);
|
||||
|
||||
cpunum_set_input_line(machine, 2, 0, PULSE_LINE);
|
||||
}
|
||||
|
||||
// I'm sure this must be wrong, but it seems to work for quartet music.
|
||||
WRITE8_HANDLER( sys16_7751_audio_8255_w )
|
||||
{
|
||||
logerror("7751: %4x %4x\n",data,data^0xff);
|
||||
|
||||
if ((data & 0x0f) != 8)
|
||||
{
|
||||
cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, PULSE_LINE);
|
||||
timer_set(ATTOTIME_IN_USEC(300), NULL, data, trigger_7751_sound);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
READ8_HANDLER( sys16_7751_audio_8255_r )
|
||||
{
|
||||
// Only PC4 is hooked up
|
||||
/* 0x00 = BUSY, 0x10 = NOT BUSY */
|
||||
return (port_8255_c47 & 0x10);
|
||||
}
|
||||
|
||||
/* read from BUS */
|
||||
READ8_HANDLER( sys16_7751_sh_rom_r )
|
||||
{
|
||||
UINT8 *sound_rom = memory_region(machine, REGION_SOUND1);
|
||||
|
||||
return sound_rom[rom_offset+rom_base];
|
||||
}
|
||||
|
||||
/* read from T1 */
|
||||
READ8_HANDLER( sys16_7751_sh_t1_r )
|
||||
{
|
||||
// Labelled as "TEST", connected to ground
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* read from P2 */
|
||||
READ8_HANDLER( sys16_7751_sh_command_r )
|
||||
{
|
||||
// 8255's PC0-2 connects to 7751's S0-2 (P24-P26 on an 8048)
|
||||
return ((port_8255_c03 & 0x07) << 4) | port_7751_p27;
|
||||
}
|
||||
|
||||
/* write to P1 */
|
||||
WRITE8_HANDLER( sys16_7751_sh_dac_w )
|
||||
{
|
||||
dac_data_w(0,data);
|
||||
}
|
||||
|
||||
/* write to P2 */
|
||||
WRITE8_HANDLER( sys16_7751_sh_busy_w )
|
||||
{
|
||||
port_8255_c03 = (data & 0x70) >> 4;
|
||||
port_8255_c47 = (data & 0x80) >> 3;
|
||||
port_7751_p27 = data & 0x80;
|
||||
rom_base = rom_bank;
|
||||
}
|
||||
|
||||
/* write to P4 */
|
||||
WRITE8_HANDLER( sys16_7751_sh_offset_a0_a3_w )
|
||||
{
|
||||
rom_offset = (rom_offset & 0xFFF0) | (data & 0x0F);
|
||||
}
|
||||
|
||||
/* write to P5 */
|
||||
WRITE8_HANDLER( sys16_7751_sh_offset_a4_a7_w )
|
||||
{
|
||||
rom_offset = (rom_offset & 0xFF0F) | ((data & 0x0F) << 4);
|
||||
}
|
||||
|
||||
/* write to P6 */
|
||||
WRITE8_HANDLER( sys16_7751_sh_offset_a8_a11_w )
|
||||
{
|
||||
rom_offset = (rom_offset & 0xF0FF) | ((data & 0x0F) << 8);
|
||||
}
|
||||
|
||||
/* write to P7 */
|
||||
WRITE8_HANDLER( sys16_7751_sh_rom_select_w )
|
||||
{
|
||||
rom_offset = (rom_offset & 0x0FFF) | ((0x4000 + ((data&0xf) << 12)) & 0x3000);
|
||||
|
||||
}
|
||||
|
@ -3369,7 +3369,7 @@ GAME( 1995, lhb, 0, lhb, lhb, lhb, ROT0, "IGS",
|
||||
GAME( 1995, lhba, lhb, lhb, lhb, lhba, ROT0, "IGS", "Long Hu Bang (V033C)", 0 )
|
||||
GAME( 1995, dbc, 0, lhb, lhb, dbc, ROT0, "IGS", "Da Ban Cheng (V027H)", 0 )
|
||||
GAME( 1996, chmplst2, 0, chmplst2, chmplst2, chmplst2, ROT0, "IGS", "Long Hu Bang II (V185H)", 0 )
|
||||
GAME( 1996, xymg, 0, xymg, xymg, xymg, ROT0, "IGS", "PinYin: Xing Yun Man Guan (V651C)", 0 )
|
||||
GAME( 1996, xymg, 0, xymg, xymg, xymg, ROT0, "IGS", "Xing Yun Man Guan (V651C)", 0 )
|
||||
GAME( 1996, grtwall, xymg, grtwall, grtwall, grtwall, ROT0, "IGS", "Wan Li Chang Cheng (V638C)", 0 )
|
||||
GAME( 1996, vbowl, 0, vbowl, vbowl, vbowl, ROT0, "IGS", "Virtua Bowling (World, V101XCM)", GAME_IMPERFECT_SOUND )
|
||||
GAME( 1996, vbowlj, vbowl, vbowl, vbowlj, vbowlj, ROT0, "IGS / Alta", "Virtua Bowling (Japan, V100JCM)", GAME_IMPERFECT_SOUND )
|
||||
@ -3378,4 +3378,4 @@ GAME( 1995, drgwrld3, drgnwrld, chindrag, drgnwrld, drgwrld3, ROT0, "IGS",
|
||||
GAME( 1995, chindrag, drgnwrld, chindrag, chindrag, chindrag, ROT0, "IGS / Alta", "Zhong Guo Long (Japan, V021J)", 0 )
|
||||
GAME( 1995, chugokur, drgnwrld, chindrag, chindrag, chugokur, ROT0, "IGS / Alta", "Zhong Guo Long (Japan, V020J)", 0 )
|
||||
GAME( 1995, chindrac, drgnwrld, chindrag, chindrac, chindrac, ROT0, "IGS", "Zhong Guo Long (China, V010C)", 0 )
|
||||
GAME( 1995, chindrah, drgnwrld, chindrag, chindrac, chindrah, ROT0, "IGS", "Zhong Guo Long? (Hong Kong, V011H)", 0 )
|
||||
GAME( 1995, chindrah, drgnwrld, chindrag, chindrac, chindrah, ROT0, "IGS", "Dong Fang Zhi Zhu (Hong Kong, V011H)", 0 )
|
||||
|
@ -186,21 +186,6 @@ static void sys16_video_config(void (*update)(void), int sprxoffs, const int *ba
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
// 7751 emulation
|
||||
WRITE8_HANDLER( sys16_7751_audio_8255_w );
|
||||
READ8_HANDLER( sys16_7751_audio_8255_r );
|
||||
READ8_HANDLER( sys16_7751_sh_rom_r );
|
||||
READ8_HANDLER( sys16_7751_sh_t1_r );
|
||||
READ8_HANDLER( sys16_7751_sh_command_r );
|
||||
WRITE8_HANDLER( sys16_7751_sh_dac_w );
|
||||
WRITE8_HANDLER( sys16_7751_sh_busy_w );
|
||||
WRITE8_HANDLER( sys16_7751_sh_offset_a0_a3_w );
|
||||
WRITE8_HANDLER( sys16_7751_sh_offset_a4_a7_w );
|
||||
WRITE8_HANDLER( sys16_7751_sh_offset_a8_a11_w );
|
||||
WRITE8_HANDLER( sys16_7751_sh_rom_select_w );
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
static UINT16 coinctrl;
|
||||
|
||||
static WRITE16_HANDLER( sys16_3d_coinctrl_w )
|
||||
|
Loading…
Reference in New Issue
Block a user