summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-01-01 21:50:08 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-01-01 21:50:08 +0000
commit0738d02527e8d38a6f5b09d171af47e22d17f37e (patch)
tree1e07995aed08da68a73588664b510969e47d49d0
parent7ad91eead63bdfe26d07161977e711a1a72f2e06 (diff)
TMS3203x core updates:
* fixed interrupt handling * added support for edge-triggered interrupts on '32 * expanded interrupt support for the '32 * updated drivers using TMS3203x core to deassert interrupts * added externally accessible functions for converting '3x floating point format * updated gaelco3d driver to use new functions Zeus2 (+related) updates: * fixed save states for DCS games * cleaned up Zeus2 waveram handling * added Zeus2 save state support * added preliminary model and quad rendering support for Zeus2 * added support to timekpr for the ZPRAM used on Zeus2 * hooked up ZPRAM in Zeus2 games * hooked up controls in Zeus2 games * updated poly.c to ensure it is idle before saving state
-rw-r--r--src/emu/drivers/xtal.h368
-rw-r--r--src/emu/memory.c33
-rw-r--r--src/emu/memory.h1
3 files changed, 394 insertions, 8 deletions
diff --git a/src/emu/drivers/xtal.h b/src/emu/drivers/xtal.h
index 6fb8f540393..48fc932cd55 100644
--- a/src/emu/drivers/xtal.h
+++ b/src/emu/drivers/xtal.h
@@ -118,3 +118,371 @@ enum
XTAL_384kHz = 384000,
XTAL_640kHz = 640000
};
+
+
+/*
+
+For further reference:
+
+A search at http://search.digikey.com/scripts/DkSearch/dksus.dll?Cat=852333;keywords=cry
+reveals the following shipping frequencies as of 1/1/2008:
+
+20kHz
+25.600kHz
+26.667kHz
+28kHz
+
+30kHz
+30.720kHz
+30.76kHz
+31.2kHz
+31.25kHz
+31.5kHz
+32.000kHz
+32.56kHz
+32.768kHz
+32.919kHz
+34kHz
+36kHz
+38kHz
+38.4kHz
+39.500kHz
+
+40kHz
+44.100kHz
+46.604kHz
+46.6084kHz
+
+50kHz
+59.787kHz
+
+60.000kHz
+60.002kHz
+60.005kHz
+65.535kHz
+65.536kHz
+69kHz
+
+70kHz
+71kHz
+72kHz
+73kHz
+74kHz
+74.3kHz
+74.4kHz
+75kHz
+76kHz
+76.79kHz
+76.8kHz
+76.81kHz
+77kHz
+77.204kHz
+77.287kHz
+77.500kHz
+77.503kHz
+77.504kHz
+78kHz
+79kHz
+
+83kHz
+
+96kHz
+96.006kHz
+
+100kHz
+111kHz
+117.72kHz
+120kHz
+120.8475kHz
+125kHz
+131.072kHz
+149.475kHz
+153.600kHz
+
+200kHz
+
+307.2kHz
+
+1.000MHz
+1.8432MHz
+
+2.000MHz
+2.048MHz
+2.097152MHz
+2.4576MHz
+2.5MHz
+2.560MHz
+2.949120MHz
+
+3.000MHz
+3.276MHz
+3.2768MHz
+3.579MHz
+3.579545MHz
+3.640MHz
+3.6864MHz
+3.700MHz
+3.859MHz
+3.93216MHz
+
+4.000MHz
+4.032MHz
+4.096MHz
+4.09625MHz
+4.194MHz
+4.194304MHz
+4.332MHz
+4.433MHz
+4.433616MHz
+4.433618MHz
+4.433619MHz
+4.74687MHz
+4.800MHz
+4.8970MHz
+4.90625MHz
+4.915MHz
+4.9152MHz
+
+5.000MHz
+5.0688MHz
+5.120MHz
+5.185MHz
+5.223438MHz
+5.5MHz
+5.5296MHz
+5.9904MHz
+
+6.000MHz
+6.14MHz
+6.144MHz
+6.1760MHz
+6.400 MHz
+6.49830MHz
+6.5MHz
+6.5536MHz
+6.612813MHz
+6.7458MHz
+6.757MHz
+6.76438MHz
+
+7.1505MHz
+7.15909 MHz
+7.2MHz
+7.3728MHz
+7.68MHz
+7.94888MHz
+
+8.000MHz
+8.000156MHz
+8.192MHz
+8.388608MHz
+8.432MHz
+8.5MHz
+8.6432MHz
+
+9.000MHz
+9.216MHz
+9.509375MHz
+9.545MHz
+9.6MHz
+9.7941MHz
+9.830MHz
+9.8304MHz
+9.84375MHz
+9.8438MHz
+
+10.000MHz
+10.240MHz
+10.245MHz
+10.6244MHz
+10.738635MHz
+10.73865MHz
+
+11.000MHz
+11.046MHz
+11.0592MHz
+11.228MHz
+11.2896MHz
+11.520MHz
+11.981350MHz
+
+12.000MHz
+12.000393MHz
+12.096MHz
+12.1875MHz
+12.288MHz
+12.352MHz
+12.500MHz
+12.688MHz
+12.800MHz
+12.96MHz
+
+13.000MHz
+13.0625MHz
+13.225MHz
+13.2256MHz
+13.500MHz
+13.5168MHz
+13.56MHz
+13.605MHz
+13.824MHz
+13.94916MHz
+
+14.00MHz
+14.318MHz
+14.31818MHz
+14.3359MHz
+14.3594MHz
+14.4MHz
+14.5MHz
+14.69MHz
+14.7456MHz
+14.850MHz
+
+15MHz
+15.360MHz
+
+16.000MHz
+16.000312MHz
+16.128MHz
+16.257MHz
+16.3676MHz
+16.368MHz
+16.384MHz
+16.576MHz
+16.6660MHz
+16.667MHz
+16.670MHz
+16.800MHz
+16.934MHz
+16.9344MHz
+
+17.734475MHz
+
+18.000MHz
+18.432MHz
+18.869MHz
+
+19.200MHz
+19.440MHz
+19.660MHz
+19.6608MHz
+19.68MHz
+19.800MHz
+
+20.000MHz
+20.35625MHz
+20.3563MHz
+20.480MHz
+
+21.47727MHz
+
+22.000MHz
+22.118MHz
+22.1184MHz
+22.400MHz
+22.5MHz
+22.5792MHz
+22.6278MHz
+
+23MHz
+23.2643MHz
+23.5MHz
+23.5122MHz
+23.592MHz
+
+24.000MHz
+24.00014MHz
+24.5MHz
+24.545454 MHz
+24.5535MHz
+24.576MHz
+24.704MHz
+24.7456MHz
+
+25.000MHz
+25MHz
+25.175MHz
+25.2235MHz
+25.4563MHz
+25.5MHz
+
+26.000MHz
+26.45125MHz
+26.4513MHz
+26.5MHz
+26.5971MHz
+26.800MHz
+
+27.000MHz
+27.1344MHz
+27.3067MHz
+27.4688MHz
+
+28.000MHz
+28.224MHz
+28.259375MHz
+28.2594MHz
+28.322MHz
+28.375MHz
+28.5938MHz
+28.636MHz
+28.6363MHz
+28.63636MHz
+
+29.4912MHz
+29.498928MHz
+29.500MHz
+
+30.000MHz
+32.000MHz
+32.514MHz
+32.768MHz
+33.000MHz
+33.333MHz
+33.3333MHz
+33.8688MHz
+35.2512MHz
+35.3280MHz
+36.000MHz
+38.000MHz
+38.00053MHz
+38.400MHz
+38.880MHz
+39MHz
+
+40.000MHz
+40.320MHz
+40.960 MHz
+42.000MHz
+44.000MHz
+44.2368MHz
+44.545MHz
+44.736MHz
+44.800MHz
+44.900MHz
+45.000MHz
+46.000MHz
+48.000MHz
+49.152MHz
+49.86MHz
+
+50.000MHz
+53.125MHz
+55.000MHz
+
+60.000MHz
+64.000MHz
+66.000MHz
+66.666MHz
+66.6666MHz
+
+73.66979MHz
+75.957292MHz
+76.121875MHz
+
+80.000MHz
+
+100.00MHz
+
+*/
diff --git a/src/emu/memory.c b/src/emu/memory.c
index 648060d438e..032a91321b3 100644
--- a/src/emu/memory.c
+++ b/src/emu/memory.c
@@ -870,6 +870,23 @@ void memory_set_bank(int banknum, int entrynum)
/*-------------------------------------------------
+ memory_get_bank - return the currently
+ selected bank
+-------------------------------------------------*/
+
+int memory_get_bank(int banknum)
+{
+ /* validation checks */
+ if (banknum < STATIC_BANK1 || banknum > MAX_EXPLICIT_BANKS || !bankdata[banknum].used)
+ fatalerror("memory_get_bank called with invalid bank %d", banknum);
+ if (bankdata[banknum].dynamic)
+ fatalerror("memory_get_bank called with dynamic bank %d", banknum);
+ return bankdata[banknum].curentry;
+}
+
+
+
+/*-------------------------------------------------
memory_set_bankptr - set the base of a bank
-------------------------------------------------*/
@@ -2118,7 +2135,7 @@ static void *allocate_memory_block(int cpunum, int spacenum, offs_t start, offs_
int allocatemem = (memory == NULL);
int region;
- VPRINTF(("allocate_memory_block(%d,%d,%08X,%08X,%08X)\n", cpunum, spacenum, start, end, (UINT32)(FPTR)memory));
+ VPRINTF(("allocate_memory_block(%d,%d,%08X,%08X,%p)\n", cpunum, spacenum, start, end, memory));
/* if we weren't passed a memory block, allocate one and clear it to zero */
if (allocatemem)
@@ -2188,7 +2205,7 @@ static address_map *assign_intersecting_blocks(addrspace_data *space, offs_t sta
if (map->share && shared_ptr[map->share])
{
map->memory = shared_ptr[map->share];
- VPRINTF(("memory range %08X-%08X -> shared_ptr[%d] [%08X]\n", map->start, map->end, map->share, (UINT32)(FPTR)map->memory));
+ VPRINTF(("memory range %08X-%08X -> shared_ptr[%d] [%p]\n", map->start, map->end, map->share, map->memory));
}
/* otherwise, look for a match in this block */
@@ -2199,7 +2216,7 @@ static address_map *assign_intersecting_blocks(addrspace_data *space, offs_t sta
if (map->start >= start && map->end <= end)
{
map->memory = base + (map->start - start);
- VPRINTF(("memory range %08X-%08X -> found in block from %08X-%08X [%08X]\n", map->start, map->end, start, end, (UINT32)(FPTR)map->memory));
+ VPRINTF(("memory range %08X-%08X -> found in block from %08X-%08X [%p]\n", map->start, map->end, start, end, map->memory));
}
}
else
@@ -2207,7 +2224,7 @@ static address_map *assign_intersecting_blocks(addrspace_data *space, offs_t sta
if (map->start >= start && map->start + map->mask <= end)
{
map->memory = base + (map->start - start);
- VPRINTF(("memory range %08X-%08X -> found in block from %08X-%08X [%08X]\n", map->start, map->end, start, end, (UINT32)(FPTR)map->memory));
+ VPRINTF(("memory range %08X-%08X -> found in block from %08X-%08X [%p]\n", map->start, map->end, start, end, map->memory));
}
}
}
@@ -2290,7 +2307,7 @@ static void find_memory(void)
if (!IS_AMENTRY_EXTENDED(map) && map->start == bankdata[banknum].base)
{
bank_ptr[banknum] = map->memory;
- VPRINTF(("assigned bank %d pointer to memory from range %08X-%08X [%08X]\n", banknum, map->start, map->end, (UINT32)(FPTR)map->memory));
+ VPRINTF(("assigned bank %d pointer to memory from range %08X-%08X [%p]\n", banknum, map->start, map->end, map->memory));
break;
}
@@ -2328,7 +2345,7 @@ static void *memory_find_base(int cpunum, int spacenum, int readwrite, offs_t of
{
if (maskoffs >= map->start && maskoffs <= map->end)
{
- VPRINTF(("found in entry %08X-%08X [%08X]\n", map->start, map->end, (UINT32)(FPTR)map->memory + (maskoffs - map->start)));
+ VPRINTF(("found in entry %08X-%08X [%p]\n", map->start, map->end, (UINT8 *)map->memory + (maskoffs - map->start)));
return (UINT8 *)map->memory + (maskoffs - map->start);
}
}
@@ -2336,7 +2353,7 @@ static void *memory_find_base(int cpunum, int spacenum, int readwrite, offs_t of
{
if ((maskoffs & map->end) == map->start)
{
- VPRINTF(("found in entry %08X-%08X [%08X]\n", map->start, map->end, (UINT32)(FPTR)map->memory + (maskoffs - map->start)));
+ VPRINTF(("found in entry %08X-%08X [%p]\n", map->start, map->end, (UINT8 *)map->memory + (maskoffs - map->start)));
return (UINT8 *)map->memory + (maskoffs - map->start);
}
}
@@ -2346,7 +2363,7 @@ static void *memory_find_base(int cpunum, int spacenum, int readwrite, offs_t of
for (blocknum = 0, block = memory_block_list; blocknum < memory_block_count; blocknum++, block++)
if (block->cpunum == cpunum && block->spacenum == spacenum && block->start <= offset && block->end > offset)
{
- VPRINTF(("found in allocated memory block %08X-%08X [%08X]\n", block->start, block->end, (UINT32)(FPTR)block->data + (offset - block->start)));
+ VPRINTF(("found in allocated memory block %08X-%08X [%p]\n", block->start, block->end, block->data + (offset - block->start)));
return block->data + offset - block->start;
}
diff --git a/src/emu/memory.h b/src/emu/memory.h
index 87a84ec5e27..44afa1ef340 100644
--- a/src/emu/memory.h
+++ b/src/emu/memory.h
@@ -953,6 +953,7 @@ void * memory_get_op_ptr(int cpunum, offs_t offset, int arg);
void memory_configure_bank(int banknum, int startentry, int numentries, void *base, offs_t stride);
void memory_configure_bank_decrypted(int banknum, int startentry, int numentries, void *base, offs_t stride);
void memory_set_bank(int banknum, int entrynum);
+int memory_get_bank(int banknum);
void memory_set_bankptr(int banknum, void *base);
/* ----- debugging ----- */