mirror of
https://github.com/holub/mame
synced 2025-07-01 08:18:59 +03:00
Cleanups and version bump.
This commit is contained in:
parent
a8bd722f18
commit
fe3d7c4af4
@ -225,7 +225,7 @@ static CPU_RESET( am29000 )
|
||||
|
||||
static CPU_EXIT( am29000 )
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -989,7 +989,7 @@ CPU_GET_INFO( am29000 )
|
||||
am29000->cps & CPS_DA ? 'D' : '.',
|
||||
(am29000->r[1] >> 2) & 0x7f); break;
|
||||
|
||||
case CPUINFO_STR_REGISTER + AM29000_PC: sprintf(info->s, "PC: %08X", am29000->pc); break;
|
||||
case CPUINFO_STR_REGISTER + AM29000_PC: sprintf(info->s, "PC: %08X", am29000->pc); break;
|
||||
case CPUINFO_STR_REGISTER + AM29000_VAB: sprintf(info->s, "VAB: %08X", am29000->vab); break;
|
||||
case CPUINFO_STR_REGISTER + AM29000_OPS: sprintf(info->s, "OPS: %08X", am29000->ops); break;
|
||||
case CPUINFO_STR_REGISTER + AM29000_CPS: sprintf(info->s, "CPS: %08X", am29000->cps); break;
|
||||
|
@ -334,7 +334,7 @@ enum
|
||||
|
||||
#define PROCESSOR_REL_FIELD (PRL_AM29000 | PRL_REV_D)
|
||||
|
||||
#define VAB_SHIFT (16)
|
||||
#define VAB_SHIFT (16)
|
||||
#define VAB_MASK (0xffff)
|
||||
|
||||
#define CPS_CA (1 << 15)
|
||||
|
@ -167,7 +167,7 @@ CPU_DISASSEMBLE( am29000 )
|
||||
case 0x18: case 0x19: sprintf(buffer, "addcs %s", TYPE_1); break;
|
||||
case 0x1a: case 0x1b: sprintf(buffer, "addcu %s", TYPE_1); break;
|
||||
case 0x1c: case 0x1d: sprintf(buffer, "addc %s", TYPE_1); break;
|
||||
case 0x1e: case 0x1f: sprintf(buffer, "store %s", TYPE_6); break;
|
||||
case 0x1e: case 0x1f: sprintf(buffer, "store %s", TYPE_6); break;
|
||||
case 0x20: case 0x21: sprintf(buffer, "subs %s", TYPE_1); break;
|
||||
case 0x22: case 0x23: sprintf(buffer, "subu %s", TYPE_1); break;
|
||||
case 0x24: case 0x25: sprintf(buffer, "sub %s", TYPE_1); break;
|
||||
@ -180,9 +180,9 @@ CPU_DISASSEMBLE( am29000 )
|
||||
case 0x32: case 0x33: sprintf(buffer, "subru %s", TYPE_1); break;
|
||||
case 0x34: case 0x35: sprintf(buffer, "subr %s", TYPE_1); break;
|
||||
case 0x36: case 0x37: sprintf(buffer, "loadm %s", TYPE_6); break;
|
||||
case 0x38: case 0x39: sprintf(buffer, "subrcs %s", TYPE_1); break;
|
||||
case 0x38: case 0x39: sprintf(buffer, "subrcs %s", TYPE_1); break;
|
||||
case 0x3a: case 0x3b: sprintf(buffer, "subrcu %s", TYPE_1); break;
|
||||
case 0x3c: case 0x3d: sprintf(buffer, "subrc %s", TYPE_1); break;
|
||||
case 0x3c: case 0x3d: sprintf(buffer, "subrc %s", TYPE_1); break;
|
||||
case 0x3e: case 0x3f: sprintf(buffer, "storem %s", TYPE_6); break;
|
||||
case 0x40: case 0x41: sprintf(buffer, "cplt %s", TYPE_1); break;
|
||||
case 0x42: case 0x43: sprintf(buffer, "cpltu %s", TYPE_1); break;
|
||||
|
@ -194,9 +194,9 @@ static void write_spr(am29000_state *am29000, UINT32 idx, UINT32 val)
|
||||
case SPR_CR: am29000->chc &= ~(CHC_CR_MASK << CHC_CR_SHIFT);
|
||||
am29000->chc |= (val & CHC_CR_MASK) << CHC_CR_SHIFT;
|
||||
break;
|
||||
// case SPR_FPE:
|
||||
// case SPR_INTE:
|
||||
// case SPR_FPS:
|
||||
// case SPR_FPE:
|
||||
// case SPR_INTE:
|
||||
// case SPR_FPS:
|
||||
default: logerror("Unhandled SPR write (%d)\n", idx);
|
||||
}
|
||||
}
|
||||
@ -215,7 +215,7 @@ static void ADD(am29000_state *am29000)
|
||||
UINT32 a = GET_RA_VAL;
|
||||
UINT32 b = INST_M_BIT ? I8: GET_RB_VAL;
|
||||
UINT32 r = a + b;
|
||||
|
||||
|
||||
if (!FREEZE_MODE)
|
||||
{
|
||||
SET_ALU_V_ADD(r, a, b);
|
||||
@ -247,7 +247,7 @@ static void ADDCS(am29000_state *am29000)
|
||||
UINT32 a = GET_RA_VAL;
|
||||
UINT32 b = INST_M_BIT ? I8: GET_RB_VAL;
|
||||
UINT32 r = a + b + GET_CARRY;
|
||||
|
||||
|
||||
if (!FREEZE_MODE)
|
||||
{
|
||||
UINT32 carry = GET_CARRY;
|
||||
@ -276,7 +276,7 @@ static void SUB(am29000_state *am29000)
|
||||
UINT32 a = GET_RA_VAL;
|
||||
UINT32 b = INST_M_BIT ? I8 : GET_RB_VAL;
|
||||
UINT32 r = a - b;
|
||||
|
||||
|
||||
if (!FREEZE_MODE)
|
||||
{
|
||||
SET_ALU_V_SUB(r, a, b);
|
||||
@ -294,7 +294,7 @@ static void SUBS(am29000_state *am29000)
|
||||
UINT32 a = GET_RA_VAL;
|
||||
UINT32 b = INST_M_BIT ? I8 : GET_RB_VAL;
|
||||
UINT32 r = a - b;
|
||||
|
||||
|
||||
if (!FREEZE_MODE)
|
||||
{
|
||||
SET_ALU_V_SUB(r, a, b);
|
||||
@ -334,7 +334,7 @@ static void SUBR(am29000_state *am29000)
|
||||
UINT32 a = GET_RA_VAL;
|
||||
UINT32 b = INST_M_BIT ? I8 : GET_RB_VAL;
|
||||
UINT32 r = b - a;
|
||||
|
||||
|
||||
if (!FREEZE_MODE)
|
||||
{
|
||||
SET_ALU_V_SUB(r, a, b);
|
||||
@ -361,7 +361,7 @@ static void SUBRC(am29000_state *am29000)
|
||||
UINT32 a = GET_RA_VAL;
|
||||
UINT32 b = INST_M_BIT ? I8 : GET_RB_VAL;
|
||||
UINT32 r = b - a - 1 + GET_CARRY;
|
||||
|
||||
|
||||
if (!FREEZE_MODE)
|
||||
{
|
||||
SET_ALU_V_SUB(r, a, b);
|
||||
@ -523,7 +523,7 @@ static void DIV(am29000_state *am29000)
|
||||
c = (UINT32)(r) < (UINT32)(a);
|
||||
}
|
||||
|
||||
|
||||
|
||||
df = (~(c ^ (am29000->alu >> ALU_DF_SHIFT) ^ (am29000->alu >> ALU_N_SHIFT)) & 1);
|
||||
|
||||
if (!FREEZE_MODE)
|
||||
@ -781,7 +781,7 @@ static void AND(am29000_state *am29000)
|
||||
UINT32 a = GET_RA_VAL;
|
||||
UINT32 b = INST_M_BIT ? I8: GET_RB_VAL;
|
||||
UINT32 r = a & b;
|
||||
|
||||
|
||||
if (!FREEZE_MODE)
|
||||
{
|
||||
SET_ALU_Z(r);
|
||||
@ -796,7 +796,7 @@ static void ANDN(am29000_state *am29000)
|
||||
UINT32 a = GET_RA_VAL;
|
||||
UINT32 b = INST_M_BIT ? I8: GET_RB_VAL;
|
||||
UINT32 r = a & ~b;
|
||||
|
||||
|
||||
if (!FREEZE_MODE)
|
||||
{
|
||||
SET_ALU_Z(r);
|
||||
@ -811,7 +811,7 @@ static void NAND(am29000_state *am29000)
|
||||
UINT32 a = GET_RA_VAL;
|
||||
UINT32 b = INST_M_BIT ? I8: GET_RB_VAL;
|
||||
UINT32 r = ~(a & b);
|
||||
|
||||
|
||||
if (!FREEZE_MODE)
|
||||
{
|
||||
SET_ALU_Z(r);
|
||||
@ -826,7 +826,7 @@ static void OR(am29000_state *am29000)
|
||||
UINT32 a = GET_RA_VAL;
|
||||
UINT32 b = INST_M_BIT ? I8: GET_RB_VAL;
|
||||
UINT32 r = a | b;
|
||||
|
||||
|
||||
if (!FREEZE_MODE)
|
||||
{
|
||||
SET_ALU_Z(r);
|
||||
@ -841,7 +841,7 @@ static void NOR(am29000_state *am29000)
|
||||
UINT32 a = GET_RA_VAL;
|
||||
UINT32 b = INST_M_BIT ? I8: GET_RB_VAL;
|
||||
UINT32 r = ~(a | b);
|
||||
|
||||
|
||||
if (!FREEZE_MODE)
|
||||
{
|
||||
SET_ALU_Z(r);
|
||||
@ -856,7 +856,7 @@ static void XOR(am29000_state *am29000)
|
||||
UINT32 a = GET_RA_VAL;
|
||||
UINT32 b = INST_M_BIT ? I8: GET_RB_VAL;
|
||||
UINT32 r = a ^ b;
|
||||
|
||||
|
||||
if (!FREEZE_MODE)
|
||||
{
|
||||
SET_ALU_Z(r);
|
||||
@ -871,7 +871,7 @@ static void XNOR(am29000_state *am29000)
|
||||
UINT32 a = GET_RA_VAL;
|
||||
UINT32 b = INST_M_BIT ? I8: GET_RB_VAL;
|
||||
UINT32 r = ~(a ^ b);
|
||||
|
||||
|
||||
if (!FREEZE_MODE)
|
||||
{
|
||||
SET_ALU_Z(r);
|
||||
@ -891,7 +891,7 @@ static void SLL(am29000_state *am29000)
|
||||
UINT32 a = GET_RA_VAL;
|
||||
UINT32 b = (INST_M_BIT ? I8: GET_RB_VAL) & 0x1f;
|
||||
UINT32 r = a << b;
|
||||
|
||||
|
||||
am29000->r[RC] = r;
|
||||
}
|
||||
|
||||
@ -900,7 +900,7 @@ static void SRL(am29000_state *am29000)
|
||||
UINT32 a = GET_RA_VAL;
|
||||
UINT32 b = (INST_M_BIT ? I8: GET_RB_VAL) & 0x1f;
|
||||
UINT32 r = a >> b;
|
||||
|
||||
|
||||
am29000->r[RC] = r;
|
||||
}
|
||||
|
||||
@ -909,7 +909,7 @@ static void SRA(am29000_state *am29000)
|
||||
INT32 a = GET_RA_VAL;
|
||||
UINT32 b = (INST_M_BIT ? I8: GET_RB_VAL) & 0x1f;
|
||||
UINT32 r = a >> b;
|
||||
|
||||
|
||||
am29000->r[RC] = r;
|
||||
}
|
||||
|
||||
@ -918,7 +918,7 @@ static void EXTRACT(am29000_state *am29000)
|
||||
INT32 a = GET_RA_VAL;
|
||||
UINT32 b = (INST_M_BIT ? I8: GET_RB_VAL);
|
||||
UINT64 r;
|
||||
|
||||
|
||||
r = (((UINT64)a << 32) | b) << GET_ALU_FC;
|
||||
|
||||
am29000->r[RC] = r >> 32;
|
||||
@ -960,8 +960,8 @@ static void LOAD(am29000_state *am29000)
|
||||
}
|
||||
}
|
||||
|
||||
// if (opt & 2)
|
||||
// logerror("Am29000: Half word LOAD\n");
|
||||
// if (opt & 2)
|
||||
// logerror("Am29000: Half word LOAD\n");
|
||||
|
||||
if (!FREEZE_MODE)
|
||||
{
|
||||
@ -1047,7 +1047,7 @@ static void LOADM(am29000_state *am29000)
|
||||
{
|
||||
am29000->r[r] = memory_read_dword_32be(am29000->data, addr);
|
||||
|
||||
// SET_CHC_CR(cnt - 1);
|
||||
// SET_CHC_CR(cnt - 1);
|
||||
addr += 4;
|
||||
|
||||
if (++r == 256)
|
||||
@ -1161,7 +1161,7 @@ static void STOREM(am29000_state *am29000)
|
||||
{
|
||||
memory_write_dword_32be(am29000->data, addr, am29000->r[r]);
|
||||
|
||||
// SET_CHC_CR(cnt - 1);
|
||||
// SET_CHC_CR(cnt - 1);
|
||||
addr += 4;
|
||||
|
||||
if (++r == 256)
|
||||
|
@ -101,7 +101,7 @@ struct _v30mz_state
|
||||
UINT32 ea;
|
||||
UINT16 eo;
|
||||
UINT16 e16;
|
||||
|
||||
|
||||
const nec_config *config;
|
||||
};
|
||||
|
||||
@ -944,7 +944,7 @@ static void nec_init(running_device *device, cpu_irq_callback irqcallback, int t
|
||||
v30mz_state *cpustate = get_safe_token(device);
|
||||
|
||||
const nec_config *config = &default_config;
|
||||
|
||||
|
||||
state_save_register_device_item_array(device, 0, cpustate->regs.w);
|
||||
state_save_register_device_item_array(device, 0, cpustate->sregs);
|
||||
|
||||
|
@ -108,13 +108,13 @@ struct debug_view_xy
|
||||
class registers_subview_item
|
||||
{
|
||||
DISABLE_COPYING(registers_subview_item);
|
||||
|
||||
|
||||
public:
|
||||
registers_subview_item()
|
||||
: next(NULL),
|
||||
index(0),
|
||||
device(NULL) { }
|
||||
|
||||
|
||||
registers_subview_item *next; /* link to next item */
|
||||
int index; /* index of this item */
|
||||
astring name; /* name of the subview item */
|
||||
@ -126,7 +126,7 @@ public:
|
||||
class disasm_subview_item
|
||||
{
|
||||
DISABLE_COPYING(disasm_subview_item);
|
||||
|
||||
|
||||
public:
|
||||
disasm_subview_item()
|
||||
: next(NULL),
|
||||
@ -144,7 +144,7 @@ public:
|
||||
class memory_subview_item
|
||||
{
|
||||
DISABLE_COPYING(memory_subview_item);
|
||||
|
||||
|
||||
public:
|
||||
memory_subview_item()
|
||||
: next(NULL),
|
||||
|
@ -73,7 +73,7 @@ void device_list::import_config_list(const device_config_list &list, running_mac
|
||||
{
|
||||
// remember the machine for later use
|
||||
machine = &_machine;
|
||||
|
||||
|
||||
// append each device from the configuration list
|
||||
for (const device_config *devconfig = list.first(); devconfig != NULL; devconfig = devconfig->next)
|
||||
append(devconfig->tag, new running_device(_machine, *devconfig));
|
||||
@ -97,7 +97,7 @@ void device_list::start_all()
|
||||
int numstarted = 0;
|
||||
while (numstarted < devcount)
|
||||
{
|
||||
// iterate over devices and start them
|
||||
// iterate over devices and start them
|
||||
int prevstarted = numstarted;
|
||||
for (running_device *device = first(); device != NULL; device = device->next)
|
||||
if (!device->started)
|
||||
@ -308,7 +308,7 @@ astring &device_config::subtag(astring &dest, const char *_tag) const
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
siblingtag - create a tag for an object that
|
||||
siblingtag - create a tag for an object that
|
||||
a sibling to this device
|
||||
-------------------------------------------------*/
|
||||
|
||||
@ -360,7 +360,7 @@ running_device::running_device(running_machine &_machine, const device_config &_
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
~running_device - destructor for a
|
||||
~running_device - destructor for a
|
||||
running_device
|
||||
-------------------------------------------------*/
|
||||
|
||||
|
@ -46,88 +46,88 @@ enum device_class
|
||||
// state constants passed to the device_get_config_func
|
||||
enum
|
||||
{
|
||||
// --- the following bits of info are returned as 64-bit signed integers ---
|
||||
// --- the following bits of info are returned as 64-bit signed integers ---
|
||||
DEVINFO_INT_FIRST = 0x00000,
|
||||
|
||||
DEVINFO_INT_TOKEN_BYTES = DEVINFO_INT_FIRST, // R/O: bytes to allocate for the token
|
||||
DEVINFO_INT_INLINE_CONFIG_BYTES, // R/O: bytes to allocate for the inline configuration
|
||||
DEVINFO_INT_CLASS, // R/O: the device's class
|
||||
DEVINFO_INT_TOKEN_BYTES = DEVINFO_INT_FIRST, // R/O: bytes to allocate for the token
|
||||
DEVINFO_INT_INLINE_CONFIG_BYTES, // R/O: bytes to allocate for the inline configuration
|
||||
DEVINFO_INT_CLASS, // R/O: the device's class
|
||||
|
||||
DEVINFO_INT_ENDIANNESS, // R/O: either ENDIANNESS_BIG or ENDIANNESS_LITTLE
|
||||
DEVINFO_INT_DATABUS_WIDTH, // R/O: data bus size for each address space (8,16,32,64)
|
||||
DEVINFO_INT_ENDIANNESS, // R/O: either ENDIANNESS_BIG or ENDIANNESS_LITTLE
|
||||
DEVINFO_INT_DATABUS_WIDTH, // R/O: data bus size for each address space (8,16,32,64)
|
||||
DEVINFO_INT_DATABUS_WIDTH_0 = DEVINFO_INT_DATABUS_WIDTH + 0,
|
||||
DEVINFO_INT_DATABUS_WIDTH_1 = DEVINFO_INT_DATABUS_WIDTH + 1,
|
||||
DEVINFO_INT_DATABUS_WIDTH_2 = DEVINFO_INT_DATABUS_WIDTH + 2,
|
||||
DEVINFO_INT_DATABUS_WIDTH_3 = DEVINFO_INT_DATABUS_WIDTH + 3,
|
||||
DEVINFO_INT_DATABUS_WIDTH_LAST = DEVINFO_INT_DATABUS_WIDTH + ADDRESS_SPACES - 1,
|
||||
DEVINFO_INT_ADDRBUS_WIDTH, // R/O: address bus size for each address space (12-32)
|
||||
DEVINFO_INT_ADDRBUS_WIDTH, // R/O: address bus size for each address space (12-32)
|
||||
DEVINFO_INT_ADDRBUS_WIDTH_0 = DEVINFO_INT_ADDRBUS_WIDTH + 0,
|
||||
DEVINFO_INT_ADDRBUS_WIDTH_1 = DEVINFO_INT_ADDRBUS_WIDTH + 1,
|
||||
DEVINFO_INT_ADDRBUS_WIDTH_2 = DEVINFO_INT_ADDRBUS_WIDTH + 2,
|
||||
DEVINFO_INT_ADDRBUS_WIDTH_3 = DEVINFO_INT_ADDRBUS_WIDTH + 3,
|
||||
DEVINFO_INT_ADDRBUS_WIDTH_LAST = DEVINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACES - 1,
|
||||
DEVINFO_INT_ADDRBUS_SHIFT, // R/O: shift applied to addresses each address space (+3 means >>3, -1 means <<1)
|
||||
DEVINFO_INT_ADDRBUS_SHIFT, // R/O: shift applied to addresses each address space (+3 means >>3, -1 means <<1)
|
||||
DEVINFO_INT_ADDRBUS_SHIFT_0 = DEVINFO_INT_ADDRBUS_SHIFT + 0,
|
||||
DEVINFO_INT_ADDRBUS_SHIFT_1 = DEVINFO_INT_ADDRBUS_SHIFT + 1,
|
||||
DEVINFO_INT_ADDRBUS_SHIFT_2 = DEVINFO_INT_ADDRBUS_SHIFT + 2,
|
||||
DEVINFO_INT_ADDRBUS_SHIFT_3 = DEVINFO_INT_ADDRBUS_SHIFT + 3,
|
||||
DEVINFO_INT_ADDRBUS_SHIFT_LAST = DEVINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACES - 1,
|
||||
|
||||
DEVINFO_INT_CLASS_SPECIFIC = 0x04000, // R/W: device-specific values start here
|
||||
DEVINFO_INT_DEVICE_SPECIFIC = 0x08000, // R/W: device-specific values start here
|
||||
DEVINFO_INT_CLASS_SPECIFIC = 0x04000, // R/W: device-specific values start here
|
||||
DEVINFO_INT_DEVICE_SPECIFIC = 0x08000, // R/W: device-specific values start here
|
||||
DEVINFO_INT_LAST = 0x0ffff,
|
||||
|
||||
// --- the following bits of info are returned as pointers ---
|
||||
// --- the following bits of info are returned as pointers ---
|
||||
DEVINFO_PTR_FIRST = 0x10000,
|
||||
|
||||
DEVINFO_PTR_ROM_REGION = DEVINFO_PTR_FIRST, // R/O: pointer to device-specific ROM region
|
||||
DEVINFO_PTR_MACHINE_CONFIG, // R/O: pointer to device-specific machine config
|
||||
DEVINFO_PTR_ROM_REGION = DEVINFO_PTR_FIRST, // R/O: pointer to device-specific ROM region
|
||||
DEVINFO_PTR_MACHINE_CONFIG, // R/O: pointer to device-specific machine config
|
||||
|
||||
DEVINFO_PTR_INTERNAL_MEMORY_MAP, // R/O: const addrmap_token *map
|
||||
DEVINFO_PTR_INTERNAL_MEMORY_MAP, // R/O: const addrmap_token *map
|
||||
DEVINFO_PTR_INTERNAL_MEMORY_MAP_0 = DEVINFO_PTR_INTERNAL_MEMORY_MAP + 0,
|
||||
DEVINFO_PTR_INTERNAL_MEMORY_MAP_1 = DEVINFO_PTR_INTERNAL_MEMORY_MAP + 1,
|
||||
DEVINFO_PTR_INTERNAL_MEMORY_MAP_2 = DEVINFO_PTR_INTERNAL_MEMORY_MAP + 2,
|
||||
DEVINFO_PTR_INTERNAL_MEMORY_MAP_3 = DEVINFO_PTR_INTERNAL_MEMORY_MAP + 3,
|
||||
DEVINFO_PTR_INTERNAL_MEMORY_MAP_LAST = DEVINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACES - 1,
|
||||
|
||||
DEVINFO_PTR_DEFAULT_MEMORY_MAP, // R/O: const addrmap_token *map
|
||||
DEVINFO_PTR_DEFAULT_MEMORY_MAP, // R/O: const addrmap_token *map
|
||||
DEVINFO_PTR_DEFAULT_MEMORY_MAP_0 = DEVINFO_PTR_DEFAULT_MEMORY_MAP + 0,
|
||||
DEVINFO_PTR_DEFAULT_MEMORY_MAP_1 = DEVINFO_PTR_DEFAULT_MEMORY_MAP + 1,
|
||||
DEVINFO_PTR_DEFAULT_MEMORY_MAP_2 = DEVINFO_PTR_DEFAULT_MEMORY_MAP + 2,
|
||||
DEVINFO_PTR_DEFAULT_MEMORY_MAP_3 = DEVINFO_PTR_DEFAULT_MEMORY_MAP + 3,
|
||||
DEVINFO_PTR_DEFAULT_MEMORY_MAP_LAST = DEVINFO_PTR_DEFAULT_MEMORY_MAP + ADDRESS_SPACES - 1,
|
||||
|
||||
DEVINFO_PTR_CLASS_SPECIFIC = 0x14000, // R/W: device-specific values start here
|
||||
DEVINFO_PTR_DEVICE_SPECIFIC = 0x18000, // R/W: device-specific values start here
|
||||
DEVINFO_PTR_CLASS_SPECIFIC = 0x14000, // R/W: device-specific values start here
|
||||
DEVINFO_PTR_DEVICE_SPECIFIC = 0x18000, // R/W: device-specific values start here
|
||||
DEVINFO_PTR_LAST = 0x1ffff,
|
||||
|
||||
// --- the following bits of info are returned as pointers to functions ---
|
||||
// --- the following bits of info are returned as pointers to functions ---
|
||||
DEVINFO_FCT_FIRST = 0x20000,
|
||||
|
||||
DEVINFO_FCT_START = DEVINFO_FCT_FIRST, // R/O: device_start_func
|
||||
DEVINFO_FCT_STOP, // R/O: device_stop_func
|
||||
DEVINFO_FCT_RESET, // R/O: device_reset_func
|
||||
DEVINFO_FCT_EXECUTE, // R/O: device_execute_func
|
||||
DEVINFO_FCT_VALIDITY_CHECK, // R/O: device_validity_check_func
|
||||
DEVINFO_FCT_NVRAM, // R/O: device_nvram_func
|
||||
DEVINFO_FCT_CUSTOM_CONFIG, // R/O: device_custom_config_func
|
||||
DEVINFO_FCT_GET_RUNTIME_INFO, // R/O: device_get_runtime_info_func
|
||||
DEVINFO_FCT_START = DEVINFO_FCT_FIRST, // R/O: device_start_func
|
||||
DEVINFO_FCT_STOP, // R/O: device_stop_func
|
||||
DEVINFO_FCT_RESET, // R/O: device_reset_func
|
||||
DEVINFO_FCT_EXECUTE, // R/O: device_execute_func
|
||||
DEVINFO_FCT_VALIDITY_CHECK, // R/O: device_validity_check_func
|
||||
DEVINFO_FCT_NVRAM, // R/O: device_nvram_func
|
||||
DEVINFO_FCT_CUSTOM_CONFIG, // R/O: device_custom_config_func
|
||||
DEVINFO_FCT_GET_RUNTIME_INFO, // R/O: device_get_runtime_info_func
|
||||
|
||||
DEVINFO_FCT_CLASS_SPECIFIC = 0x24000, // R/W: device-specific values start here
|
||||
DEVINFO_FCT_DEVICE_SPECIFIC = 0x28000, // R/W: device-specific values start here
|
||||
DEVINFO_FCT_CLASS_SPECIFIC = 0x24000, // R/W: device-specific values start here
|
||||
DEVINFO_FCT_DEVICE_SPECIFIC = 0x28000, // R/W: device-specific values start here
|
||||
DEVINFO_FCT_LAST = 0x2ffff,
|
||||
|
||||
// --- the following bits of info are returned as NULL-terminated strings ---
|
||||
// --- the following bits of info are returned as NULL-terminated strings ---
|
||||
DEVINFO_STR_FIRST = 0x30000,
|
||||
|
||||
DEVINFO_STR_NAME = DEVINFO_STR_FIRST, // R/O: name of the device
|
||||
DEVINFO_STR_FAMILY, // R/O: family of the device
|
||||
DEVINFO_STR_VERSION, // R/O: version of the device
|
||||
DEVINFO_STR_SOURCE_FILE, // R/O: file containing the device implementation
|
||||
DEVINFO_STR_CREDITS, // R/O: credits for the device implementation
|
||||
DEVINFO_STR_NAME = DEVINFO_STR_FIRST, // R/O: name of the device
|
||||
DEVINFO_STR_FAMILY, // R/O: family of the device
|
||||
DEVINFO_STR_VERSION, // R/O: version of the device
|
||||
DEVINFO_STR_SOURCE_FILE, // R/O: file containing the device implementation
|
||||
DEVINFO_STR_CREDITS, // R/O: credits for the device implementation
|
||||
|
||||
DEVINFO_STR_CLASS_SPECIFIC = 0x34000, // R/W: device-specific values start here
|
||||
DEVINFO_STR_DEVICE_SPECIFIC = 0x38000, // R/W: device-specific values start here
|
||||
DEVINFO_STR_CLASS_SPECIFIC = 0x34000, // R/W: device-specific values start here
|
||||
DEVINFO_STR_DEVICE_SPECIFIC = 0x38000, // R/W: device-specific values start here
|
||||
DEVINFO_STR_LAST = 0x3ffff
|
||||
};
|
||||
|
||||
@ -175,11 +175,11 @@ enum
|
||||
#define DEVICE_NVRAM_CALL(name) DEVICE_NVRAM_NAME(name)(device, file, read_or_write)
|
||||
|
||||
|
||||
// macro for specifying a clock derived from an owning device
|
||||
// macro for specifying a clock derived from an owning device
|
||||
#define DERIVED_CLOCK(num, den) (0xff000000 | ((num) << 12) | ((den) << 0))
|
||||
|
||||
|
||||
// shorthand for accessing devices by machine/type/tag
|
||||
// shorthand for accessing devices by machine/type/tag
|
||||
#define devtag_get_device(mach,tag) (mach)->device(tag)
|
||||
|
||||
#define devtag_reset(mach,tag) (mach)->device(tag)->reset()
|
||||
@ -222,14 +222,14 @@ typedef device_get_config_func device_type;
|
||||
template<class T> class tagged_device_list : public tagged_list<T>
|
||||
{
|
||||
typedef tagged_list<T> super;
|
||||
|
||||
|
||||
public:
|
||||
// pull the generic forms forward
|
||||
using super::first;
|
||||
using super::count;
|
||||
using super::index;
|
||||
using super::find;
|
||||
|
||||
|
||||
// provide type-specific overrides
|
||||
T *first(device_type type) const
|
||||
{
|
||||
@ -237,14 +237,14 @@ public:
|
||||
for (cur = super::first(); cur != NULL && cur->type != type; cur = cur->next) ;
|
||||
return cur;
|
||||
}
|
||||
|
||||
|
||||
int count(device_type type) const
|
||||
{
|
||||
int num = 0;
|
||||
for (const T *curdev = first(type); curdev != NULL; curdev = curdev->typenext()) num++;
|
||||
return num;
|
||||
}
|
||||
|
||||
|
||||
int index(device_type type, T *object) const
|
||||
{
|
||||
int num = 0;
|
||||
@ -252,13 +252,13 @@ public:
|
||||
if (cur == object) return num;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int index(device_type type, const char *tag) const
|
||||
{
|
||||
T *object = find(tag);
|
||||
return (object != NULL && object->type == type) ? index(type, object) : -1;
|
||||
}
|
||||
|
||||
|
||||
T *find(device_type type, int index) const
|
||||
{
|
||||
for (T *cur = first(type); cur != NULL; cur = cur->typenext())
|
||||
@ -273,14 +273,14 @@ public:
|
||||
for (cur = super::first(); cur != NULL && cur->devclass != devclass; cur = cur->next) ;
|
||||
return cur;
|
||||
}
|
||||
|
||||
|
||||
int count(device_class devclass) const
|
||||
{
|
||||
int num = 0;
|
||||
for (const T *curdev = first(devclass); curdev != NULL; curdev = curdev->classnext()) num++;
|
||||
return num;
|
||||
}
|
||||
|
||||
|
||||
int index(device_class devclass, T *object) const
|
||||
{
|
||||
int num = 0;
|
||||
@ -288,13 +288,13 @@ public:
|
||||
if (cur == object) return num;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int index(device_class devclass, const char *tag) const
|
||||
{
|
||||
T *object = find(tag);
|
||||
return (object != NULL && object->devclass == devclass) ? index(devclass, object) : -1;
|
||||
}
|
||||
|
||||
|
||||
T *find(device_class devclass, int index) const
|
||||
{
|
||||
for (T *cur = first(devclass); cur != NULL; cur = cur->classnext())
|
||||
@ -312,10 +312,10 @@ typedef tagged_device_list<device_config> device_config_list;
|
||||
class device_list : public tagged_device_list<running_device>
|
||||
{
|
||||
running_machine *machine;
|
||||
|
||||
|
||||
static void static_reset(running_machine *machine);
|
||||
static void static_stop(running_machine *machine);
|
||||
|
||||
|
||||
public:
|
||||
device_list();
|
||||
void import_config_list(const device_config_list &list, running_machine &machine);
|
||||
@ -327,36 +327,36 @@ public:
|
||||
|
||||
|
||||
|
||||
// the actual deviceinfo union
|
||||
// the actual deviceinfo union
|
||||
union deviceinfo
|
||||
{
|
||||
INT64 i; // generic integers
|
||||
void * p; // generic pointers
|
||||
genf * f; // generic function pointers
|
||||
char * s; // generic strings
|
||||
INT64 i; // generic integers
|
||||
void * p; // generic pointers
|
||||
genf * f; // generic function pointers
|
||||
char * s; // generic strings
|
||||
|
||||
device_start_func start; // DEVINFO_FCT_START
|
||||
device_stop_func stop; // DEVINFO_FCT_STOP
|
||||
device_reset_func reset; // DEVINFO_FCT_RESET
|
||||
device_execute_func execute; // DEVINFO_FCT_EXECUTE
|
||||
device_validity_check_func validity_check; // DEVINFO_FCT_VALIDITY_CHECK
|
||||
device_custom_config_func custom_config; // DEVINFO_FCT_CUSTOM_CONFIG
|
||||
device_nvram_func nvram; // DEVINFO_FCT_NVRAM
|
||||
device_get_runtime_info_func get_runtime_info; // DEVINFO_FCT_GET_RUNTIME_INFO
|
||||
const rom_entry * romregion; // DEVINFO_PTR_ROM_REGION
|
||||
const machine_config_token *machine_config; // DEVINFO_PTR_MACHINE_CONFIG
|
||||
const addrmap8_token * internal_map8; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
|
||||
const addrmap16_token * internal_map16; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
|
||||
const addrmap32_token * internal_map32; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
|
||||
const addrmap64_token * internal_map64; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
|
||||
const addrmap8_token * default_map8; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
|
||||
const addrmap16_token * default_map16; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
|
||||
const addrmap32_token * default_map32; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
|
||||
const addrmap64_token * default_map64; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
|
||||
device_start_func start; // DEVINFO_FCT_START
|
||||
device_stop_func stop; // DEVINFO_FCT_STOP
|
||||
device_reset_func reset; // DEVINFO_FCT_RESET
|
||||
device_execute_func execute; // DEVINFO_FCT_EXECUTE
|
||||
device_validity_check_func validity_check; // DEVINFO_FCT_VALIDITY_CHECK
|
||||
device_custom_config_func custom_config; // DEVINFO_FCT_CUSTOM_CONFIG
|
||||
device_nvram_func nvram; // DEVINFO_FCT_NVRAM
|
||||
device_get_runtime_info_func get_runtime_info; // DEVINFO_FCT_GET_RUNTIME_INFO
|
||||
const rom_entry * romregion; // DEVINFO_PTR_ROM_REGION
|
||||
const machine_config_token *machine_config; // DEVINFO_PTR_MACHINE_CONFIG
|
||||
const addrmap8_token * internal_map8; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
|
||||
const addrmap16_token * internal_map16; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
|
||||
const addrmap32_token * internal_map32; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
|
||||
const addrmap64_token * internal_map64; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
|
||||
const addrmap8_token * default_map8; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
|
||||
const addrmap16_token * default_map16; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
|
||||
const addrmap32_token * default_map32; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
|
||||
const addrmap64_token * default_map64; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
|
||||
};
|
||||
|
||||
|
||||
// the configuration for a general device
|
||||
// the configuration for a general device
|
||||
enum device_space
|
||||
{
|
||||
AS_PROGRAM = 0,
|
||||
@ -369,7 +369,7 @@ enum device_space
|
||||
class device_config
|
||||
{
|
||||
DISABLE_COPYING(device_config);
|
||||
|
||||
|
||||
public:
|
||||
device_config(const device_config *owner, device_type type, const char *tag, UINT32 clock);
|
||||
virtual ~device_config();
|
||||
@ -393,18 +393,18 @@ public:
|
||||
virtual UINT8 databus_width(int spacenum = 0) const { return get_config_int(DEVINFO_INT_DATABUS_WIDTH + spacenum); }
|
||||
virtual UINT8 addrbus_width(int spacenum = 0) const { return get_config_int(DEVINFO_INT_ADDRBUS_WIDTH + spacenum); }
|
||||
virtual INT8 addrbus_shift(int spacenum = 0) const { return get_config_int(DEVINFO_INT_ADDRBUS_SHIFT + spacenum); }
|
||||
|
||||
|
||||
virtual const rom_entry *rom_region() const { return reinterpret_cast<const rom_entry *>(get_config_ptr(DEVINFO_PTR_ROM_REGION)); }
|
||||
virtual const machine_config_token *machine_config_tokens() const { return reinterpret_cast<const machine_config_token *>(get_config_ptr(DEVINFO_PTR_MACHINE_CONFIG)); }
|
||||
virtual const addrmap_token *internal_map(int spacenum = 0) const { return reinterpret_cast<const addrmap_token *>(get_config_ptr(DEVINFO_PTR_INTERNAL_MEMORY_MAP + spacenum)); }
|
||||
virtual const addrmap_token *default_map(int spacenum = 0) const { return reinterpret_cast<const addrmap_token *>(get_config_ptr(DEVINFO_PTR_DEFAULT_MEMORY_MAP + spacenum)); }
|
||||
|
||||
|
||||
virtual const char *name() const { return get_config_string(DEVINFO_STR_NAME); }
|
||||
virtual const char *family() const { return get_config_string(DEVINFO_STR_FAMILY); }
|
||||
virtual const char *version() const { return get_config_string(DEVINFO_STR_VERSION); }
|
||||
virtual const char *source_file() const { return get_config_string(DEVINFO_STR_SOURCE_FILE); }
|
||||
virtual const char *credits() const { return get_config_string(DEVINFO_STR_CREDITS); }
|
||||
|
||||
|
||||
INT64 get_config_int(UINT32 state) const;
|
||||
void *get_config_ptr(UINT32 state) const;
|
||||
genf *get_config_fct(UINT32 state) const;
|
||||
@ -413,20 +413,20 @@ public:
|
||||
astring &subtag(astring &dest, const char *tag) const;
|
||||
astring &siblingtag(astring &dest, const char *tag) const;
|
||||
|
||||
// device relationships
|
||||
device_config * next; // next device (of any type/class)
|
||||
device_config * owner; // device that owns us, or NULL if nobody
|
||||
// device relationships
|
||||
device_config * next; // next device (of any type/class)
|
||||
device_config * owner; // device that owns us, or NULL if nobody
|
||||
|
||||
// device properties
|
||||
astring tag; // tag for this instance
|
||||
device_type type; // device type
|
||||
device_class devclass; // device class
|
||||
// device properties
|
||||
astring tag; // tag for this instance
|
||||
device_type type; // device type
|
||||
device_class devclass; // device class
|
||||
|
||||
// device configuration
|
||||
UINT32 clock; // device clock
|
||||
const addrmap_token * address_map[ADDRESS_SPACES]; // address maps for each address space
|
||||
const void * static_config; // static device configuration
|
||||
void * inline_config; // inline device configuration
|
||||
// device configuration
|
||||
UINT32 clock; // device clock
|
||||
const addrmap_token * address_map[ADDRESS_SPACES]; // address maps for each address space
|
||||
const void * static_config; // static device configuration
|
||||
void * inline_config; // inline device configuration
|
||||
};
|
||||
|
||||
|
||||
@ -434,16 +434,16 @@ public:
|
||||
class running_device
|
||||
{
|
||||
DISABLE_COPYING(running_device);
|
||||
|
||||
|
||||
const device_config & m_baseconfig;
|
||||
|
||||
|
||||
public: // private eventually
|
||||
const address_space * addrspace[ADDRESS_SPACES]; // auto-discovered address spaces
|
||||
const address_space * addrspace[ADDRESS_SPACES]; // auto-discovered address spaces
|
||||
|
||||
public:
|
||||
running_device(running_machine &machine, const device_config &config);
|
||||
virtual ~running_device();
|
||||
|
||||
|
||||
const device_config &baseconfig() const { return m_baseconfig; }
|
||||
|
||||
inline const address_space *space(int index = 0) const;
|
||||
@ -454,7 +454,7 @@ public:
|
||||
|
||||
const region_info *subregion(const char *tag) const;
|
||||
running_device *subdevice(const char *tag) const;
|
||||
|
||||
|
||||
running_device *typenext() const
|
||||
{
|
||||
running_device *cur;
|
||||
@ -468,7 +468,7 @@ public:
|
||||
for (cur = this->next; cur != NULL && cur->devclass != devclass; cur = cur->next) ;
|
||||
return cur;
|
||||
}
|
||||
|
||||
|
||||
void start();
|
||||
void reset();
|
||||
void stop();
|
||||
@ -479,12 +479,12 @@ public:
|
||||
UINT8 databus_width(int spacenum = 0) const { return m_baseconfig.databus_width(spacenum); }
|
||||
UINT8 addrbus_width(int spacenum = 0) const { return m_baseconfig.addrbus_width(spacenum); }
|
||||
INT8 addrbus_shift(int spacenum = 0) const { return m_baseconfig.addrbus_shift(spacenum); }
|
||||
|
||||
|
||||
const rom_entry *rom_region() const { return m_baseconfig.rom_region(); }
|
||||
const machine_config_token *machine_config_tokens() const { return m_baseconfig.machine_config_tokens(); }
|
||||
const addrmap_token *internal_map(int spacenum = 0) const { return m_baseconfig.internal_map(spacenum); }
|
||||
const addrmap_token *default_map(int spacenum = 0) const { return m_baseconfig.default_map(spacenum); }
|
||||
|
||||
|
||||
const char *name() const { return m_baseconfig.name(); }
|
||||
const char *family() const { return m_baseconfig.family(); }
|
||||
const char *version() const { return m_baseconfig.version(); }
|
||||
@ -499,31 +499,31 @@ public:
|
||||
INT64 get_runtime_int(UINT32 state);
|
||||
void *get_runtime_ptr(UINT32 state);
|
||||
const char *get_runtime_string(UINT32 state);
|
||||
|
||||
|
||||
void set_address_space(int spacenum, const address_space *space);
|
||||
|
||||
// these fields are only valid once the device is attached to a machine
|
||||
running_machine * machine; // machine if device is live
|
||||
// these fields are only valid once the device is attached to a machine
|
||||
running_machine * machine; // machine if device is live
|
||||
|
||||
// device relationships
|
||||
running_device * next; // next device (of any type/class)
|
||||
running_device * owner; // device that owns us, or NULL if nobody
|
||||
// device relationships
|
||||
running_device * next; // next device (of any type/class)
|
||||
running_device * owner; // device that owns us, or NULL if nobody
|
||||
|
||||
// device properties
|
||||
astring tag; // tag for this instance
|
||||
device_type type; // device type
|
||||
device_class devclass; // device class
|
||||
// device properties
|
||||
astring tag; // tag for this instance
|
||||
device_type type; // device type
|
||||
device_class devclass; // device class
|
||||
|
||||
// device configuration
|
||||
UINT32 clock; // device clock
|
||||
// device configuration
|
||||
UINT32 clock; // device clock
|
||||
|
||||
// these fields are only valid if the device is live
|
||||
bool started; // true if the start function has succeeded
|
||||
void * token; // token if device is live
|
||||
UINT32 tokenbytes; // size of the token data allocated
|
||||
const region_info * region; // our device-local region
|
||||
// these fields are only valid if the device is live
|
||||
bool started; // true if the start function has succeeded
|
||||
void * token; // token if device is live
|
||||
UINT32 tokenbytes; // size of the token data allocated
|
||||
const region_info * region; // our device-local region
|
||||
|
||||
device_execute_func execute; // quick pointer to execute callback
|
||||
device_execute_func execute; // quick pointer to execute callback
|
||||
device_get_runtime_info_func get_runtime_info;
|
||||
};
|
||||
|
||||
|
@ -331,23 +331,23 @@ public:
|
||||
tagged_list() :
|
||||
head(NULL),
|
||||
tailptr(&head) { }
|
||||
|
||||
|
||||
virtual ~tagged_list()
|
||||
{
|
||||
while (head != NULL)
|
||||
remove(head);
|
||||
}
|
||||
|
||||
|
||||
T *first() const { return head; }
|
||||
|
||||
|
||||
int count() const
|
||||
{
|
||||
int num = 0;
|
||||
for (T *cur = head; cur != NULL; cur = cur->next)
|
||||
num++;
|
||||
return num;
|
||||
return num;
|
||||
}
|
||||
|
||||
|
||||
int index(T *object) const
|
||||
{
|
||||
int num = 0;
|
||||
@ -358,13 +358,13 @@ public:
|
||||
num++;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int index(const char *tag) const
|
||||
{
|
||||
T *object = find(tag);
|
||||
return (object != NULL) ? index(object) : -1;
|
||||
}
|
||||
|
||||
|
||||
T *prepend(const char *tag, T *object, bool replace_if_duplicate = false)
|
||||
{
|
||||
if (map.add_unique_hash(tag, object, replace_if_duplicate) != TMERR_NONE)
|
||||
@ -375,7 +375,7 @@ public:
|
||||
tailptr = &object->next;
|
||||
return object;
|
||||
}
|
||||
|
||||
|
||||
T *append(const char *tag, T *object, bool replace_if_duplicate = false)
|
||||
{
|
||||
if (map.add_unique_hash(tag, object, replace_if_duplicate) != TMERR_NONE)
|
||||
@ -385,7 +385,7 @@ public:
|
||||
tailptr = &object->next;
|
||||
return object;
|
||||
}
|
||||
|
||||
|
||||
void remove(T *object)
|
||||
{
|
||||
for (T **objectptr = &head; *objectptr != NULL; objectptr = &(*objectptr)->next)
|
||||
@ -399,14 +399,14 @@ public:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void remove(const char *tag)
|
||||
{
|
||||
T *object = find(tag);
|
||||
if (object != NULL)
|
||||
remove(object);
|
||||
}
|
||||
|
||||
|
||||
T *find(const char *tag) const
|
||||
{
|
||||
return map.find_hash_only(tag);
|
||||
|
@ -696,7 +696,7 @@ struct _input_field_user_settings
|
||||
class input_port_config
|
||||
{
|
||||
DISABLE_COPYING(input_port_config);
|
||||
|
||||
|
||||
public:
|
||||
input_port_config(const char *tag);
|
||||
~input_port_config();
|
||||
|
@ -1632,7 +1632,7 @@ static const ldplayer_interface *get_interface(const device_config *devconfig)
|
||||
for (int pltype = 0; pltype < ARRAY_LENGTH(player_interfaces); pltype++)
|
||||
if (player_interfaces[pltype]->type == config->type)
|
||||
return player_interfaces[pltype];
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1777,7 +1777,7 @@ static void memory_init_spaces(running_machine *machine)
|
||||
/* link us in */
|
||||
*nextptr = space;
|
||||
nextptr = (address_space **)&space->next;
|
||||
|
||||
|
||||
/* notify the deveice */
|
||||
device->set_address_space(spacenum, space);
|
||||
}
|
||||
|
@ -1996,7 +1996,7 @@ static void init_timetables(FM_OPN *OPN, double freqbase)
|
||||
}
|
||||
|
||||
/* there are 2048 FNUMs that can be generated using FNUM/BLK registers
|
||||
but LFO works with one more bit of a precision so we really need 4096 elements */
|
||||
but LFO works with one more bit of a precision so we really need 4096 elements */
|
||||
/* calculate fnumber -> increment counter table */
|
||||
for(i = 0; i < 4096; i++)
|
||||
{
|
||||
@ -2111,7 +2111,7 @@ static void init_tables(void)
|
||||
o = o / (ENV_STEP/4);
|
||||
|
||||
n = (int)(2.0*o);
|
||||
if (n&1) /* round to nearest */
|
||||
if (n&1) /* round to nearest */
|
||||
n = (n>>1)+1;
|
||||
else
|
||||
n = n>>1;
|
||||
@ -2283,8 +2283,8 @@ void ym2612_update_one(void *chip, FMSAMPLE **buffer, int length)
|
||||
lt += ((out_fm[5]>>0) & OPN->pan[10]);
|
||||
rt += ((out_fm[5]>>0) & OPN->pan[11]);
|
||||
|
||||
// Limit( lt, MAXOUT, MINOUT );
|
||||
// Limit( rt, MAXOUT, MINOUT );
|
||||
// Limit( lt, MAXOUT, MINOUT );
|
||||
// Limit( rt, MAXOUT, MINOUT );
|
||||
|
||||
#ifdef SAVE_SAMPLE
|
||||
SAVE_ALL_CHANNELS
|
||||
|
@ -231,7 +231,7 @@ and off as it normally does during speech). Once START has gone low-high-low, th
|
||||
* if mirrored mode is OFF, increment oddphone. if not, don't touch it here. if oddphone was 1 before the increment, increment phoneaddress and set oddphone to 0
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#undef ACCURATE_SQUEAL
|
||||
|
||||
#include "emu.h"
|
||||
|
@ -3,7 +3,7 @@
|
||||
#ifndef __S14001A_H__
|
||||
#define __S14001A_H__
|
||||
|
||||
int s14001a_bsy_r(running_device *device); /* read BUSY pin */
|
||||
int s14001a_bsy_r(running_device *device); /* read BUSY pin */
|
||||
void s14001a_reg_w(running_device *device, int data); /* write to input latch */
|
||||
void s14001a_rst_w(running_device *device, int data); /* write to RESET pin */
|
||||
void s14001a_set_clock(running_device *device, int clock); /* set VSU-1000 clock */
|
||||
|
@ -76,7 +76,7 @@
|
||||
Fix an issue with SN76489 and SN76489A having the wrong periodic noise periods.
|
||||
Note that properly emulating the noise cycle bit timing accurately may require
|
||||
extensive rewriting.
|
||||
|
||||
|
||||
24/01/2010: Lord Nightmare
|
||||
Implement periodic noise as forcing one of the XNOR or XOR taps to 1 or 0 respectively.
|
||||
Thanks to PlgDavid for providing samples which helped immensely here.
|
||||
@ -388,7 +388,7 @@ static void generic_start(running_device *device, int feedbackmask, int noisetap
|
||||
chip->Negate = negate;
|
||||
chip->Stereo = stereo;
|
||||
chip->ClockDivider = clockdivider;
|
||||
chip->CurrentClock = clockdivider-1;
|
||||
chip->CurrentClock = clockdivider-1;
|
||||
|
||||
state_save_register_device_item_array(device, 0, chip->VolTable);
|
||||
state_save_register_device_item_array(device, 0, chip->Register);
|
||||
|
@ -592,7 +592,7 @@ endif
|
||||
#-------------------------------------------------
|
||||
|
||||
ifneq ($(filter YM2151,$(SOUNDS)),)
|
||||
SOUNDOBJS += $(SOUNDOBJ)/2151intf.o $(SOUNDOBJ)/ym2151.o
|
||||
SOUNDOBJS += $(SOUNDOBJ)/2151intf.o $(SOUNDOBJ)/ym2151.o
|
||||
endif
|
||||
|
||||
ifneq ($(filter YM2203,$(SOUNDS)),)
|
||||
|
@ -133,7 +133,7 @@ static void doclr16( running_device *device, int opcode, UINT16 fill, int *dst,
|
||||
hd63484->ram[*dst] ^= fill;
|
||||
break;
|
||||
}
|
||||
if (ax == 0)
|
||||
if (ax == 0)
|
||||
break;
|
||||
else if (ax > 0)
|
||||
{
|
||||
@ -151,14 +151,14 @@ static void doclr16( running_device *device, int opcode, UINT16 fill, int *dst,
|
||||
if (_ay < 0)
|
||||
{
|
||||
*dst = (*dst + (hd63484->reg[0xca/2] & 0x0fff) - ax) & (HD63484_RAM_SIZE - 1);
|
||||
if (ay == 0)
|
||||
if (ay == 0)
|
||||
break;
|
||||
ay++;
|
||||
}
|
||||
else
|
||||
{
|
||||
*dst = (*dst - (hd63484->reg[0xca/2] & 0x0fff) - ax) & (HD63484_RAM_SIZE - 1);
|
||||
if (ay == 0)
|
||||
if (ay == 0)
|
||||
break;
|
||||
ay--;
|
||||
}
|
||||
@ -1481,14 +1481,14 @@ WRITE16_DEVICE_HANDLER( hd63484_data_w )
|
||||
|
||||
COMBINE_DATA(&hd63484->reg[hd63484->regno/2]);
|
||||
|
||||
if (hd63484->skattva_hack)
|
||||
if (hd63484->skattva_hack)
|
||||
hd63484->reg[2/2] = (hd63484->reg[2/2] & 0xf8ff) | 0x0200; // hack to set proper color depth in skattva
|
||||
|
||||
if (hd63484->regno & 0x80)
|
||||
if (hd63484->regno & 0x80)
|
||||
hd63484->regno += 2; /* autoincrement */
|
||||
|
||||
#if LOG_COMMANDS
|
||||
// logerror("PC %05x: HD63484 register %02x write %04x\n", cpu_get_pc(space->cpu), hd63484->regno, hd63484->reg[hd63484->regno/2]);
|
||||
// logerror("PC %05x: HD63484 register %02x write %04x\n", cpu_get_pc(space->cpu), hd63484->regno, hd63484->reg[hd63484->regno/2]);
|
||||
#endif
|
||||
|
||||
if (hd63484->regno == 0) /* FIFO */
|
||||
@ -1505,14 +1505,14 @@ READ16_DEVICE_HANDLER( hd63484_data_r )
|
||||
else if (hd63484->regno == 0)
|
||||
{
|
||||
#if LOG_COMMANDS
|
||||
// logerror("%05x: HD63484 read FIFO\n", cpu_get_pc(space->cpu));
|
||||
// logerror("%05x: HD63484 read FIFO\n", cpu_get_pc(space->cpu));
|
||||
#endif
|
||||
res = hd63484->readfifo;
|
||||
}
|
||||
else
|
||||
{
|
||||
#if LOG_COMMANDS
|
||||
// logerror("%05x: HD63484 read register %02x\n", cpu_get_pc(space->cpu), hd63484->regno);
|
||||
// logerror("%05x: HD63484 read register %02x\n", cpu_get_pc(space->cpu), hd63484->regno);
|
||||
#endif
|
||||
res = 0;
|
||||
}
|
||||
@ -1557,9 +1557,9 @@ static DEVICE_START( hd63484 )
|
||||
hd63484->skattva_hack = intf->skattva_hack;
|
||||
hd63484->ram = auto_alloc_array_clear(device->machine, UINT16, HD63484_RAM_SIZE);
|
||||
|
||||
// state_save_register_device_item(device, 0, hd63484->clear_bitmap);
|
||||
// state_save_register_device_item_pointer(device, 0, hd63484->spriteram, 0x1000);
|
||||
// state_save_register_device_item_bitmap(device, 0, hd63484->sprites_bitmap);
|
||||
// state_save_register_device_item(device, 0, hd63484->clear_bitmap);
|
||||
// state_save_register_device_item_pointer(device, 0, hd63484->spriteram, 0x1000);
|
||||
// state_save_register_device_item_bitmap(device, 0, hd63484->sprites_bitmap);
|
||||
}
|
||||
|
||||
static DEVICE_RESET( hd63484 )
|
||||
|
@ -150,7 +150,7 @@ void tagmap_remove(tagmap *map, const char *tag)
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
tagmap_remove_object - remove an entry from a
|
||||
tagmap_remove_object - remove an entry from a
|
||||
tagmap by object pointer
|
||||
-------------------------------------------------*/
|
||||
|
||||
|
@ -187,7 +187,7 @@ void micro3d_noise_sh_w(running_machine *machine, UINT8 data)
|
||||
{
|
||||
running_device *device = devtag_get_device(machine, data & 4 ? "noise_2" : "noise_1");
|
||||
noise_state *nstate = (noise_state *)device->token;
|
||||
|
||||
|
||||
if (state->dac_data != nstate->dac[data & 3])
|
||||
{
|
||||
double q;
|
||||
@ -323,7 +323,7 @@ static DEVICE_START( micro3d_sound )
|
||||
configure_filter(&state->noise_filters[1], 2.7e3 + 1e3, 0.30e-6);
|
||||
configure_filter(&state->noise_filters[2], 2.7e3 + 270, 0.15e-6);
|
||||
configure_filter(&state->noise_filters[3], 2.7e3 + 0, 0.082e-6);
|
||||
// configure_filter(&state->noise_filters[4], 33e3, 0.1e-6);
|
||||
// configure_filter(&state->noise_filters[4], 33e3, 0.1e-6);
|
||||
}
|
||||
|
||||
static DEVICE_RESET( micro3d_sound )
|
||||
|
@ -813,12 +813,12 @@ static const y8950_interface y8950_config = {
|
||||
static MACHINE_DRIVER_START( cybertnk )
|
||||
MDRV_CPU_ADD("maincpu", M68000,20000000/2)
|
||||
MDRV_CPU_PROGRAM_MAP(master_mem)
|
||||
// MDRV_CPU_VBLANK_INT_HACK(master_irq,2)
|
||||
// MDRV_CPU_VBLANK_INT_HACK(master_irq,2)
|
||||
MDRV_CPU_VBLANK_INT("screen", irq1_line_hold)
|
||||
|
||||
MDRV_CPU_ADD("slave", M68000,20000000/2)
|
||||
MDRV_CPU_PROGRAM_MAP(slave_mem)
|
||||
// MDRV_CPU_VBLANK_INT_HACK(slave_irq,2)
|
||||
// MDRV_CPU_VBLANK_INT_HACK(slave_irq,2)
|
||||
MDRV_CPU_VBLANK_INT("screen", irq3_line_hold)
|
||||
|
||||
MDRV_CPU_ADD("audiocpu", Z80,3579500)
|
||||
|
@ -42,8 +42,8 @@ ToDo:
|
||||
|
||||
|
||||
PCB Layouts
|
||||
-----------
|
||||
|
||||
-----------
|
||||
|
||||
Bad Dudes vs Dragonninja
|
||||
Data East, 1988
|
||||
|
||||
|
@ -247,23 +247,23 @@ Stamp on disk:
|
||||
=====================================================================================
|
||||
Quater Horse Classic
|
||||
|
||||
Board silkscreend QUARTERHORSE
|
||||
(C) ARJAY EXPORT CO.,INC/PRESTIGE GAMES> -1995 REV-C-95
|
||||
HYANNIS,MA.02601--MADE IN USA
|
||||
Board silkscreend QUARTERHORSE
|
||||
(C) ARJAY EXPORT CO.,INC/PRESTIGE GAMES> -1995 REV-C-95
|
||||
HYANNIS,MA.02601--MADE IN USA
|
||||
|
||||
.A10 - 27256 stickered QUARTERHORSE CLASSIC
|
||||
10A - V1.1
|
||||
(c)1995 ARJAY EXPORT - PRESTIGE GAMES
|
||||
.A10 - 27256 stickered QUARTERHORSE CLASSIC
|
||||
10A - V1.1
|
||||
(c)1995 ARJAY EXPORT - PRESTIGE GAMES
|
||||
|
||||
|
||||
.H6 - 27128 stickered QUARTERHORSE CLASSIC
|
||||
CGR - 6H - V1.0
|
||||
(c)1995 ARJAY EXPORT - PRESTIGE GAMES
|
||||
.H6 - 27128 stickered QUARTERHORSE CLASSIC
|
||||
CGR - 6H - V1.0
|
||||
(c)1995 ARJAY EXPORT - PRESTIGE GAMES
|
||||
|
||||
.K6 - 27128 stickered QUARTERHORSE CLASSIC
|
||||
CGR - 6K - V1.0
|
||||
(c)1995 ARJAY EXPORT - PRESTIGE GAMES
|
||||
.U9 - Lattice GAL22V10 on daughter board
|
||||
.K6 - 27128 stickered QUARTERHORSE CLASSIC
|
||||
CGR - 6K - V1.0
|
||||
(c)1995 ARJAY EXPORT - PRESTIGE GAMES
|
||||
.U9 - Lattice GAL22V10 on daughter board
|
||||
|
||||
P8085 @ B8
|
||||
P8275 @ F4
|
||||
|
@ -69,7 +69,7 @@ static MACHINE_DRIVER_START( kongambl )
|
||||
MDRV_CPU_ADD("maincpu", M68000, 16000000) // ?
|
||||
MDRV_CPU_PROGRAM_MAP(kongambl_map)
|
||||
//MDRV_CPU_VBLANK_INT("screen", irq1_line_hold)
|
||||
|
||||
|
||||
MDRV_GFXDECODE(kongambl)
|
||||
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -1349,7 +1349,7 @@ The bootleg has some gfx glitches (flickering of the text) and the colour of the
|
||||
Encrypted custom z80 in epoxy block. Clock is 12mhz/2
|
||||
|
||||
YM2413 clock is 3.75mhz. The 7.5mhz clock which is divided by 2 by a 74ls74 before going to the YM2413 is too
|
||||
difficult to follow.
|
||||
difficult to follow.
|
||||
It is derived from the 10mhz pixel clock since shorting it the video goes out of sync and the music change in pitch/speed.
|
||||
|
||||
Oki5205 clock is 384khz (resonator)
|
||||
|
@ -642,7 +642,7 @@ static MACHINE_RESET( island2a )
|
||||
// this set expects these values set before it will boot
|
||||
// protection added on this bootleg?
|
||||
multfish_bram[0x2003] = 0x01;
|
||||
multfish_bram[0x4003] = 0x02;
|
||||
multfish_bram[0x4003] = 0x02;
|
||||
}
|
||||
static MACHINE_DRIVER_START( island2a )
|
||||
/* basic machine hardware */
|
||||
|
@ -39,15 +39,15 @@ static void mem_map_banks(running_machine *machine)
|
||||
slot_select = (mem_map >> 0) & 0x03;
|
||||
switch(slot_select)
|
||||
{
|
||||
case 0:
|
||||
case 0:
|
||||
{
|
||||
memory_install_read_bank(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x0000, 0x3fff, 0, 0, "bank1" );
|
||||
memory_set_bankptr(machine, "bank1", memory_region(machine, "maincpu"));
|
||||
break;
|
||||
};
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 2:
|
||||
case 3:
|
||||
{
|
||||
memory_unmap_read(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x0000, 0x3fff, 0, 0);
|
||||
break;
|
||||
@ -58,24 +58,24 @@ static void mem_map_banks(running_machine *machine)
|
||||
slot_select = (mem_map >> 2) & 0x03;
|
||||
switch(slot_select)
|
||||
{
|
||||
case 0:
|
||||
case 0:
|
||||
{
|
||||
memory_install_read_bank(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x4000, 0x5fff, 0, 0, "bank21" );
|
||||
memory_install_read_bank(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x6000, 0x7fff, 0, 0, "bank22" );
|
||||
memory_set_bankptr(machine, "bank21", memory_region(machine, "maincpu") + 0x4000);
|
||||
memory_set_bankptr(machine, "bank21", memory_region(machine, "maincpu") + 0x4000);
|
||||
memory_set_bankptr(machine, "bank22", memory_region(machine, "maincpu") + 0x4000 + 0x2000);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
case 1:
|
||||
{
|
||||
memory_install_read_bank(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x4000, 0x5fff, 0, 0, "bank21" );
|
||||
memory_install_read_bank(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x6000, 0x7fff, 0, 0, "bank22" );
|
||||
memory_set_bankptr(machine, "bank21", memory_region(machine, "game") + mem_banks[0]*0x2000);
|
||||
memory_set_bankptr(machine, "bank21", memory_region(machine, "game") + mem_banks[0]*0x2000);
|
||||
memory_set_bankptr(machine, "bank22", memory_region(machine, "game") + mem_banks[1]*0x2000);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
case 3:
|
||||
case 2:
|
||||
case 3:
|
||||
{
|
||||
memory_unmap_read(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x4000, 0x7fff, 0, 0);
|
||||
break;
|
||||
@ -86,7 +86,7 @@ static void mem_map_banks(running_machine *machine)
|
||||
slot_select = (mem_map >> 4) & 0x03;
|
||||
switch(slot_select)
|
||||
{
|
||||
case 1:
|
||||
case 1:
|
||||
{
|
||||
memory_install_read_bank(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x8000, 0x9fff, 0, 0, "bank31" );
|
||||
memory_install_read_bank(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xa000, 0xbfff, 0, 0, "bank32" );
|
||||
@ -94,9 +94,9 @@ static void mem_map_banks(running_machine *machine)
|
||||
memory_set_bankptr(machine, "bank32", memory_region(machine, "game") + mem_banks[3]*0x2000);
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
case 2:
|
||||
case 3:
|
||||
case 0:
|
||||
case 2:
|
||||
case 3:
|
||||
{
|
||||
memory_unmap_read(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x8000, 0xbfff, 0, 0);
|
||||
break;
|
||||
@ -108,14 +108,14 @@ static void mem_map_banks(running_machine *machine)
|
||||
|
||||
switch(slot_select)
|
||||
{
|
||||
case 0:
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 2:
|
||||
{
|
||||
memory_unmap_read(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xc000, 0xffff, 0, 0);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
case 3:
|
||||
{
|
||||
memory_install_read_bank(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xc000, 0xffff, 0, 0, "bank4" );
|
||||
memory_set_bankptr(machine, "bank4", main_mem);
|
||||
|
@ -44,7 +44,7 @@ GFXDECODE_END
|
||||
static MACHINE_DRIVER_START( pinkiri8 )
|
||||
MDRV_CPU_ADD("maincpu",Z180,16000000)
|
||||
MDRV_CPU_PROGRAM_MAP(pinkiri8_map)
|
||||
// MDRV_CPU_VBLANK_INT_HACK(irq0_line_hold,4)
|
||||
// MDRV_CPU_VBLANK_INT_HACK(irq0_line_hold,4)
|
||||
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
MDRV_SCREEN_REFRESH_RATE(60)
|
||||
@ -60,8 +60,8 @@ static MACHINE_DRIVER_START( pinkiri8 )
|
||||
|
||||
/* sound hardware */
|
||||
MDRV_SPEAKER_STANDARD_MONO("mono")
|
||||
// MDRV_SOUND_ADD("aysnd", AY8910, 8000000/4 /* guess */)
|
||||
// MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
|
||||
// MDRV_SOUND_ADD("aysnd", AY8910, 8000000/4 /* guess */)
|
||||
// MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
/***************************************************************************
|
||||
|
@ -724,10 +724,10 @@ static INPUT_PORTS_START( tgm2 )
|
||||
/* sticks should actually be PORT_4WAY according to manual */
|
||||
|
||||
PORT_START("JP4") /* jumper pads on the PCB. Checked and discarded. However, if you force word 0x6060000 to 1/2/3 you can have various effects. Disbled at compile time */
|
||||
// PORT_DIPNAME( 0x03000000, 0x01000000, DEF_STR( Region ) )
|
||||
// PORT_DIPSETTING( 0x00000000, DEF_STR( Japan ) )
|
||||
// PORT_DIPSETTING( 0x02000000, "International Ver A." )
|
||||
// PORT_DIPSETTING( 0x01000000, "International Ver B." )
|
||||
// PORT_DIPNAME( 0x03000000, 0x01000000, DEF_STR( Region ) )
|
||||
// PORT_DIPSETTING( 0x00000000, DEF_STR( Japan ) )
|
||||
// PORT_DIPSETTING( 0x02000000, "International Ver A." )
|
||||
// PORT_DIPSETTING( 0x01000000, "International Ver B." )
|
||||
PORT_BIT( 0x10000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("eeprom", eeprom_read_bit)
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
@ -928,7 +928,7 @@ static DRIVER_INIT( endless )
|
||||
{
|
||||
INT32 i;
|
||||
UINT8 *rom = memory_region(machine, "user3");
|
||||
|
||||
|
||||
/* there is more to this, 0x800 based block swaps? */
|
||||
for(i=0;i<0x200000;i++)
|
||||
{
|
||||
|
@ -362,7 +362,7 @@ static const gfx_layout tiles16x32_layout = {
|
||||
3,
|
||||
{ RGN_FRAC(2,3), RGN_FRAC(1,3), RGN_FRAC(0,3) },
|
||||
{ 64+0, 64+1, 64+2, 64+3, 64+4, 64+5, 64+6, 64+7, 0, 1, 2, 3, 4, 5, 6, 7 },
|
||||
{ 55*8, 54*8, 53*8, 52*8, 51*8, 50*8, 49*8, 48*8,
|
||||
{ 55*8, 54*8, 53*8, 52*8, 51*8, 50*8, 49*8, 48*8,
|
||||
39*8, 38*8, 37*8, 36*8, 35*8, 34*8, 33*8, 32*8,
|
||||
23*8, 22*8, 21*8, 20*8, 19*8, 18*8, 17*8, 16*8,
|
||||
7*8, 6*8, 5*8, 4*8, 3*8, 2*8, 1*8, 0*8
|
||||
|
@ -274,7 +274,7 @@ static WRITE8_HANDLER( subsino_out_a_w )
|
||||
coin_counter_w( space->machine, 2, data & 0x10 ); /* keyout */
|
||||
coin_counter_w( space->machine, 3, data & 0x20 ); /* payout */
|
||||
|
||||
// popmessage("Out A %02x",data);
|
||||
// popmessage("Out A %02x",data);
|
||||
|
||||
}
|
||||
|
||||
@ -357,7 +357,7 @@ static WRITE8_HANDLER( subsino_out_b_w )
|
||||
output_set_lamp_value(6, (data >> 6) & 1); /* Lamp 6 */
|
||||
output_set_lamp_value(7, (data >> 7) & 1); /* Lamp 7 */
|
||||
|
||||
// popmessage("Out B %02x",data);
|
||||
// popmessage("Out B %02x",data);
|
||||
}
|
||||
|
||||
|
||||
@ -444,7 +444,7 @@ static ADDRESS_MAP_START( victor21_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
|
||||
AM_RANGE( 0x0900b, 0x0900b ) AM_RAM //protection
|
||||
|
||||
// AM_RANGE( 0x0900c, 0x0900c ) AM_DEVWRITE( "oki", okim6295_w )
|
||||
// AM_RANGE( 0x0900c, 0x0900c ) AM_DEVWRITE( "oki", okim6295_w )
|
||||
|
||||
AM_RANGE( 0x0900e, 0x0900f ) AM_DEVWRITE( "ymsnd", ym2413_w )
|
||||
|
||||
@ -646,7 +646,7 @@ static INPUT_PORTS_START( victor21 )
|
||||
|
||||
PORT_START( "INA" )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_V) PORT_NAME("Split")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_V) PORT_NAME("Split")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_CODE(KEYCODE_Z) PORT_NAME("Deal / Hit")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_BET ) PORT_IMPULSE(3)
|
||||
@ -966,7 +966,7 @@ static INPUT_PORTS_START( sharkpy )
|
||||
PORT_DIPSETTING( 0x10, "5" )
|
||||
PORT_DIPSETTING( 0x08, "6" )
|
||||
PORT_DIPSETTING( 0x00, "7" )
|
||||
PORT_DIPUNKNOWN( 0x40, 0x40 )
|
||||
PORT_DIPUNKNOWN( 0x40, 0x40 )
|
||||
PORT_DIPUNKNOWN( 0x80, 0x80 )
|
||||
|
||||
PORT_START( "DSW4" )
|
||||
@ -1058,7 +1058,7 @@ static INPUT_PORTS_START( smoto16 )
|
||||
PORT_DIPSETTING( 0x28, "5" )
|
||||
PORT_DIPSETTING( 0x30, "6" )
|
||||
PORT_DIPSETTING( 0x38, "7" )
|
||||
PORT_DIPUNKNOWN( 0x40, 0x40 )
|
||||
PORT_DIPUNKNOWN( 0x40, 0x40 )
|
||||
PORT_DIPUNKNOWN( 0x80, 0x80 )
|
||||
|
||||
PORT_START( "DSW4" )
|
||||
@ -1152,7 +1152,7 @@ static INPUT_PORTS_START( smoto20 )
|
||||
PORT_DIPSETTING( 0x28, "5" )
|
||||
PORT_DIPSETTING( 0x30, "6" )
|
||||
PORT_DIPSETTING( 0x38, "7" )
|
||||
PORT_DIPUNKNOWN( 0x40, 0x40 )
|
||||
PORT_DIPUNKNOWN( 0x40, 0x40 )
|
||||
PORT_DIPUNKNOWN( 0x80, 0x80 )
|
||||
|
||||
PORT_START( "DSW4" )
|
||||
|
@ -28,12 +28,12 @@
|
||||
========
|
||||
|
||||
In 1975, Si Redd founded A1-Supply. This was renamed to Sircoma in 1978,
|
||||
and eventually IGT (International Game Technology) in 1981.
|
||||
and eventually IGT (International Game Technology) in 1981.
|
||||
|
||||
Along the way, in 1978, Fortune Coin Company was acquired and contained
|
||||
the basis to their Fortune I game machines.
|
||||
Along the way, in 1978, Fortune Coin Company was acquired and contained
|
||||
the basis to their Fortune I game machines.
|
||||
|
||||
The Fortune I hardware consisted of the following games:
|
||||
The Fortune I hardware consisted of the following games:
|
||||
Regular Draw Poker
|
||||
Progressive Draw Poker
|
||||
Joker Wild Draw Poker
|
||||
@ -438,7 +438,7 @@ static PALETTE_INIT( fortune1 )
|
||||
b = tb - (i * (tb / 5));
|
||||
|
||||
c = j;
|
||||
|
||||
|
||||
// Swap Position of Inner-most Colors on Each 4 Color Palette
|
||||
if ((c % 4) == 1 || (c % 4) == 2)
|
||||
c = ((int)(c / 4) * 4) + (3 - (c % 4));
|
||||
|
@ -52,7 +52,7 @@ struct _micro3d_state
|
||||
} mc68901;
|
||||
|
||||
UINT16 *shared_ram;
|
||||
running_device *duart68681;
|
||||
running_device *duart68681;
|
||||
UINT8 m68681_tx0;
|
||||
|
||||
/* Sound */
|
||||
|
@ -168,7 +168,7 @@ WRITE16_HANDLER( micro3d_mc68901_w )
|
||||
int mode = state->mc68901.tacr & 0xf;
|
||||
|
||||
state->mc68901.tadr = data;
|
||||
|
||||
|
||||
/* Timer stopped */
|
||||
if (mode == 0)
|
||||
{
|
||||
@ -628,7 +628,7 @@ READ16_HANDLER( micro3d_encoder_l_r )
|
||||
static TIMER_CALLBACK( adc_done_callback )
|
||||
{
|
||||
micro3d_state *state = (micro3d_state*)machine->driver_data;
|
||||
|
||||
|
||||
switch (param)
|
||||
{
|
||||
case 0: state->adc_val = input_port_read_safe(machine, "THROTTLE", 0);
|
||||
@ -639,7 +639,7 @@ static TIMER_CALLBACK( adc_done_callback )
|
||||
case 3: break;
|
||||
}
|
||||
|
||||
// mc68901_int_gen(machine, GPIP3);
|
||||
// mc68901_int_gen(machine, GPIP3);
|
||||
}
|
||||
|
||||
READ16_HANDLER( micro3d_adc_r )
|
||||
@ -685,7 +685,7 @@ WRITE16_HANDLER( host_drmath_int_w )
|
||||
|
||||
/*************************************
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*************************************/
|
||||
|
||||
@ -732,14 +732,14 @@ DRIVER_INIT( micro3d )
|
||||
state->duart68681 = devtag_get_device(machine, "duart68681");
|
||||
|
||||
/* The Am29000 program seems to rely on RAM from 0x00470000 onwards being
|
||||
non-zero on a reset, otherwise the 3D object data doesn't get uploaded! */
|
||||
non-zero on a reset, otherwise the 3D object data doesn't get uploaded! */
|
||||
memory_write_dword(space, 0x00470000, 0xa5a5a5a5);
|
||||
|
||||
state->mc68901.timer_a = timer_alloc(machine, mfp_timer_a_cb, NULL);
|
||||
|
||||
/* TODO? BOTSS crashes when starting the final stage because the 68000
|
||||
overwrites memory in use by the Am29000. Slowing down the 68000 slightly
|
||||
avoids this */
|
||||
overwrites memory in use by the Am29000. Slowing down the 68000 slightly
|
||||
avoids this */
|
||||
cpu_set_clockscale(devtag_get_device(machine, "maincpu"), 0.945f);
|
||||
}
|
||||
|
||||
|
@ -1165,7 +1165,7 @@ DEVICE_GET_RUNTIME_INFO( naomibd )
|
||||
|
||||
/* --- the following bits of info are returned as pointers --- */
|
||||
case DEVINFO_PTR_MEMORY: info->p = get_safe_token(device)->memory; break;
|
||||
|
||||
|
||||
/* default to the standard info */
|
||||
default: DEVICE_GET_INFO_NAME(naomibd)(&device->baseconfig(), state, info); break;
|
||||
}
|
||||
|
@ -1125,8 +1125,8 @@ static void hng64_drawtilemap(running_machine* machine, bitmap_t *bitmap, const
|
||||
if ((tileregs & 0x1800)==0x1000) // floor mode
|
||||
{
|
||||
/* Floor mode - per pixel simple / complex modes? -- every other line?
|
||||
(there doesn't seem to be enough data in Buriki for every line at least)
|
||||
*/
|
||||
(there doesn't seem to be enough data in Buriki for every line at least)
|
||||
*/
|
||||
if ((tileregs&0xf000) == 0x1000)
|
||||
{
|
||||
popmessage("Floor is Active");
|
||||
@ -1783,13 +1783,13 @@ static void set3dFlags(const UINT16* packet)
|
||||
/*//////////////
|
||||
// PACKET FORMAT
|
||||
// [0] - 0011 ... ID
|
||||
// [1] - ???? ...
|
||||
// [2] - ???? ...
|
||||
// [3] - ???? ...
|
||||
// [4] - ???? ...
|
||||
// [5] - ???? ...
|
||||
// [6] - ???? ...
|
||||
// [7] - ???? ...
|
||||
// [1] - ???? ...
|
||||
// [2] - ???? ...
|
||||
// [3] - ???? ...
|
||||
// [4] - ???? ...
|
||||
// [5] - ???? ...
|
||||
// [6] - ???? ...
|
||||
// [7] - ???? ...
|
||||
// [8] - xx?? ... Palette offset & ??
|
||||
// [9] - ???? ... ? Very much used - seem to bounce around when characters are on screen
|
||||
// [10] - ???? ... ? '' ''
|
||||
@ -1884,7 +1884,7 @@ void recoverPolygonBlock(running_machine* machine, const UINT16* packet, struct
|
||||
UINT32 address[4];
|
||||
UINT32 megaOffset;
|
||||
float eyeCoords[4]; // ObjectCoords transformed by the modelViewMatrix
|
||||
// float clipCoords[4]; // EyeCoords transformed by the projectionMatrix
|
||||
// float clipCoords[4]; // EyeCoords transformed by the projectionMatrix
|
||||
float ndCoords[4]; // Normalized device coordinates/clipCoordinates (x/w, y/w, z/w)
|
||||
float windowCoords[4]; // Mapped ndCoordinates to screen space
|
||||
float cullRay[4];
|
||||
@ -1951,10 +1951,10 @@ void recoverPolygonBlock(running_machine* machine, const UINT16* packet, struct
|
||||
|
||||
// Debug - ajg
|
||||
//UINT32 tdColor = 0xff000000;
|
||||
//if (packet[1] & 0x1000) tdColor |= 0x00ff0000;
|
||||
//if (packet[1] & 0x2000) tdColor |= 0x0000ff00;
|
||||
//if (packet[1] & 0x4000) tdColor |= 0x000000ff;
|
||||
//if (packet[1] & 0x8000) tdColor |= 0xffffffff;
|
||||
//if (packet[1] & 0x1000) tdColor |= 0x00ff0000;
|
||||
//if (packet[1] & 0x2000) tdColor |= 0x0000ff00;
|
||||
//if (packet[1] & 0x4000) tdColor |= 0x000000ff;
|
||||
//if (packet[1] & 0x8000) tdColor |= 0xffffffff;
|
||||
|
||||
// 3d ROM Offset
|
||||
UINT16* threeDRoms = (UINT16*)(memory_region(machine, "verts"));
|
||||
@ -1969,16 +1969,16 @@ void recoverPolygonBlock(running_machine* machine, const UINT16* packet, struct
|
||||
}
|
||||
|
||||
/*
|
||||
// Debug - ajg
|
||||
printf("%08x : ", threeDOffset*3*2);
|
||||
for (int k = 0; k < 7*3; k++)
|
||||
{
|
||||
printf("%04x ", threeDPointer[k]);
|
||||
if ((k % 3) == 2) printf(" ");
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
*/
|
||||
// Debug - ajg
|
||||
printf("%08x : ", threeDOffset*3*2);
|
||||
for (int k = 0; k < 7*3; k++)
|
||||
{
|
||||
printf("%04x ", threeDPointer[k]);
|
||||
if ((k % 3) == 2) printf(" ");
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
*/
|
||||
|
||||
// There are 4 hunks per address.
|
||||
address[0] = threeDPointer[0];
|
||||
@ -2029,9 +2029,9 @@ void recoverPolygonBlock(running_machine* machine, const UINT16* packet, struct
|
||||
// [0] ??-- - ???? unused ????
|
||||
// [0] --xx - Chunk type
|
||||
// [1] ?--- - Flags [x000 = ???
|
||||
0x00 = ???
|
||||
00x0 = ???
|
||||
000x = low-res texture flag]
|
||||
0x00 = ???
|
||||
00x0 = ???
|
||||
000x = low-res texture flag]
|
||||
// [1] -x-- - Explicit palette index.
|
||||
// [1] --?- - Unknown
|
||||
// [1] ---x - Texture index
|
||||
@ -2291,8 +2291,8 @@ void recoverPolygonBlock(running_machine* machine, const UINT16* packet, struct
|
||||
{
|
||||
// The sams64 games transform the geometry in front of a stationary camera.
|
||||
// This is fine in sams64_2, since it never calls the 'camera transformation' function
|
||||
// (thus using the identity matrix for this transform), but sams64 calls the
|
||||
// camera transformation function with rotation values.
|
||||
// (thus using the identity matrix for this transform), but sams64 calls the
|
||||
// camera transformation function with rotation values.
|
||||
// It remains to be seen what those might do...
|
||||
matmul4(modelViewMatrix, modelViewMatrix, cameraMatrix);
|
||||
}
|
||||
@ -2406,7 +2406,7 @@ void hng64_command3d(running_machine* machine, const UINT16* packet)
|
||||
case 0x0100:
|
||||
case 0x0101: // Geometry with full transformations
|
||||
// HACK. Masks out a piece of geo bbust2's drawShaded() crashes on.
|
||||
if (packet[2] == 0x0003 && packet[3] == 0x8f37 && hng64_mcu_type == SHOOT_MCU)
|
||||
if (packet[2] == 0x0003 && packet[3] == 0x8f37 && hng64_mcu_type == SHOOT_MCU)
|
||||
break;
|
||||
|
||||
recoverPolygonBlock(machine, packet, polys, &numPolys);
|
||||
|
@ -190,7 +190,7 @@ INLINE void K053936GP_copyroz32clip( running_machine *machine,
|
||||
continue;
|
||||
|
||||
if ((dst_ptr+ecx+dst_base2)<dst_size) dst_base[dst_ptr+ecx+dst_base2] = alpha_blend_r32(pal_base[pixel], dst_base[dst_ptr+ecx+dst_base2], alpha);
|
||||
|
||||
|
||||
if (pixeldouble_output)
|
||||
{
|
||||
ecx++;
|
||||
|
@ -75,7 +75,7 @@ void micro3d_scanline_update(running_device *screen, bitmap_t *bitmap, int scanl
|
||||
int x;
|
||||
|
||||
UINT16 *frame_src;
|
||||
|
||||
|
||||
scanline = MAX((scanline - params->veblnk), 0);
|
||||
frame_src = state->frame_buffers[state->display_buffer] + (scanline << 10);
|
||||
|
||||
@ -87,9 +87,9 @@ void micro3d_scanline_update(running_device *screen, bitmap_t *bitmap, int scanl
|
||||
UINT16 pix = src[coladdr++ & 0x1ff];
|
||||
|
||||
/*
|
||||
TODO: The upper four bits of the 3D buffer affect priority
|
||||
0xfxx forces 3D priority?
|
||||
*/
|
||||
TODO: The upper four bits of the 3D buffer affect priority
|
||||
0xfxx forces 3D priority?
|
||||
*/
|
||||
if (pix & 0x80)
|
||||
dest[x + 0] = sd_11_7 | (pix & 0x7f);
|
||||
else
|
||||
@ -135,7 +135,7 @@ WRITE16_HANDLER( micro3d_xfer3dk_w )
|
||||
|
||||
void micro3d_tms_interrupt(running_device *device, int state)
|
||||
{
|
||||
// mc68901_int_gen(device->machine, GPIP4);
|
||||
// mc68901_int_gen(device->machine, GPIP4);
|
||||
}
|
||||
|
||||
|
||||
@ -334,7 +334,7 @@ void draw_line(micro3d_state *state, UINT32 x1, UINT32 y1, UINT32 x2, UINT32 y2)
|
||||
tmp2 = dy << 1;
|
||||
acc = tmp2 - dx;
|
||||
dy = (dy - dx) << 1;
|
||||
|
||||
|
||||
do
|
||||
{
|
||||
if (~acc & 0x80000000)
|
||||
@ -352,7 +352,7 @@ void draw_line(micro3d_state *state, UINT32 x1, UINT32 y1, UINT32 x2, UINT32 y2)
|
||||
}
|
||||
} while (y2 != y1);
|
||||
}
|
||||
|
||||
|
||||
if (x2 != x1)
|
||||
write_span(state, y1, x2);
|
||||
|
||||
@ -421,10 +421,10 @@ void rasterise_spans(micro3d_state *state, UINT32 min_y, UINT32 max_y, UINT32 at
|
||||
else
|
||||
{
|
||||
/*
|
||||
I don't know the LFSR arrangement inside the DRAW2 ASIC
|
||||
but here are some possible tap arrangements
|
||||
*/
|
||||
static const UINT8 taps[8][4] =
|
||||
I don't know the LFSR arrangement inside the DRAW2 ASIC
|
||||
but here are some possible tap arrangements
|
||||
*/
|
||||
static const UINT8 taps[8][4] =
|
||||
{
|
||||
{9, 8, 7, 2},
|
||||
{9, 8, 6, 5},
|
||||
@ -435,7 +435,7 @@ void rasterise_spans(micro3d_state *state, UINT32 min_y, UINT32 max_y, UINT32 at
|
||||
{9, 7, 5, 2},
|
||||
{9, 6, 5, 3},
|
||||
};
|
||||
|
||||
|
||||
int noise_val = (attr >> 12) & 0x3ff;
|
||||
int noise_taps = 0;
|
||||
|
||||
@ -629,15 +629,15 @@ MPGDRAW commands
|
||||
85000xxx End of vertex list - draw (xxx = colour) [0]
|
||||
8Axxxxxx End of vertex list - random fill shading (xxx = colour) [0]
|
||||
|
||||
90000000 Set clipping Z min [1]
|
||||
94000000 Set clipping Z max [1]
|
||||
98000000 Set clipping Y max [1]
|
||||
9c000000 Set clipping X min [1]
|
||||
a0000000 Set clipping X max [1]
|
||||
a4000001 Set clipping Y min [1] (what does 1 mean?)
|
||||
90000000 Set clipping Z min [1]
|
||||
94000000 Set clipping Z max [1]
|
||||
98000000 Set clipping Y max [1]
|
||||
9c000000 Set clipping X min [1]
|
||||
a0000000 Set clipping X max [1]
|
||||
a4000001 Set clipping Y min [1] (what does 1 mean?)
|
||||
|
||||
d8000000 End of frame (will swap render buffer) [0]
|
||||
f8000000 Toggle health LED [0]
|
||||
d8000000 End of frame (will swap render buffer) [0]
|
||||
f8000000 Toggle health LED [0]
|
||||
|
||||
b8000000-1fe Draw ASIC DPRAM address
|
||||
b80003ff Data
|
||||
@ -684,9 +684,9 @@ WRITE32_HANDLER( micro3d_fifo_w )
|
||||
state->draw_state = STATE_DRAW_VTX_DATA;
|
||||
|
||||
/* Invalidate the draw RAM
|
||||
* TODO: Not sure this is the right place for it -
|
||||
* causes monitor mode draw tests to fail
|
||||
*/
|
||||
* TODO: Not sure this is the right place for it -
|
||||
* causes monitor mode draw tests to fail
|
||||
*/
|
||||
for (addr = 0; addr < 512; ++addr)
|
||||
state->draw_dpram[addr << 1] = 0x3ff000;
|
||||
|
||||
@ -764,7 +764,7 @@ READ32_HANDLER( micro3d_pipe_r )
|
||||
|
||||
INTERRUPT_GEN( micro3d_vblank )
|
||||
{
|
||||
// mc68901_int_gen(device->machine, GPIP7);
|
||||
// mc68901_int_gen(device->machine, GPIP7);
|
||||
micro3d_state *state = (micro3d_state*)device->machine->driver_data;
|
||||
|
||||
state->display_buffer = state->drawing_buffer ^ 1;
|
||||
|
@ -146,7 +146,7 @@ do \
|
||||
while (0) \
|
||||
|
||||
/*-------------------------------------------------
|
||||
draw_scanline32_alpha - take an RGB-encoded UINT32
|
||||
draw_scanline32_alpha - take an RGB-encoded UINT32
|
||||
scanline and alpha-blend it into the destination bitmap
|
||||
-------------------------------------------------*/
|
||||
static void draw_scanline32_alpha(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, const UINT32 *srcptr, int alpha)
|
||||
@ -161,7 +161,7 @@ static void draw_scanline32_alpha(bitmap_t *bitmap, INT32 destx, INT32 desty, IN
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
draw_scanline32_argb - take an ARGB-encoded UINT32
|
||||
draw_scanline32_argb - take an ARGB-encoded UINT32
|
||||
scanline and alpha-blend it into the destination bitmap
|
||||
-------------------------------------------------*/
|
||||
static void draw_scanline32_argb(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, const UINT32 *srcptr)
|
||||
@ -177,7 +177,7 @@ static void draw_scanline32_argb(bitmap_t *bitmap, INT32 destx, INT32 desty, INT
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
draw_scanline32_tranpens - take an RGB-encoded UINT32
|
||||
draw_scanline32_tranpens - take an RGB-encoded UINT32
|
||||
scanline and copy it into the destination bitmap, testing for the special ARGB transpen
|
||||
-------------------------------------------------*/
|
||||
static void draw_scanline32_transpen(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, const UINT32 *srcptr)
|
||||
@ -194,11 +194,11 @@ static void draw_scanline32_transpen(bitmap_t *bitmap, INT32 destx, INT32 desty,
|
||||
|
||||
/*-------------------------------------------------
|
||||
drawgfx_alphastore - render a gfx element with
|
||||
a single transparent pen, storing the alpha value
|
||||
a single transparent pen, storing the alpha value
|
||||
in alpha field of ARGB32, negative alpha implies alphatable
|
||||
-------------------------------------------------*/
|
||||
static void drawgfx_alphastore(bitmap_t *dest, const rectangle *cliprect, const gfx_element *gfx,
|
||||
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
|
||||
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
|
||||
int fixedalpha)
|
||||
{
|
||||
bitmap_t *priority = NULL; /* dummy, no priority in this case */
|
||||
@ -238,8 +238,8 @@ static void drawgfx_alphastore(bitmap_t *dest, const rectangle *cliprect, const
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
drawgfx_alphatable - render a sprite with either
|
||||
a fixed alpha value, or if alpha==-1 then uses
|
||||
drawgfx_alphatable - render a sprite with either
|
||||
a fixed alpha value, or if alpha==-1 then uses
|
||||
the per-pen alphatable[] array
|
||||
-------------------------------------------------*/
|
||||
static void drawgfx_alphatable(bitmap_t *dest, const rectangle *cliprect, const gfx_element *gfx,
|
||||
@ -277,7 +277,7 @@ static void drawgfx_alphatable(bitmap_t *dest, const rectangle *cliprect, const
|
||||
/* Psikyo PS6406B */
|
||||
/* --- BACKGROUNDS --- */
|
||||
|
||||
/* 'Normal' layers, no line/columnscroll. No per-line effects.
|
||||
/* 'Normal' layers, no line/columnscroll. No per-line effects.
|
||||
Zooming isn't supported just because it's not used and it would be slow */
|
||||
static void draw_bglayer( running_machine *machine, int layer, bitmap_t *bitmap, const rectangle *cliprect, UINT8 req_pri )
|
||||
{
|
||||
@ -349,7 +349,7 @@ static void cache_bitmap(int scanline, psikyosh_state *state, gfx_element *gfx,
|
||||
|
||||
assert(sy > 0 && sy < 32);
|
||||
|
||||
if(tilebank != last_bank[sy])
|
||||
if(tilebank != last_bank[sy])
|
||||
{
|
||||
rectangle cliprect;
|
||||
|
||||
@ -375,7 +375,7 @@ static void cache_bitmap(int scanline, psikyosh_state *state, gfx_element *gfx,
|
||||
if(tileno) { // valid tile, but blank in all games?
|
||||
drawgfx_alphastore(state->bg_bitmap, NULL, gfx, tileno, colour, 0, 0, (16 * sx) & 0x1ff, ((16 * sy) & (width - 1)), need_alpha);
|
||||
}
|
||||
|
||||
|
||||
offs++;
|
||||
}
|
||||
last_bank[sy] = tilebank;
|
||||
@ -384,8 +384,8 @@ static void cache_bitmap(int scanline, psikyosh_state *state, gfx_element *gfx,
|
||||
|
||||
|
||||
/* Row Scroll/Zoom and/or Column Zoom, has per-column Alpha/Bank/Priority
|
||||
Bitmap is first rendered to an ARGB image, taking into account the per-pen alpha (if used).
|
||||
From there we extract data as we compose the image, one scanline at a time, blending the ARGB pixels
|
||||
Bitmap is first rendered to an ARGB image, taking into account the per-pen alpha (if used).
|
||||
From there we extract data as we compose the image, one scanline at a time, blending the ARGB pixels
|
||||
into the RGB32 bitmap (with either the alpha information from the ARGB, or per-line alpha */
|
||||
static void draw_bglayerscroll( running_machine *machine, int layer, bitmap_t *bitmap, const rectangle *cliprect, UINT8 req_pri )
|
||||
{
|
||||
@ -402,20 +402,20 @@ static void draw_bglayerscroll( running_machine *machine, int layer, bitmap_t *b
|
||||
int last_bank[32]; // corresponds to bank of bitmap in state->bg_bitmap. bg_bitmap is split into 16/32-rows of one-tile high each
|
||||
for(int ii = 0; ii < 32; ii++) last_bank[ii] = -1;
|
||||
|
||||
int scr_width = (cliprect->max_x-cliprect->min_x + 1);
|
||||
int scr_width = (cliprect->max_x-cliprect->min_x + 1);
|
||||
int scr_height = (cliprect->max_y-cliprect->min_y + 1);
|
||||
UINT32 *scroll_reg = &state->bgram[(linebank * 0x800) / 4 - 0x4000 / 4];
|
||||
UINT32 *pzab_reg = &state->bgram[(linebank * 0x800) / 4 - 0x4000 / 4 + 0x400 / 4]; // pri, zoom, alpha, bank
|
||||
|
||||
// now, for each scanline, check priority,
|
||||
// extract the relevant scanline from the bitmap, after applying per-scanline vscroll,
|
||||
// now, for each scanline, check priority,
|
||||
// extract the relevant scanline from the bitmap, after applying per-scanline vscroll,
|
||||
// stretch it and scroll it into another buffer
|
||||
// write it with alpha
|
||||
for(int scanline = 0; scanline < scr_height; scanline++)
|
||||
{
|
||||
int pri = (*pzab_reg & 0xff000000) >> 24;
|
||||
|
||||
if(pri == req_pri)
|
||||
if(pri == req_pri)
|
||||
{
|
||||
int scrollx = (*scroll_reg & 0x000001ff) >> 0;
|
||||
int scrolly = (*scroll_reg & 0x03ff0000) >> 16;
|
||||
@ -1098,8 +1098,8 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
|
||||
However, sprite-sprite priority needs to be preserved.
|
||||
daraku and soldivid only use the lsb
|
||||
|
||||
? = unknown
|
||||
Could be a sprite-sprite priority, tests seem to back this up
|
||||
? = unknown
|
||||
Could be a sprite-sprite priority, tests seem to back this up
|
||||
|
||||
**- End Sprite Format -*/
|
||||
const int spr_keys[8] = {KEYCODE_Y, KEYCODE_U, KEYCODE_I, KEYCODE_O};
|
||||
@ -1185,7 +1185,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
|
||||
listcntr++;
|
||||
if (listdat & 0x4000) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void psikyosh_prelineblend( running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect )
|
||||
@ -1274,8 +1274,8 @@ VIDEO_START( psikyosh )
|
||||
alphatable[i + 0xc0] = alpha;
|
||||
}
|
||||
|
||||
/* precompute the background zoom table. verified against hardware.
|
||||
unsure of the precision, we use .10 fixed point like the sprites */
|
||||
/* precompute the background zoom table. verified against hardware.
|
||||
unsure of the precision, we use .10 fixed point like the sprites */
|
||||
for(i = 0; i < 0x100; i++) {
|
||||
state->bg_zoom[i] = (64 * 0x400) / (i + 64);
|
||||
}
|
||||
|
@ -32,11 +32,11 @@
|
||||
#define MAX_VIEWS (4)
|
||||
|
||||
enum {
|
||||
WIN_TYPE_MAIN = 0x01,
|
||||
WIN_TYPE_MAIN = 0x01,
|
||||
WIN_TYPE_MEMORY = 0x02,
|
||||
WIN_TYPE_DISASM = 0x04,
|
||||
WIN_TYPE_LOG = 0x08,
|
||||
WIN_TYPE_ALL = 0x0f
|
||||
WIN_TYPE_LOG = 0x08,
|
||||
WIN_TYPE_ALL = 0x0f
|
||||
};
|
||||
|
||||
//============================================================
|
||||
@ -65,7 +65,7 @@ struct _win_i {
|
||||
int type;
|
||||
win_i * next;
|
||||
GtkWidget * win;
|
||||
edit ed;
|
||||
edit ed;
|
||||
running_machine * machine; // machine
|
||||
DView * views[MAX_VIEWS];
|
||||
running_device * cpu; // current CPU
|
||||
@ -1119,7 +1119,7 @@ on_memoryview_key_press_event (GtkWidget *widget,
|
||||
DView *info = (DView *) widget;
|
||||
//printf("%s\n", event->string);
|
||||
//printf("The name of this keysym is `%s'\n",
|
||||
// gdk_keyval_name(event->keyval));
|
||||
// gdk_keyval_name(event->keyval));
|
||||
//if (/*waiting_for_debugger ||*/ !debugwin_seq_pressed(info->view-> owner->machine))
|
||||
switch (event->keyval)
|
||||
{
|
||||
@ -1169,15 +1169,15 @@ on_memoryview_key_press_event (GtkWidget *widget,
|
||||
|
||||
case GDK_Escape:
|
||||
//if (info->owner->focuswnd != NULL)
|
||||
// SetFocus(info->owner->focuswnd);
|
||||
// SetFocus(info->owner->focuswnd);
|
||||
//info->owner->ignore_char_lparam = lparam >> 16;
|
||||
break;
|
||||
|
||||
case GDK_Tab:
|
||||
//if (GetAsyncKeyState(VK_SHIFT) & 0x8000)
|
||||
// debugwin_view_prev_view(info->owner, info);
|
||||
// debugwin_view_prev_view(info->owner, info);
|
||||
//else
|
||||
// debugwin_view_next_view(info->view, dvw);
|
||||
// debugwin_view_next_view(info->view, dvw);
|
||||
break;
|
||||
default:
|
||||
if (event->keyval >= 32 && event->keyval < 127 && debug_view_get_cursor_supported(info->view))
|
||||
|
@ -7,7 +7,7 @@
|
||||
# Copyright (c) 1996-2010, Nicola Salmoria and the MAME Team.
|
||||
# Visit http://mamedev.org for licensing and usage restrictions.
|
||||
#
|
||||
# SDLMAME by Olivier Galibert and R. Belmont
|
||||
# SDLMAME by Olivier Galibert and R. Belmont
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
@ -42,8 +42,8 @@
|
||||
# this will also add a rpath to the executable
|
||||
# MESA_INSTALL_ROOT = /usr/local/dfb_GL
|
||||
|
||||
# uncomment the next line to build a binary using
|
||||
# GL-dispatching.
|
||||
# uncomment the next line to build a binary using
|
||||
# GL-dispatching.
|
||||
# This option takes precedence over MESA_INSTALL_ROOT
|
||||
|
||||
USE_DISPATCH_GL = 1
|
||||
@ -80,18 +80,18 @@ CCOMFLAGS += $(OPT_FLAGS)
|
||||
#-------------------------------------------------
|
||||
# distribution may change things
|
||||
#-------------------------------------------------
|
||||
|
||||
|
||||
ifeq ($(DISTRO),)
|
||||
DISTRO = generic
|
||||
else
|
||||
else
|
||||
ifeq ($(DISTRO),debian-stable)
|
||||
DEFS += -DNO_AFFINITY_NP
|
||||
else
|
||||
else
|
||||
ifeq ($(DISTRO),ubuntu-intrepid)
|
||||
# Force gcc-4.2 on ubuntu-intrepid
|
||||
CC = @gcc -V 4.2
|
||||
LD = g++-4.2
|
||||
else
|
||||
else
|
||||
ifeq ($(DISTRO),gcc44-generic)
|
||||
CC = @gcc -V 4.4
|
||||
LD = @g++ -V 4.4
|
||||
@ -139,11 +139,11 @@ endif
|
||||
ifeq ($(TARGETOS),freebsd)
|
||||
BASE_TARGETOS = unix
|
||||
SYNC_IMPLEMENTATION = tc
|
||||
DEFS += -DNO_AFFINITY_NP
|
||||
DEFS += -DNO_AFFINITY_NP
|
||||
# /usr/local/include is not considered a system include directory
|
||||
# on FreeBSD. GL.h resides there and throws warnings
|
||||
CCOMFLAGS += -isystem /usr/local/include
|
||||
# No clue here. There is a popmessage(NULL) in uimenu.c which
|
||||
# No clue here. There is a popmessage(NULL) in uimenu.c which
|
||||
# triggers a non-null format warning on FreeBSD only.
|
||||
CCOMFLAGS += -Wno-format
|
||||
endif
|
||||
@ -195,7 +195,7 @@ ifeq ($(TARGETOS),win32)
|
||||
BASE_TARGETOS = win32
|
||||
SYNC_IMPLEMENTATION = win32
|
||||
NO_X11 = 1
|
||||
DEFS += -DSDLMAME_WIN32 -DX64_WINDOWS_ABI
|
||||
DEFS += -DSDLMAME_WIN32 -DX64_WINDOWS_ABI
|
||||
LIBGL = -lopengl32
|
||||
SDLMAIN = $(SDLOBJ)/main.o
|
||||
# needed for unidasm
|
||||
@ -207,7 +207,7 @@ NO_DEBUGGER = 1
|
||||
else
|
||||
DEBUGOBJS = $(SDLOBJ)/debugwin.o $(SDLOBJ)/dview.o $(SDLOBJ)/debug-sup.o $(SDLOBJ)/debug-intf.o
|
||||
LIBS += -lgtk-win32-2.0 -lgdk-win32-2.0 -lgmodule-2.0 -lglib-2.0 -lgobject-2.0 \
|
||||
-lpango-1.0 -latk-1.0 -lgdk_pixbuf-2.0
|
||||
-lpango-1.0 -latk-1.0 -lgdk_pixbuf-2.0
|
||||
CCOMFLAGS += -mms-bitfields \
|
||||
-I$(GTK_INSTALL_ROOT)/include/gtk-2.0 -I$(GTK_INSTALL_ROOT)/include/glib-2.0 \
|
||||
-I$(GTK_INSTALL_ROOT)/include/cairo -I$(GTK_INSTALL_ROOT)/include/pango-1.0 \
|
||||
@ -256,11 +256,11 @@ OBJDIRS += $(SDLOBJ)
|
||||
OSDCOREOBJS = \
|
||||
$(SDLOBJ)/strconv.o \
|
||||
$(SDLOBJ)/sdldir.o \
|
||||
$(SDLOBJ)/sdlfile.o \
|
||||
$(SDLOBJ)/sdlfile.o \
|
||||
$(SDLOBJ)/sdlmisc_$(BASE_TARGETOS).o \
|
||||
$(SDLOBJ)/sdlos_$(BASE_TARGETOS).o \
|
||||
$(SDLOBJ)/sdlsync_$(SYNC_IMPLEMENTATION).o \
|
||||
$(SDLOBJ)/sdlwork.o
|
||||
$(SDLOBJ)/sdlwork.o
|
||||
|
||||
# any "main" must be in LIBOSD or else the build will fail!
|
||||
# for the windows build, we just add it to libocore as well.
|
||||
@ -272,7 +272,7 @@ OSDOBJS = \
|
||||
$(SDLOBJ)/video.o \
|
||||
$(SDLOBJ)/drawsdl.o \
|
||||
$(SDLOBJ)/window.o \
|
||||
$(SDLOBJ)/output.o
|
||||
$(SDLOBJ)/output.o
|
||||
|
||||
# Add SDL1.3 support
|
||||
ifdef SDL_INSTALL_ROOT
|
||||
@ -338,16 +338,16 @@ endif
|
||||
|
||||
ifndef SDL_INSTALL_ROOT
|
||||
CCOMFLAGS += `sdl-config --cflags`
|
||||
LIBS += -lm `sdl-config --libs`
|
||||
LIBS += -lm `sdl-config --libs`
|
||||
else
|
||||
CCOMFLAGS += -I$(SDL_INSTALL_ROOT)/include -D_GNU_SOURCE=1
|
||||
LIBS += -lm -L$(SDL_INSTALL_ROOT)/lib -Wl,-rpath,$(SDL_INSTALL_ROOT)/lib -lSDL
|
||||
LIBS += -lm -L$(SDL_INSTALL_ROOT)/lib -Wl,-rpath,$(SDL_INSTALL_ROOT)/lib -lSDL
|
||||
endif
|
||||
|
||||
endif # Unix
|
||||
|
||||
#-------------------------------------------------
|
||||
# Windows
|
||||
# Windows
|
||||
#-------------------------------------------------
|
||||
|
||||
# Win32: add the necessary libraries
|
||||
@ -358,7 +358,7 @@ OSDCOREOBJS += $(SDLMAIN)
|
||||
|
||||
ifdef SDL_INSTALL_ROOT
|
||||
CCOMFLAGS += -I$(SDL_INSTALL_ROOT)/include
|
||||
LIBS += -L$(SDL_INSTALL_ROOT)/lib
|
||||
LIBS += -L$(SDL_INSTALL_ROOT)/lib
|
||||
#-Wl,-rpath,$(SDL_INSTALL_ROOT)/lib
|
||||
endif
|
||||
|
||||
@ -366,13 +366,13 @@ endif
|
||||
# Static linking
|
||||
|
||||
LDFLAGS += -static-libgcc
|
||||
LIBS += -Wl,-Bstatic -lSDL -Wl,-Bdynamic
|
||||
LIBS += -Wl,-Bstatic -lSDL -Wl,-Bdynamic
|
||||
LIBS += -luser32 -lgdi32 -lddraw -ldsound -ldxguid -lwinmm -ladvapi32 -lcomctl32 -lshlwapi
|
||||
|
||||
endif # Win32
|
||||
|
||||
#-------------------------------------------------
|
||||
# Mac OS X
|
||||
# Mac OS X
|
||||
#-------------------------------------------------
|
||||
|
||||
ifeq ($(BASE_TARGETOS),macosx)
|
||||
@ -380,7 +380,7 @@ ifeq ($(BASE_TARGETOS),macosx)
|
||||
|
||||
ifndef MACOSX_USE_LIBSDL
|
||||
# Compile using framework (compile using libSDL is the exception)
|
||||
LIBS += -framework SDL -framework Cocoa -framework OpenGL -lpthread
|
||||
LIBS += -framework SDL -framework Cocoa -framework OpenGL -lpthread
|
||||
else
|
||||
# Compile using installed libSDL (Fink or MacPorts):
|
||||
#
|
||||
@ -395,7 +395,7 @@ endif
|
||||
endif # Mac OS X
|
||||
|
||||
#-------------------------------------------------
|
||||
# OS/2
|
||||
# OS/2
|
||||
#-------------------------------------------------
|
||||
|
||||
ifeq ($(BASE_TARGETOS),os2)
|
||||
@ -406,7 +406,7 @@ LIBS += `sdl-config --libs`
|
||||
endif # OS2
|
||||
|
||||
#-------------------------------------------------
|
||||
# Debugging
|
||||
# Debugging
|
||||
#-------------------------------------------------
|
||||
|
||||
ifeq ($(NO_DEBUGGER),1)
|
||||
@ -418,7 +418,7 @@ OSDOBJS += $(DEBUGOBJS)
|
||||
endif # NO_DEBUGGER
|
||||
|
||||
#-------------------------------------------------
|
||||
# OPENGL
|
||||
# OPENGL
|
||||
#-------------------------------------------------
|
||||
|
||||
ifeq ($(NO_OPENGL),1)
|
||||
@ -442,7 +442,7 @@ endif
|
||||
endif
|
||||
|
||||
#-------------------------------------------------
|
||||
# X11
|
||||
# X11
|
||||
#-------------------------------------------------
|
||||
|
||||
ifeq ($(NO_X11),1)
|
||||
@ -454,7 +454,7 @@ LIBS += -lX11 -lXinerama
|
||||
|
||||
# the new debugger relies on GTK+ in addition to the base SDLMAME needs
|
||||
# Non-X11 builds can not use the debugger
|
||||
CCOMFLAGS += `pkg-config --cflags gtk+-2.0` `pkg-config --cflags gconf-2.0`
|
||||
CCOMFLAGS += `pkg-config --cflags gtk+-2.0` `pkg-config --cflags gconf-2.0`
|
||||
LIBS += `pkg-config --libs gtk+-2.0` `pkg-config --libs gconf-2.0`
|
||||
#CCOMFLAGS += -DGTK_DISABLE_DEPRECATED
|
||||
|
||||
@ -465,7 +465,7 @@ CCOMFLAGS += -I/usr/X11/include -I/usr/X11R6/include -I/usr/openwin/include
|
||||
endif # NO_X11
|
||||
|
||||
#-------------------------------------------------
|
||||
# Dependencies
|
||||
# Dependencies
|
||||
#-------------------------------------------------
|
||||
|
||||
# due to quirks of using /bin/sh, we need to explicitly specify the current path
|
||||
@ -491,16 +491,16 @@ $(LIBOCORE): $(OSDCOREOBJS)
|
||||
$(LIBOSD): $(OSDOBJS)
|
||||
|
||||
#-------------------------------------------------
|
||||
# Tools
|
||||
# Tools
|
||||
#-------------------------------------------------
|
||||
|
||||
TOOLS += \
|
||||
testkeys$(EXE)
|
||||
|
||||
$(SDLOBJ)/testkeys.o: $(SDLSRC)/testkeys.c
|
||||
$(SDLOBJ)/testkeys.o: $(SDLSRC)/testkeys.c
|
||||
@echo Compiling $<...
|
||||
$(CC) $(CFLAGS) $(DEFS) -c $< -o $@
|
||||
|
||||
|
||||
TESTKEYSOBJS = \
|
||||
$(SDLOBJ)/testkeys.o \
|
||||
|
||||
@ -529,7 +529,7 @@ BUILD_VERSION = $(shell grep 'build_version\[\] =' src/version.c | sed -e "s/.*=
|
||||
DISTFILES = test_dist.sh whatsnew.txt whatsnew_$(BUILD_VERSION).txt makefile docs/ src/
|
||||
EXCLUDES = -x "*/.svn/*"
|
||||
|
||||
zip:
|
||||
zip:
|
||||
zip -rq ../mame_$(BUILD_VERSION).zip $(DISTFILES) $(EXCLUDES)
|
||||
|
||||
DEPENDFILE = .depend_$(EMULATOR)
|
||||
|
@ -208,7 +208,7 @@ DEFS += -Dmain=utf8_main
|
||||
|
||||
# debug build: enable guard pages on all memory allocations
|
||||
ifdef DEBUG
|
||||
DEFS += -DMALLOC_DEBUG
|
||||
#DEFS += -DMALLOC_DEBUG
|
||||
endif
|
||||
|
||||
|
||||
|
@ -451,7 +451,7 @@ static void soft_link_functions(void)
|
||||
av_set_mm_max_thread_characteristics = (av_set_mm_max_thread_characteristics_ptr)GetProcAddress(library, "AvSetMmMaxThreadCharacteristics" UNICODE_POSTFIX);
|
||||
av_revert_mm_thread_characteristics = (av_revert_mm_thread_characteristics_ptr)GetProcAddress(library, "AvRevertMmThreadCharacteristics");
|
||||
}
|
||||
|
||||
|
||||
// psapi helpers (not available in win9x)
|
||||
library = LoadLibrary(TEXT("psapi.dll"));
|
||||
if (library != NULL)
|
||||
@ -646,10 +646,10 @@ static LONG CALLBACK exception_filter(struct _EXCEPTION_POINTERS *info)
|
||||
{
|
||||
CONTEXT context = *info->ContextRecord;
|
||||
STACKFRAME64 stackframe;
|
||||
|
||||
|
||||
// initialize the symbol lookup
|
||||
sym_initialize(GetCurrentProcess(), NULL, TRUE);
|
||||
|
||||
|
||||
// reprint the actual exception address
|
||||
fprintf(stderr, "-----------------------------------------------------\n");
|
||||
fprintf(stderr, "Stack crawl:\n");
|
||||
@ -700,15 +700,15 @@ static const char *line_to_symbol(const char *line, FPTR &address)
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
/*
|
||||
32-bit gcc map line:
|
||||
32-bit gcc map line:
|
||||
0x0089cb00 nbmj9195_palette_r(_address_space const*, unsigned int)
|
||||
|
||||
64-bit gcc map line:
|
||||
64-bit gcc map line:
|
||||
0x0000000000961afc nbmj9195_palette_r(_address_space const*, unsigned int)
|
||||
*/
|
||||
char symbol[1024];
|
||||
void *temp;
|
||||
|
||||
|
||||
// find a matching start
|
||||
if (strncmp(line, " 0x", 18) == 0)
|
||||
if (sscanf(line, " 0x%p %s", &temp, symbol) == 2)
|
||||
@ -720,16 +720,16 @@ static const char *line_to_symbol(const char *line, FPTR &address)
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/*
|
||||
32-bit MSVC map line:
|
||||
32-bit MSVC map line:
|
||||
0001:00387890 ?nbmj9195_palette_r@@YAEPBU_address_space@@I@Z 00788890 f nichibut:nbmj9195.o
|
||||
|
||||
64-bit MSVC map line:
|
||||
64-bit MSVC map line:
|
||||
0001:004d7510 ?nbmj9195_palette_r@@YAEPEBU_address_space@@I@Z 00000001404d8510 f nichibut:nbmj9195.o
|
||||
*/
|
||||
static char symbol[1024];
|
||||
int dummy1, dummy2;
|
||||
void *temp;
|
||||
|
||||
|
||||
symbol[0] = 0;
|
||||
if (line[0] == ' ' && line[5] == ':')
|
||||
if (sscanf(line, " %04x:%08x %s %p", &dummy1, &dummy2, symbol, &temp) == 4)
|
||||
@ -765,7 +765,7 @@ static const char *lookup_symbol(FPTR address)
|
||||
{
|
||||
IMAGEHLP_LINE64 lineinfo = { sizeof(lineinfo) };
|
||||
DWORD linedisp;
|
||||
|
||||
|
||||
// try to get source info as well; again we are returned an ANSI string
|
||||
if (sym_get_line_from_addr_64 != NULL && sym_get_line_from_addr_64(GetCurrentProcess(), address, &linedisp, &lineinfo))
|
||||
sprintf(buffer, " (%s+0x%04x, %s:%d)", info.Name, (UINT32)displacement, lineinfo.FileName, (int)lineinfo.LineNumber);
|
||||
@ -1020,7 +1020,7 @@ static void start_profiler(void)
|
||||
{
|
||||
HANDLE currentThread;
|
||||
BOOL result;
|
||||
|
||||
|
||||
assert_always(
|
||||
|
||||
// parse the map file, if present
|
||||
|
@ -10,4 +10,4 @@
|
||||
***************************************************************************/
|
||||
|
||||
extern const char build_version[];
|
||||
const char build_version[] = "0.136u1 ("__DATE__")";
|
||||
const char build_version[] = "0.136u2 ("__DATE__")";
|
||||
|
Loading…
Reference in New Issue
Block a user