mirror of
https://github.com/libretro/FBNeo.git
synced 2025-03-03 07:29:40 +00:00
toaplan: a little cleanup (static lots of functions, remove unused variables, fix states in ghox and dogyuun)
This commit is contained in:
parent
2e06cd0006
commit
a9413b5008
@ -3,6 +3,7 @@
|
||||
|
||||
#include "toaplan.h"
|
||||
#include "nmk112.h"
|
||||
|
||||
// Batrider
|
||||
|
||||
static UINT8 drvButton[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
@ -11,10 +12,8 @@ static UINT8 drvJoy2[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
static UINT8 drvInput[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
static UINT8 drvRegion = 0;
|
||||
static UINT8 drvReset = 0;
|
||||
static UINT8 bDrawScreen;
|
||||
|
||||
static UINT8 nIRQPending;
|
||||
static bool bVBlank;
|
||||
|
||||
static INT32 nData;
|
||||
|
||||
@ -24,35 +23,35 @@ static INT32 nTextROMStatus;
|
||||
static void Map68KTextROM(bool bMapTextROM);
|
||||
|
||||
static struct BurnInputInfo batriderInputList[] = {
|
||||
{"P1 Coin", BIT_DIGITAL, drvButton + 3, "p1 coin"},
|
||||
{"P1 Start", BIT_DIGITAL, drvButton + 5, "p1 start"},
|
||||
{"P1 Coin", BIT_DIGITAL, drvButton + 3, "p1 coin" },
|
||||
{"P1 Start", BIT_DIGITAL, drvButton + 5, "p1 start" },
|
||||
|
||||
{"P1 Up", BIT_DIGITAL, drvJoy1 + 0, "p1 up"},
|
||||
{"P1 Down", BIT_DIGITAL, drvJoy1 + 1, "p1 down"},
|
||||
{"P1 Left", BIT_DIGITAL, drvJoy1 + 2, "p1 left"},
|
||||
{"P1 Right", BIT_DIGITAL, drvJoy1 + 3, "p1 right"},
|
||||
{"P1 Shoot 1", BIT_DIGITAL, drvJoy1 + 4, "p1 fire 1"},
|
||||
{"P1 Shoot 2", BIT_DIGITAL, drvJoy1 + 5, "p1 fire 2"},
|
||||
{"P1 Shoot 3", BIT_DIGITAL, drvJoy1 + 6, "p1 fire 3"},
|
||||
{"P1 Up", BIT_DIGITAL, drvJoy1 + 0, "p1 up" },
|
||||
{"P1 Down", BIT_DIGITAL, drvJoy1 + 1, "p1 down" },
|
||||
{"P1 Left", BIT_DIGITAL, drvJoy1 + 2, "p1 left" },
|
||||
{"P1 Right", BIT_DIGITAL, drvJoy1 + 3, "p1 right" },
|
||||
{"P1 Shoot 1", BIT_DIGITAL, drvJoy1 + 4, "p1 fire 1" },
|
||||
{"P1 Shoot 2", BIT_DIGITAL, drvJoy1 + 5, "p1 fire 2" },
|
||||
{"P1 Shoot 3", BIT_DIGITAL, drvJoy1 + 6, "p1 fire 3" },
|
||||
|
||||
{"P2 Coin", BIT_DIGITAL, drvButton + 4, "p2 coin"},
|
||||
{"P2 Start", BIT_DIGITAL, drvButton + 6, "p2 start"},
|
||||
{"P2 Coin", BIT_DIGITAL, drvButton + 4, "p2 coin" },
|
||||
{"P2 Start", BIT_DIGITAL, drvButton + 6, "p2 start" },
|
||||
|
||||
{"P2 Up", BIT_DIGITAL, drvJoy2 + 0, "p2 up"},
|
||||
{"P2 Down", BIT_DIGITAL, drvJoy2 + 1, "p2 down"},
|
||||
{"P2 Left", BIT_DIGITAL, drvJoy2 + 2, "p2 left"},
|
||||
{"P2 Right", BIT_DIGITAL, drvJoy2 + 3, "p2 right"},
|
||||
{"P2 Shoot 1", BIT_DIGITAL, drvJoy2 + 4, "p2 fire 1"},
|
||||
{"P2 Shoot 2", BIT_DIGITAL, drvJoy2 + 5, "p2 fire 2"},
|
||||
{"P2 Shoot 3", BIT_DIGITAL, drvJoy2 + 6, "p2 fire 3"},
|
||||
{"P2 Up", BIT_DIGITAL, drvJoy2 + 0, "p2 up" },
|
||||
{"P2 Down", BIT_DIGITAL, drvJoy2 + 1, "p2 down" },
|
||||
{"P2 Left", BIT_DIGITAL, drvJoy2 + 2, "p2 left" },
|
||||
{"P2 Right", BIT_DIGITAL, drvJoy2 + 3, "p2 right" },
|
||||
{"P2 Shoot 1", BIT_DIGITAL, drvJoy2 + 4, "p2 fire 1" },
|
||||
{"P2 Shoot 2", BIT_DIGITAL, drvJoy2 + 5, "p2 fire 2" },
|
||||
{"P2 Shoot 3", BIT_DIGITAL, drvJoy2 + 6, "p2 fire 3" },
|
||||
|
||||
{"Reset", BIT_DIGITAL, &drvReset, "reset"},
|
||||
{"Test", BIT_DIGITAL, drvButton + 2, "diag"},
|
||||
{"Service", BIT_DIGITAL, drvButton + 0, "service"},
|
||||
{"Dip 1", BIT_DIPSWITCH, drvInput + 3, "dip"},
|
||||
{"Dip 2", BIT_DIPSWITCH, drvInput + 4, "dip"},
|
||||
{"Dip 3", BIT_DIPSWITCH, drvInput + 5, "dip"},
|
||||
{"Region", BIT_DIPSWITCH, &drvRegion , "dip"},
|
||||
{"Reset", BIT_DIGITAL, &drvReset, "reset" },
|
||||
{"Test", BIT_DIGITAL, drvButton + 2, "diag" },
|
||||
{"Service", BIT_DIGITAL, drvButton + 0, "service" },
|
||||
{"Dip 1", BIT_DIPSWITCH, drvInput + 3, "dip" },
|
||||
{"Dip 2", BIT_DIPSWITCH, drvInput + 4, "dip" },
|
||||
{"Dip 3", BIT_DIPSWITCH, drvInput + 5, "dip" },
|
||||
{"Region", BIT_DIPSWITCH, &drvRegion , "dip" },
|
||||
};
|
||||
|
||||
STDINPUTINFO(batrider)
|
||||
@ -258,7 +257,7 @@ static UINT8 *Mem = NULL, *MemEnd = NULL;
|
||||
static UINT8 *RamStart, *RamEnd;
|
||||
static UINT8 *Rom01;
|
||||
static UINT8 *Ram01, *Ram02, *RamPal;
|
||||
UINT8 *RamShared;
|
||||
static UINT8 *RamShared;
|
||||
static INT32 nColCount = 0x0800;
|
||||
|
||||
static INT32 MemIndex()
|
||||
@ -300,8 +299,8 @@ static void drvZ80Bankswitch(INT32 nBank)
|
||||
nBank &= 0x0F;
|
||||
if (nBank != nCurrentBank) {
|
||||
UINT8* nStartAddress = RomZ80 + (nBank << 14);
|
||||
ZetMapArea(0x8000, 0xBFFF, 0, nStartAddress);
|
||||
ZetMapArea(0x8000, 0xBFFF, 2, nStartAddress);
|
||||
|
||||
ZetMapMemory(nStartAddress, 0x8000, 0xbfff, MAP_ROM);
|
||||
|
||||
nCurrentBank = nBank;
|
||||
}
|
||||
@ -325,17 +324,17 @@ static INT32 drvScan(INT32 nAction, INT32* pnMin)
|
||||
|
||||
SekScan(nAction); // Scan 68000
|
||||
ZetScan(nAction); // Scan Z80
|
||||
SCAN_VAR(nCurrentBank);
|
||||
|
||||
MSM6295Scan(nAction, pnMin);
|
||||
BurnYM2151Scan(nAction, pnMin);
|
||||
NMK112_Scan(nAction);
|
||||
|
||||
ToaScanGP9001(nAction, pnMin);
|
||||
|
||||
SCAN_VAR(nIRQPending);
|
||||
SCAN_VAR(nTextROMStatus);
|
||||
|
||||
SCAN_VAR(drvInput);
|
||||
SCAN_VAR(nCurrentBank);
|
||||
SCAN_VAR(nData);
|
||||
|
||||
if (nAction & ACB_WRITE) {
|
||||
INT32 n = nTextROMStatus;
|
||||
@ -377,7 +376,7 @@ static INT32 LoadRoms()
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT8 __fastcall batriderZIn(UINT16 nAddress)
|
||||
static UINT8 __fastcall batriderZIn(UINT16 nAddress)
|
||||
{
|
||||
nAddress &= 0xFF;
|
||||
|
||||
@ -400,7 +399,7 @@ UINT8 __fastcall batriderZIn(UINT16 nAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __fastcall batriderZOut(UINT16 nAddress, UINT8 nValue)
|
||||
static void __fastcall batriderZOut(UINT16 nAddress, UINT8 nValue)
|
||||
{
|
||||
nAddress &= 0xFF;
|
||||
|
||||
@ -474,7 +473,7 @@ static INT32 drvZInit()
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT8 __fastcall batriderReadByte(UINT32 sekAddress)
|
||||
static UINT8 __fastcall batriderReadByte(UINT32 sekAddress)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
|
||||
@ -503,7 +502,7 @@ UINT8 __fastcall batriderReadByte(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT16 __fastcall batriderReadWord(UINT32 sekAddress)
|
||||
static UINT16 __fastcall batriderReadWord(UINT32 sekAddress)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
case 0x500006:
|
||||
@ -527,7 +526,7 @@ UINT16 __fastcall batriderReadWord(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __fastcall batriderWriteByte(UINT32 sekAddress, UINT8) // UINT8 byteValue
|
||||
static void __fastcall batriderWriteByte(UINT32 sekAddress, UINT8) // UINT8 byteValue
|
||||
{
|
||||
switch (sekAddress) {
|
||||
|
||||
@ -539,7 +538,7 @@ void __fastcall batriderWriteByte(UINT32 sekAddress, UINT8) // UINT8 byteValue
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall batriderWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
static void __fastcall batriderWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
case 0x500020: {
|
||||
@ -608,7 +607,7 @@ void __fastcall batriderWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
}
|
||||
}
|
||||
|
||||
UINT16 __fastcall batriderReadWordGP9001(UINT32 sekAddress)
|
||||
static UINT16 __fastcall batriderReadWordGP9001(UINT32 sekAddress)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
case 0x400008:
|
||||
@ -621,7 +620,7 @@ UINT16 __fastcall batriderReadWordGP9001(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __fastcall batriderWriteWordGP9001(UINT32 sekAddress, UINT16 wordValue)
|
||||
static void __fastcall batriderWriteWordGP9001(UINT32 sekAddress, UINT16 wordValue)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
|
||||
@ -644,12 +643,12 @@ void __fastcall batriderWriteWordGP9001(UINT32 sekAddress, UINT16 wordValue)
|
||||
}
|
||||
}
|
||||
|
||||
UINT8 __fastcall batriderReadByteZ80ROM(UINT32 sekAddress)
|
||||
static UINT8 __fastcall batriderReadByteZ80ROM(UINT32 sekAddress)
|
||||
{
|
||||
return RomZ80[(sekAddress & 0x7FFFF) >> 1];
|
||||
}
|
||||
|
||||
UINT16 __fastcall batriderReadWordZ80ROM(UINT32 sekAddress)
|
||||
static UINT16 __fastcall batriderReadWordZ80ROM(UINT32 sekAddress)
|
||||
{
|
||||
return RomZ80[(sekAddress & 0x7FFFF) >> 1];
|
||||
}
|
||||
@ -785,9 +784,9 @@ static INT32 drvInit()
|
||||
ToaPalInit();
|
||||
|
||||
nTextROMStatus = -1;
|
||||
bDrawScreen = true;
|
||||
|
||||
drvDoReset(); // Reset machine
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -811,13 +810,11 @@ static INT32 drvDraw()
|
||||
{
|
||||
ToaClearScreen(0);
|
||||
|
||||
if (bDrawScreen) {
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
ToaExtraTextLayer(); // Render extra text layer
|
||||
}
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
ToaExtraTextLayer(); // Render extra text layer
|
||||
|
||||
ToaPalUpdate(); // Update the palette
|
||||
ToaPalUpdate(); // Update the palette
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -853,8 +850,8 @@ static INT32 drvFrame()
|
||||
SekSetCyclesScanline(nCyclesTotal[0] / 262);
|
||||
nToaCyclesDisplayStart = nCyclesTotal[0] - ((nCyclesTotal[0] * (TOA_VBLANK_LINES + 240)) / 262);
|
||||
nToaCyclesVBlankStart = nCyclesTotal[0] - ((nCyclesTotal[0] * TOA_VBLANK_LINES) / 262);
|
||||
bVBlank = false;
|
||||
|
||||
bool bVBlank = false;
|
||||
INT32 nSoundBufferPos = 0;
|
||||
|
||||
ZetOpen(0);
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include "toaplan.h"
|
||||
#include "nec_intf.h"
|
||||
|
||||
// Batsugun & Batsugun Special Version
|
||||
|
||||
static UINT8 DrvButton[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
@ -11,8 +12,6 @@ static UINT8 DrvJoy2[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
static UINT8 DrvInput[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
static UINT8 DrvReset = 0;
|
||||
static UINT8 bDrawScreen;
|
||||
static bool bVBlank;
|
||||
|
||||
static INT32 v25_reset = 0;
|
||||
|
||||
@ -102,33 +101,33 @@ STD_ROM_PICK(batsugunb)
|
||||
STD_ROM_FN(batsugunb)
|
||||
|
||||
static struct BurnInputInfo batsugunInputList[] = {
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin"},
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start"},
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin" },
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start" },
|
||||
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up"},
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down"},
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left"},
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right"},
|
||||
{"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1"},
|
||||
{"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2"},
|
||||
{"P1 Button 3", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 3"},
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up" },
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down" },
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left" },
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right" },
|
||||
{"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1" },
|
||||
{"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2" },
|
||||
{"P1 Button 3", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 3" },
|
||||
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin"},
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start"},
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin" },
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start" },
|
||||
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up"},
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down"},
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left"},
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right"},
|
||||
{"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1"},
|
||||
{"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2"},
|
||||
{"P2 Button 3", BIT_DIGITAL, DrvJoy2 + 6, "p2 fire 3"},
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up" },
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down" },
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left" },
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right" },
|
||||
{"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1" },
|
||||
{"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2" },
|
||||
{"P2 Button 3", BIT_DIGITAL, DrvJoy2 + 6, "p2 fire 3" },
|
||||
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset"},
|
||||
{"Diagnostics", BIT_DIGITAL, DrvButton + 0, "diag"},
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 3, "dip"},
|
||||
{"Dip B", BIT_DIPSWITCH, DrvInput + 4, "dip"},
|
||||
{"Dip C", BIT_DIPSWITCH, DrvInput + 5, "dip"},
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset" },
|
||||
{"Diagnostics", BIT_DIGITAL, DrvButton + 0, "diag" },
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 3, "dip" },
|
||||
{"Dip B", BIT_DIPSWITCH, DrvInput + 4, "dip" },
|
||||
{"Dip C", BIT_DIPSWITCH, DrvInput + 5, "dip" },
|
||||
};
|
||||
|
||||
STDINPUTINFO(batsugun)
|
||||
@ -287,10 +286,13 @@ static INT32 DrvScan(INT32 nAction, INT32 *pnMin)
|
||||
|
||||
SekScan(nAction); // scan 68000 states
|
||||
VezScan(nAction);
|
||||
|
||||
BurnYM2151Scan(nAction, pnMin);
|
||||
MSM6295Scan(nAction, pnMin);
|
||||
|
||||
ToaScanGP9001(nAction, pnMin);
|
||||
|
||||
SCAN_VAR(v25_reset);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -364,7 +366,7 @@ static INT32 KoreaLoadRoms()
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT8 __fastcall batsugunReadByte(UINT32 sekAddress)
|
||||
static UINT8 __fastcall batsugunReadByte(UINT32 sekAddress)
|
||||
{
|
||||
if ((sekAddress & 0xff0000) == 0x210000) {
|
||||
return ShareRAM[(sekAddress / 2) & 0x7fff];
|
||||
@ -387,7 +389,7 @@ UINT8 __fastcall batsugunReadByte(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT16 __fastcall batsugunReadWord(UINT32 sekAddress)
|
||||
static UINT16 __fastcall batsugunReadWord(UINT32 sekAddress)
|
||||
{
|
||||
if ((sekAddress & 0xff0000) == 0x210000) {
|
||||
return ShareRAM[(sekAddress / 2) & 0x7fff];
|
||||
@ -423,7 +425,7 @@ UINT16 __fastcall batsugunReadWord(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __fastcall batsugunWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
static void __fastcall batsugunWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
{
|
||||
if ((sekAddress & 0xff0000) == 0x210000) {
|
||||
ShareRAM[(sekAddress / 2) & 0x7fff] = byteValue;
|
||||
@ -443,7 +445,7 @@ void __fastcall batsugunWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall batsugunWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
static void __fastcall batsugunWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
{
|
||||
if ((sekAddress & 0xff0000) == 0x210000) {
|
||||
ShareRAM[(sekAddress / 2) & 0x7fff] = wordValue;
|
||||
@ -490,7 +492,7 @@ void __fastcall batsugunWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall batsugun_v25_write(UINT32 address, UINT8 data)
|
||||
static void __fastcall batsugun_v25_write(UINT32 address, UINT8 data)
|
||||
{
|
||||
switch (address)
|
||||
{
|
||||
@ -508,7 +510,7 @@ void __fastcall batsugun_v25_write(UINT32 address, UINT8 data)
|
||||
}
|
||||
}
|
||||
|
||||
UINT8 __fastcall batsugun_v25_read(UINT32 address)
|
||||
static UINT8 __fastcall batsugun_v25_read(UINT32 address)
|
||||
{
|
||||
switch (address)
|
||||
{
|
||||
@ -522,7 +524,7 @@ UINT8 __fastcall batsugun_v25_read(UINT32 address)
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT8 __fastcall batsugun_v25_read_port(UINT32 port)
|
||||
static UINT8 __fastcall batsugun_v25_read_port(UINT32 port)
|
||||
{
|
||||
switch (port)
|
||||
{
|
||||
@ -628,8 +630,6 @@ static INT32 DrvInit(INT32 (*pRomLoad)())
|
||||
ToaPalSrc = RamPal;
|
||||
ToaPalInit();
|
||||
|
||||
bDrawScreen = true;
|
||||
|
||||
DrvDoReset(); // Reset machine
|
||||
|
||||
return 0;
|
||||
@ -667,21 +667,14 @@ static INT32 DrvDraw()
|
||||
{
|
||||
ToaClearScreen(0);
|
||||
|
||||
if (bDrawScreen) {
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
}
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
|
||||
ToaPalUpdate(); // Update the palette
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline static INT32 CheckSleep(INT32)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static INT32 DrvFrame()
|
||||
{
|
||||
INT32 nInterleave = 10;
|
||||
@ -716,7 +709,7 @@ static INT32 DrvFrame()
|
||||
SekSetCyclesScanline(nCyclesTotal[0] / 262);
|
||||
nToaCyclesDisplayStart = nCyclesTotal[0] - ((nCyclesTotal[0] * (TOA_VBLANK_LINES + 240)) / 262);
|
||||
nToaCyclesVBlankStart = nCyclesTotal[0] - ((nCyclesTotal[0] * TOA_VBLANK_LINES) / 262);
|
||||
bVBlank = false;
|
||||
bool bVBlank = false;
|
||||
|
||||
VezOpen(0);
|
||||
|
||||
@ -747,13 +740,9 @@ static INT32 DrvFrame()
|
||||
}
|
||||
|
||||
nCyclesSegment = nNext - nCyclesDone[nCurrentCPU];
|
||||
if (bVBlank || (!CheckSleep(nCurrentCPU))) { // See if this CPU is busywaiting
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
} else {
|
||||
nCyclesDone[nCurrentCPU] += SekIdle(nCyclesSegment);
|
||||
}
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
|
||||
// sound! (increase interleave?)
|
||||
// sound!
|
||||
if (v25_reset) {
|
||||
nCyclesDone[1] += nCyclesTotal[1] / nInterleave;
|
||||
} else {
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include "toaplan.h"
|
||||
#include "nmk112.h"
|
||||
|
||||
// Battle Garegga
|
||||
|
||||
static UINT8 DrvButton[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
@ -11,8 +12,6 @@ static UINT8 DrvJoy2[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
static UINT8 DrvInput[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
static UINT8 DrvReset = 0;
|
||||
static UINT8 bDrawScreen;
|
||||
static bool bVBlank;
|
||||
|
||||
static UINT8 nIRQPending;
|
||||
|
||||
@ -208,33 +207,33 @@ STD_ROM_PICK(bgareggabla)
|
||||
STD_ROM_FN(bgareggabla)
|
||||
|
||||
static struct BurnInputInfo battlegInputList[] = {
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin"},
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start"},
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin" },
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start" },
|
||||
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up"},
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down"},
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left"},
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right"},
|
||||
{"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1"},
|
||||
{"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2"},
|
||||
{"P1 Button 3", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 3"},
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up" },
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down" },
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left" },
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right" },
|
||||
{"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1" },
|
||||
{"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2" },
|
||||
{"P1 Button 3", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 3" },
|
||||
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin"},
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start"},
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin" },
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start" },
|
||||
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up"},
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down"},
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left"},
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right"},
|
||||
{"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1"},
|
||||
{"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2"},
|
||||
{"P2 Button 3", BIT_DIGITAL, DrvJoy2 + 6, "p2 fire 3"},
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up" },
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down" },
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left" },
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right" },
|
||||
{"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1" },
|
||||
{"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2" },
|
||||
{"P2 Button 3", BIT_DIGITAL, DrvJoy2 + 6, "p2 fire 3" },
|
||||
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset"},
|
||||
{"Diagnostics", BIT_DIGITAL, DrvButton + 0, "diag"},
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 3, "dip"},
|
||||
{"Dip B", BIT_DIPSWITCH, DrvInput + 4, "dip"},
|
||||
{"Dip C", BIT_DIPSWITCH, DrvInput + 5, "dip"},
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset" },
|
||||
{"Diagnostics", BIT_DIGITAL, DrvButton + 0, "diag" },
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 3, "dip" },
|
||||
{"Dip B", BIT_DIPSWITCH, DrvInput + 4, "dip" },
|
||||
{"Dip C", BIT_DIPSWITCH, DrvInput + 5, "dip" },
|
||||
};
|
||||
|
||||
STDINPUTINFO(battleg)
|
||||
@ -467,14 +466,14 @@ static INT32 DrvScan(INT32 nAction, INT32 *pnMin)
|
||||
|
||||
SekScan(nAction); // scan 68000 states
|
||||
ZetScan(nAction); // Scan Z80
|
||||
SCAN_VAR(nCurrentBank);
|
||||
|
||||
MSM6295Scan(nAction, pnMin);
|
||||
BurnYM2151Scan(nAction, pnMin);
|
||||
NMK112_Scan(nAction);
|
||||
|
||||
ToaScanGP9001(nAction, pnMin);
|
||||
|
||||
SCAN_VAR(DrvInput);
|
||||
SCAN_VAR(nCurrentBank);
|
||||
SCAN_VAR(nSoundCommand);
|
||||
SCAN_VAR(nIRQPending);
|
||||
|
||||
@ -556,7 +555,7 @@ static INT32 LoadRomsBla()
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT8 __fastcall battlegZ80Read(UINT16 nAddress)
|
||||
static UINT8 __fastcall battlegZ80Read(UINT16 nAddress)
|
||||
{
|
||||
// bprintf(0, _T("z80 read %4X\n"), nAddress);
|
||||
switch (nAddress) {
|
||||
@ -576,7 +575,7 @@ UINT8 __fastcall battlegZ80Read(UINT16 nAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __fastcall battlegZ80Write(UINT16 nAddress, UINT8 nValue)
|
||||
static void __fastcall battlegZ80Write(UINT16 nAddress, UINT8 nValue)
|
||||
{
|
||||
// bprintf(0, _T("z80 wrote %4X with %2X\n"), nAddress, nValue);
|
||||
switch (nAddress) {
|
||||
@ -639,7 +638,7 @@ static INT32 DrvZ80Init()
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT8 __fastcall battlegReadByte(UINT32 sekAddress)
|
||||
static UINT8 __fastcall battlegReadByte(UINT32 sekAddress)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
|
||||
@ -667,7 +666,7 @@ UINT8 __fastcall battlegReadByte(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT16 __fastcall battlegReadWord(UINT32 sekAddress)
|
||||
static UINT16 __fastcall battlegReadWord(UINT32 sekAddress)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
|
||||
@ -685,7 +684,7 @@ UINT16 __fastcall battlegReadWord(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __fastcall battlegWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
static void __fastcall battlegWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
|
||||
@ -709,7 +708,7 @@ void __fastcall battlegWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall battlegWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
static void __fastcall battlegWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
|
||||
@ -842,8 +841,6 @@ static INT32 battlegInit()
|
||||
ToaPalSrc = RamPal;
|
||||
ToaPalInit();
|
||||
|
||||
bDrawScreen = true;
|
||||
|
||||
// mar 2 1996 & apr 2 1996 ver: 0x0009AC - 0x0009B8 & 0x001F5E - 0x001F64 & 0x003A1C - 0x003A22
|
||||
// feb 2 1996 ver: 0x0009AC - 0x0009B8 & 0x001F2E - 0x001F34 & 0x0039EC - 0x0039F2
|
||||
|
||||
@ -890,11 +887,9 @@ static INT32 DrvDraw()
|
||||
{
|
||||
ToaClearScreen(0);
|
||||
|
||||
if (bDrawScreen) {
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
ToaExtraTextLayer(); // Render extra text layer
|
||||
}
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
ToaExtraTextLayer(); // Render extra text layer
|
||||
|
||||
ToaPalUpdate(); // Update the palette
|
||||
|
||||
@ -932,7 +927,7 @@ static INT32 DrvFrame()
|
||||
SekSetCyclesScanline(nCyclesTotal[0] / 262);
|
||||
nToaCyclesDisplayStart = nCyclesTotal[0] - ((nCyclesTotal[0] * (TOA_VBLANK_LINES + 240)) / 262); // 0
|
||||
nToaCyclesVBlankStart = nCyclesTotal[0] - ((nCyclesTotal[0] * TOA_VBLANK_LINES) / 262);
|
||||
bVBlank = false;
|
||||
bool bVBlank = false;
|
||||
|
||||
INT32 nSoundBufferPos = 0;
|
||||
|
||||
|
@ -20,8 +20,6 @@ static UINT8 *DefaultEEPROM = NULL;
|
||||
static UINT8 DrvRegion = 0;
|
||||
|
||||
static UINT8 DrvReset = 0;
|
||||
static UINT8 bDrawScreen;
|
||||
static bool bVBlank;
|
||||
|
||||
static UINT8 nIRQPending;
|
||||
|
||||
@ -136,35 +134,35 @@ STD_ROM_PICK(bkraiduj)
|
||||
STD_ROM_FN(bkraiduj)
|
||||
|
||||
static struct BurnInputInfo bbakraidInputList[] = {
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin"},
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start"},
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin" },
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start" },
|
||||
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up"},
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down"},
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left"},
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right"},
|
||||
{"P1 Shoot 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1"},
|
||||
{"P1 Shoot 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2"},
|
||||
{"P1 Shoot 3", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 3"},
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up" },
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down" },
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left" },
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right" },
|
||||
{"P1 Shoot 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1" },
|
||||
{"P1 Shoot 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2" },
|
||||
{"P1 Shoot 3", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 3" },
|
||||
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin"},
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start"},
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin" },
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start" },
|
||||
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up"},
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down"},
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left"},
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right"},
|
||||
{"P2 Shoot 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1"},
|
||||
{"P2 Shoot 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2"},
|
||||
{"P2 Shoot 3", BIT_DIGITAL, DrvJoy2 + 6, "p2 fire 3"},
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up" },
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down" },
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left" },
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right" },
|
||||
{"P2 Shoot 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1" },
|
||||
{"P2 Shoot 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2" },
|
||||
{"P2 Shoot 3", BIT_DIGITAL, DrvJoy2 + 6, "p2 fire 3" },
|
||||
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset"},
|
||||
{"Test", BIT_DIGITAL, DrvButton + 2, "diag"},
|
||||
{"Service", BIT_DIGITAL, DrvButton + 0, "service"},
|
||||
{"Dip 1", BIT_DIPSWITCH, DrvInput + 3, "dip"},
|
||||
{"Dip 2", BIT_DIPSWITCH, DrvInput + 4, "dip"},
|
||||
{"Dip 3", BIT_DIPSWITCH, DrvInput + 5, "dip"},
|
||||
{"Region", BIT_DIPSWITCH, &DrvRegion , "dip"},
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset" },
|
||||
{"Test", BIT_DIGITAL, DrvButton + 2, "diag" },
|
||||
{"Service", BIT_DIGITAL, DrvButton + 0, "service" },
|
||||
{"Dip 1", BIT_DIPSWITCH, DrvInput + 3, "dip" },
|
||||
{"Dip 2", BIT_DIPSWITCH, DrvInput + 4, "dip" },
|
||||
{"Dip 3", BIT_DIPSWITCH, DrvInput + 5, "dip" },
|
||||
{"Region", BIT_DIPSWITCH, &DrvRegion , "dip" },
|
||||
};
|
||||
|
||||
STDINPUTINFO(bbakraid)
|
||||
@ -255,10 +253,10 @@ static struct BurnDIPInfo bbakraidDIPList[] = {
|
||||
{0x16, 0x01, 0x30, 0x20, "2"},
|
||||
{0x16, 0x01, 0x30, 0x30, "1"},
|
||||
{0, 0xFE, 0, 4, "Extra player"},
|
||||
{0x16, 0x01, 0xC0, 0x00, "2000000 each"},
|
||||
{0x16, 0x01, 0xC0, 0x40, "3000000 each"},
|
||||
{0x16, 0x01, 0xC0, 0x80, "4000000 each"},
|
||||
{0x16, 0x01, 0xC0, 0xC0, "No extra player"},
|
||||
{0x16, 0x01, 0xC0, 0x00, "2000000 each"},
|
||||
{0x16, 0x01, 0xC0, 0x40, "3000000 each"},
|
||||
{0x16, 0x01, 0xC0, 0x80, "4000000 each"},
|
||||
{0x16, 0x01, 0xC0, 0xC0, "No extra player"},
|
||||
|
||||
// DIP 3
|
||||
{0, 0xFE, 0, 2, "Screen flip"},
|
||||
@ -870,7 +868,6 @@ static INT32 bbakraidInit()
|
||||
ToaPalInit();
|
||||
|
||||
nTextROMStatus = -1;
|
||||
bDrawScreen = true;
|
||||
|
||||
DrvDoReset(); // Reset machine
|
||||
|
||||
@ -908,22 +905,15 @@ static INT32 DrvDraw()
|
||||
{
|
||||
ToaClearScreen(0);
|
||||
|
||||
if (bDrawScreen) {
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
ToaExtraTextLayer(); // Render extra text layer
|
||||
}
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
ToaExtraTextLayer(); // Render extra text layer
|
||||
|
||||
ToaPalUpdate(); // Update the palette
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline static INT32 CheckSleep(INT32)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static INT32 DrvFrame()
|
||||
{
|
||||
INT32 nInterleave = 8;
|
||||
@ -959,7 +949,7 @@ static INT32 DrvFrame()
|
||||
SekSetCyclesScanline(nCyclesTotal[0] / 262);
|
||||
nToaCyclesDisplayStart = nCyclesTotal[0] - ((nCyclesTotal[0] * (TOA_VBLANK_LINES + 240)) / 262);
|
||||
nToaCyclesVBlankStart = nCyclesTotal[0] - ((nCyclesTotal[0] * TOA_VBLANK_LINES) / 262);
|
||||
bVBlank = false;
|
||||
bool bVBlank = false;
|
||||
|
||||
INT32 nSoundBufferPos = 0;
|
||||
|
||||
@ -979,11 +969,7 @@ static INT32 DrvFrame()
|
||||
if (!bVBlank && nNext > nToaCyclesVBlankStart) {
|
||||
if (SekTotalCycles() < nToaCyclesVBlankStart) {
|
||||
nCyclesSegment = nToaCyclesVBlankStart - SekTotalCycles();
|
||||
if (!CheckSleep(0)) {
|
||||
SekRun(nCyclesSegment);
|
||||
} else {
|
||||
SekIdle(nCyclesSegment);
|
||||
}
|
||||
SekRun(nCyclesSegment);
|
||||
}
|
||||
|
||||
nIRQPending = 1;
|
||||
@ -999,11 +985,7 @@ static INT32 DrvFrame()
|
||||
}
|
||||
|
||||
nCyclesSegment = nNext - SekTotalCycles();
|
||||
if (!CheckSleep(0)) { // See if this CPU is busywaiting
|
||||
SekRun(nCyclesSegment);
|
||||
} else {
|
||||
SekIdle(nCyclesSegment);
|
||||
}
|
||||
SekRun(nCyclesSegment);
|
||||
|
||||
if ((i & 1) == 0) {
|
||||
// Render sound segment
|
||||
@ -1066,10 +1048,9 @@ static INT32 DrvScan(INT32 nAction, INT32 *pnMin)
|
||||
|
||||
ToaScanGP9001(nAction, pnMin);
|
||||
|
||||
SCAN_VAR(DrvInput);
|
||||
SCAN_VAR(nSoundData);
|
||||
SCAN_VAR(nSoundlatchAck);
|
||||
SCAN_VAR(nCyclesDone);
|
||||
SCAN_VAR(nCyclesDone); // used as rollover cycles
|
||||
SCAN_VAR(Z80BusRQ);
|
||||
SCAN_VAR(nIRQPending);
|
||||
SCAN_VAR(nTextROMStatus);
|
||||
|
@ -11,10 +11,9 @@ static UINT8 DrvJoy2[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
static UINT8 DrvInput[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
static UINT8 DrvReset = 0;
|
||||
static UINT8 bDrawScreen;
|
||||
static bool bVBlank;
|
||||
|
||||
static INT32 v25_reset = 0;
|
||||
static INT32 i7hk = 0;
|
||||
|
||||
// Rom information
|
||||
static struct BurnRomInfo dogyuunRomDesc[] = {
|
||||
@ -66,33 +65,33 @@ STD_ROM_PICK(dogyuunt)
|
||||
STD_ROM_FN(dogyuunt)
|
||||
|
||||
static struct BurnInputInfo dogyuunInputList[] = {
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin"},
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start"},
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin" },
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start" },
|
||||
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up"},
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down"},
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left"},
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right"},
|
||||
{"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1"},
|
||||
{"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2"},
|
||||
{"P1 Button 3", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 3"},
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up" },
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down" },
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left" },
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right" },
|
||||
{"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1" },
|
||||
{"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2" },
|
||||
{"P1 Button 3", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 3" },
|
||||
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin"},
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start"},
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin" },
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start" },
|
||||
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up"},
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down"},
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left"},
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right"},
|
||||
{"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1"},
|
||||
{"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2"},
|
||||
{"P2 Button 3", BIT_DIGITAL, DrvJoy2 + 6, "p2 fire 3"},
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up" },
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down" },
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left" },
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right" },
|
||||
{"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1" },
|
||||
{"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2" },
|
||||
{"P2 Button 3", BIT_DIGITAL, DrvJoy2 + 6, "p2 fire 3" },
|
||||
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset"},
|
||||
{"Diagnostics", BIT_DIGITAL, DrvButton + 0, "diag"},
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 3, "dip"},
|
||||
{"Dip B", BIT_DIPSWITCH, DrvInput + 4, "dip"},
|
||||
{"Dip C", BIT_DIPSWITCH, DrvInput + 5, "dip"},
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset" },
|
||||
{"Diagnostics", BIT_DIGITAL, DrvButton + 0, "diag" },
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 3, "dip" },
|
||||
{"Dip B", BIT_DIPSWITCH, DrvInput + 4, "dip" },
|
||||
{"Dip C", BIT_DIPSWITCH, DrvInput + 5, "dip" },
|
||||
};
|
||||
|
||||
STDINPUTINFO(dogyuun)
|
||||
@ -286,19 +285,24 @@ static INT32 DrvScan(INT32 nAction, INT32 *pnMin)
|
||||
if (pnMin) { // Return minimum compatible version
|
||||
*pnMin = 0x020997;
|
||||
}
|
||||
|
||||
if (nAction & ACB_VOLATILE) { // Scan volatile ram
|
||||
memset(&ba, 0, sizeof(ba));
|
||||
ba.Data = RamStart;
|
||||
ba.Data = RamStart;
|
||||
ba.nLen = RamEnd - RamStart;
|
||||
ba.szName = "All Ram";
|
||||
BurnAcb(&ba);
|
||||
|
||||
SekScan(nAction); // scan 68000 states
|
||||
VezScan(nAction);
|
||||
|
||||
BurnYM2151Scan(nAction, pnMin);
|
||||
MSM6295Scan(nAction, pnMin);
|
||||
|
||||
ToaScanGP9001(nAction, pnMin);
|
||||
|
||||
SCAN_VAR(v25_reset);
|
||||
SCAN_VAR(i7hk);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -318,7 +322,7 @@ static INT32 LoadRoms()
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT8 __fastcall dogyuunReadByte(UINT32 sekAddress)
|
||||
static UINT8 __fastcall dogyuunReadByte(UINT32 sekAddress)
|
||||
{
|
||||
if ((sekAddress & 0xff0000) == 0x210000) {
|
||||
return ShareRAM[(sekAddress / 2) & 0x7fff];
|
||||
@ -343,7 +347,7 @@ UINT8 __fastcall dogyuunReadByte(UINT32 sekAddress)
|
||||
|
||||
}
|
||||
|
||||
UINT16 __fastcall dogyuunReadWord(UINT32 sekAddress)
|
||||
static UINT16 __fastcall dogyuunReadWord(UINT32 sekAddress)
|
||||
{
|
||||
if ((sekAddress & 0xff0000) == 0x210000) {
|
||||
return ShareRAM[(sekAddress / 2) & 0x7fff];
|
||||
@ -372,12 +376,11 @@ UINT16 __fastcall dogyuunReadWord(UINT32 sekAddress)
|
||||
return ToaGP9001ReadRAM_Lo(1);
|
||||
|
||||
case 0x700000: {
|
||||
static INT32 i;
|
||||
UINT16 nStatus;
|
||||
|
||||
i++;
|
||||
nStatus = 0xFFFF - (i & 0xFF);
|
||||
if (i & 1) {
|
||||
i7hk++;
|
||||
nStatus = 0xFFFF - (i7hk & 0xFF);
|
||||
if (i7hk & 1) {
|
||||
nStatus &= 0x00FF;
|
||||
}
|
||||
return nStatus;
|
||||
@ -391,7 +394,7 @@ UINT16 __fastcall dogyuunReadWord(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __fastcall dogyuunWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
static void __fastcall dogyuunWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
{
|
||||
if ((sekAddress & 0xff0000) == 0x210000) {
|
||||
ShareRAM[(sekAddress / 2) & 0x7fff] = byteValue;
|
||||
@ -411,7 +414,7 @@ void __fastcall dogyuunWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall dogyuunWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
static void __fastcall dogyuunWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
{
|
||||
if ((sekAddress & 0xff0000) == 0x210000) {
|
||||
ShareRAM[(sekAddress / 2) & 0x7fff] = wordValue;
|
||||
@ -463,7 +466,7 @@ void __fastcall dogyuunWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall dogyuun_v25_write(UINT32 address, UINT8 data)
|
||||
static void __fastcall dogyuun_v25_write(UINT32 address, UINT8 data)
|
||||
{
|
||||
switch (address)
|
||||
{
|
||||
@ -481,7 +484,7 @@ void __fastcall dogyuun_v25_write(UINT32 address, UINT8 data)
|
||||
}
|
||||
}
|
||||
|
||||
UINT8 __fastcall dogyuun_v25_read(UINT32 address)
|
||||
static UINT8 __fastcall dogyuun_v25_read(UINT32 address)
|
||||
{
|
||||
switch (address)
|
||||
{
|
||||
@ -495,7 +498,7 @@ UINT8 __fastcall dogyuun_v25_read(UINT32 address)
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT8 __fastcall dogyuun_v25_read_port(UINT32 port)
|
||||
static UINT8 __fastcall dogyuun_v25_read_port(UINT32 port)
|
||||
{
|
||||
switch (port)
|
||||
{
|
||||
@ -526,6 +529,7 @@ static INT32 DrvDoReset()
|
||||
MSM6295Reset(0);
|
||||
|
||||
v25_reset = 1;
|
||||
i7hk = 0;
|
||||
|
||||
HiscoreReset();
|
||||
|
||||
@ -621,8 +625,6 @@ static INT32 DrvInit()
|
||||
ToaPalSrc = RamPal;
|
||||
ToaPalInit();
|
||||
|
||||
bDrawScreen = true;
|
||||
|
||||
DrvDoReset(); // Reset machine
|
||||
return 0;
|
||||
}
|
||||
@ -649,21 +651,14 @@ static INT32 DrvDraw()
|
||||
{
|
||||
ToaClearScreen(0x120);
|
||||
|
||||
if (bDrawScreen) {
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
}
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
|
||||
ToaPalUpdate(); // Update the palette
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline static INT32 CheckSleep(INT32)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static INT32 DrvFrame()
|
||||
{
|
||||
INT32 nInterleave = 10;
|
||||
@ -698,7 +693,7 @@ static INT32 DrvFrame()
|
||||
SekSetCyclesScanline(nCyclesTotal[0] / 262);
|
||||
nToaCyclesDisplayStart = nCyclesTotal[0] - ((nCyclesTotal[0] * (TOA_VBLANK_LINES + 240)) / 262);
|
||||
nToaCyclesVBlankStart = nCyclesTotal[0] - ((nCyclesTotal[0] * TOA_VBLANK_LINES) / 262);
|
||||
bVBlank = false;
|
||||
bool bVBlank = false;
|
||||
|
||||
VezOpen(0);
|
||||
|
||||
@ -707,7 +702,6 @@ static INT32 DrvFrame()
|
||||
INT32 nNext;
|
||||
|
||||
// Run 68000
|
||||
|
||||
nCurrentCPU = 0;
|
||||
nNext = (i + 1) * nCyclesTotal[nCurrentCPU] / nInterleave;
|
||||
|
||||
@ -725,13 +719,9 @@ static INT32 DrvFrame()
|
||||
}
|
||||
|
||||
nCyclesSegment = nNext - nCyclesDone[nCurrentCPU];
|
||||
if (bVBlank || (!CheckSleep(nCurrentCPU))) { // See if this CPU is busywaiting
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
} else {
|
||||
nCyclesDone[nCurrentCPU] += SekIdle(nCyclesSegment);
|
||||
}
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
|
||||
// sound! (increase interleave?)
|
||||
// sound!
|
||||
if (v25_reset) {
|
||||
nCyclesDone[1] += nCyclesTotal[1] / nInterleave;
|
||||
} else {
|
||||
|
@ -15,8 +15,6 @@ static UINT8 *Ram01, *RamPal;
|
||||
static const INT32 nColCount = 0x0800;
|
||||
|
||||
static UINT8 DrvReset = 0;
|
||||
static UINT8 bDrawScreen;
|
||||
static bool bVBlank;
|
||||
|
||||
static INT32 bankaddress = 0;
|
||||
|
||||
@ -43,7 +41,7 @@ static struct BurnDIPInfo EnmadaioDIPList[] = {
|
||||
|
||||
STDDIPINFO(Enmadaio)
|
||||
|
||||
UINT8 __fastcall enmadaioReadByte(UINT32 sekAddress)
|
||||
static UINT8 __fastcall enmadaioReadByte(UINT32 sekAddress)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
|
||||
@ -93,7 +91,7 @@ UINT8 __fastcall enmadaioReadByte(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT16 __fastcall enmadaioReadWord(UINT32 sekAddress)
|
||||
static UINT16 __fastcall enmadaioReadWord(UINT32 sekAddress)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
|
||||
@ -145,7 +143,7 @@ static void oki_bankswitch(INT32 bank)
|
||||
MSM6295SetBank(0, MSM6295ROM + bankaddress * 0x20000, 0, 0x3ffff);
|
||||
}
|
||||
|
||||
void __fastcall enmadaioWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
static void __fastcall enmadaioWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
case 0x400001:
|
||||
@ -169,7 +167,7 @@ void __fastcall enmadaioWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall enmadaioWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
static void __fastcall enmadaioWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
case 0x200000: // Set GP9001 VRAM address-pointer
|
||||
@ -233,7 +231,6 @@ static INT32 DrvExit()
|
||||
|
||||
static INT32 DrvDoReset()
|
||||
{
|
||||
bprintf (0, _T("reset 0\n"));
|
||||
SekOpen(0);
|
||||
nIRQPending = 0;
|
||||
SekSetIRQLine(0, CPU_IRQSTATUS_NONE);
|
||||
@ -246,8 +243,6 @@ static INT32 DrvDoReset()
|
||||
|
||||
HiscoreReset();
|
||||
|
||||
bprintf (0, _T("reset 1\n"));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -255,21 +250,14 @@ static INT32 DrvDraw()
|
||||
{
|
||||
ToaClearScreen(0);
|
||||
|
||||
if (bDrawScreen) {
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
}
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
|
||||
ToaPalUpdate(); // Update the palette
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline static INT32 CheckSleep(INT32)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static INT32 DrvFrame()
|
||||
{
|
||||
INT32 nInterleave = 8;
|
||||
@ -300,7 +288,7 @@ static INT32 DrvFrame()
|
||||
SekSetCyclesScanline(nCyclesTotal[0] / 262);
|
||||
nToaCyclesDisplayStart = nCyclesTotal[0] - ((nCyclesTotal[0] * (TOA_VBLANK_LINES + 240)) / 262);
|
||||
nToaCyclesVBlankStart = nCyclesTotal[0] - ((nCyclesTotal[0] * TOA_VBLANK_LINES) / 262);
|
||||
bVBlank = false;
|
||||
bool bVBlank = false;
|
||||
|
||||
INT32 nSoundBufferPos = 0;
|
||||
|
||||
@ -317,11 +305,7 @@ static INT32 DrvFrame()
|
||||
if (!bVBlank && nNext > nToaCyclesVBlankStart) {
|
||||
if (nCyclesDone[nCurrentCPU] < nToaCyclesVBlankStart) {
|
||||
nCyclesSegment = nToaCyclesVBlankStart - nCyclesDone[nCurrentCPU];
|
||||
if (!CheckSleep(nCurrentCPU)) {
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
} else {
|
||||
nCyclesDone[nCurrentCPU] += SekIdle(nCyclesSegment);
|
||||
}
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
}
|
||||
|
||||
nIRQPending = 1;
|
||||
@ -333,12 +317,8 @@ static INT32 DrvFrame()
|
||||
}
|
||||
|
||||
nCyclesSegment = nNext - nCyclesDone[nCurrentCPU];
|
||||
if (bVBlank || (!CheckSleep(nCurrentCPU))) { // See if this CPU is busywaiting
|
||||
nIRQPending = 0;
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
} else {
|
||||
nCyclesDone[nCurrentCPU] += SekIdle(nCyclesSegment);
|
||||
}
|
||||
nIRQPending = 0;
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
|
||||
if ((i & 1) == 0) {
|
||||
// Render sound segment
|
||||
@ -519,8 +499,6 @@ static INT32 DrvInit()
|
||||
MSM6295Init(0, 4000000 / 132, 1);
|
||||
MSM6295SetRoute(0, 1.00, BURN_SND_ROUTE_BOTH);
|
||||
|
||||
bDrawScreen = true;
|
||||
|
||||
DrvDoReset(); // Reset machine
|
||||
|
||||
return 0;
|
||||
|
@ -19,43 +19,41 @@ static UINT8 *ShareRAM, *EEPROM;
|
||||
static const INT32 nColCount = 0x0800;
|
||||
|
||||
static UINT8 DrvReset = 0;
|
||||
static UINT8 bDrawScreen;
|
||||
static bool bVBlank;
|
||||
|
||||
static INT32 v25_reset = 0;
|
||||
static INT32 set_region = 0;
|
||||
|
||||
static struct BurnInputInfo FixeightInputList[] = {
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin" },
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin" },
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start" },
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up" },
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down" },
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left" },
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up" },
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down" },
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left" },
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right" },
|
||||
{"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1" },
|
||||
{"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2" },
|
||||
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin" },
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin" },
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start" },
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up" },
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down" },
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left" },
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up" },
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down" },
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left" },
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right" },
|
||||
{"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1" },
|
||||
{"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2" },
|
||||
|
||||
{"P3 Coin", BIT_DIGITAL, DrvButton + 0, "p3 coin" },
|
||||
{"P3 Coin", BIT_DIGITAL, DrvButton + 0, "p3 coin" },
|
||||
{"P3 Start", BIT_DIGITAL, DrvJoy3 + 6, "p3 start" },
|
||||
{"P3 Up", BIT_DIGITAL, DrvJoy3 + 0, "p3 up" },
|
||||
{"P3 Down", BIT_DIGITAL, DrvJoy3 + 1, "p3 down" },
|
||||
{"P3 Left", BIT_DIGITAL, DrvJoy3 + 2, "p3 left" },
|
||||
{"P3 Up", BIT_DIGITAL, DrvJoy3 + 0, "p3 up" },
|
||||
{"P3 Down", BIT_DIGITAL, DrvJoy3 + 1, "p3 down" },
|
||||
{"P3 Left", BIT_DIGITAL, DrvJoy3 + 2, "p3 left" },
|
||||
{"P3 Right", BIT_DIGITAL, DrvJoy3 + 3, "p3 right" },
|
||||
{"P3 Button 1", BIT_DIGITAL, DrvJoy3 + 4, "p3 fire 1" },
|
||||
{"P3 Button 2", BIT_DIGITAL, DrvJoy3 + 5, "p3 fire 2" },
|
||||
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset" },
|
||||
{"Tilt", BIT_DIGITAL, DrvButton + 1, "tilt" },
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 4, "dip" },
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset" },
|
||||
{"Tilt", BIT_DIGITAL, DrvButton + 1, "tilt" },
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 4, "dip" },
|
||||
};
|
||||
|
||||
STDINPUTINFO(Fixeight)
|
||||
@ -71,7 +69,7 @@ static struct BurnDIPInfo FixeightDIPList[]=
|
||||
|
||||
STDDIPINFO(Fixeight)
|
||||
|
||||
UINT8 __fastcall fixeightReadByte(UINT32 sekAddress)
|
||||
static UINT8 __fastcall fixeightReadByte(UINT32 sekAddress)
|
||||
{
|
||||
if ((sekAddress & 0xff0000) == 0x280000) {
|
||||
return ShareRAM[(sekAddress >> 1) & 0x7fff];
|
||||
@ -101,7 +99,7 @@ UINT8 __fastcall fixeightReadByte(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT16 __fastcall fixeightReadWord(UINT32 sekAddress)
|
||||
static UINT16 __fastcall fixeightReadWord(UINT32 sekAddress)
|
||||
{
|
||||
if ((sekAddress & 0xff0000) == 0x280000) {
|
||||
return ShareRAM[(sekAddress >> 1) & 0x7fff];
|
||||
@ -139,7 +137,7 @@ UINT16 __fastcall fixeightReadWord(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __fastcall fixeightWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
static void __fastcall fixeightWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
{
|
||||
if ((sekAddress & 0xff0000) == 0x280000) {
|
||||
ShareRAM[(sekAddress >> 1) & 0x7fff] = byteValue;
|
||||
@ -169,7 +167,7 @@ void __fastcall fixeightWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall fixeightWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
static void __fastcall fixeightWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
{
|
||||
if ((sekAddress & 0xff0000) == 0x280000) {
|
||||
ShareRAM[(sekAddress >> 1) & 0x7fff] = wordValue;
|
||||
@ -210,7 +208,7 @@ void __fastcall fixeightWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall fixeight_v25_write(UINT32 address, UINT8 data)
|
||||
static void __fastcall fixeight_v25_write(UINT32 address, UINT8 data)
|
||||
{
|
||||
switch (address)
|
||||
{
|
||||
@ -228,7 +226,7 @@ void __fastcall fixeight_v25_write(UINT32 address, UINT8 data)
|
||||
}
|
||||
}
|
||||
|
||||
UINT8 __fastcall fixeight_v25_read(UINT32 address)
|
||||
static UINT8 __fastcall fixeight_v25_read(UINT32 address)
|
||||
{
|
||||
switch (address)
|
||||
{
|
||||
@ -245,7 +243,7 @@ UINT8 __fastcall fixeight_v25_read(UINT32 address)
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT8 __fastcall fixeight_v25_read_port(UINT32 port)
|
||||
static UINT8 __fastcall fixeight_v25_read_port(UINT32 port)
|
||||
{
|
||||
switch (port)
|
||||
{
|
||||
@ -256,7 +254,7 @@ UINT8 __fastcall fixeight_v25_read_port(UINT32 port)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __fastcall fixeight_v25_write_port(UINT32 port, UINT8 data)
|
||||
static void __fastcall fixeight_v25_write_port(UINT32 port, UINT8 data)
|
||||
{
|
||||
switch (port)
|
||||
{
|
||||
@ -314,22 +312,15 @@ static INT32 DrvDraw()
|
||||
{
|
||||
ToaClearScreen(0);
|
||||
|
||||
if (bDrawScreen) {
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
ToaExtraTextLayer(); // Render extra text layer
|
||||
}
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
ToaExtraTextLayer(); // Render extra text layer
|
||||
|
||||
ToaPalUpdate(); // Update the palette
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline static INT32 CheckSleep(INT32)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static INT32 DrvFrame()
|
||||
{
|
||||
INT32 nInterleave = 100;
|
||||
@ -366,7 +357,7 @@ static INT32 DrvFrame()
|
||||
SekSetCyclesScanline(nCyclesTotal[0] / 262);
|
||||
nToaCyclesDisplayStart = nCyclesTotal[0] - ((nCyclesTotal[0] * (TOA_VBLANK_LINES + 240)) / 262);
|
||||
nToaCyclesVBlankStart = nCyclesTotal[0] - ((nCyclesTotal[0] * TOA_VBLANK_LINES) / 262);
|
||||
bVBlank = false;
|
||||
bool bVBlank = false;
|
||||
|
||||
VezOpen(0);
|
||||
|
||||
@ -382,11 +373,7 @@ static INT32 DrvFrame()
|
||||
if (!bVBlank && nNext > nToaCyclesVBlankStart) {
|
||||
if (nCyclesDone[nCurrentCPU] < nToaCyclesVBlankStart) {
|
||||
nCyclesSegment = nToaCyclesVBlankStart - nCyclesDone[nCurrentCPU];
|
||||
if (!CheckSleep(nCurrentCPU)) {
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
} else {
|
||||
nCyclesDone[nCurrentCPU] += SekIdle(nCyclesSegment);
|
||||
}
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
}
|
||||
|
||||
SekSetIRQLine(4, CPU_IRQSTATUS_AUTO);
|
||||
@ -397,13 +384,9 @@ static INT32 DrvFrame()
|
||||
}
|
||||
|
||||
nCyclesSegment = nNext - nCyclesDone[nCurrentCPU];
|
||||
if (bVBlank || (!CheckSleep(nCurrentCPU))) { // See if this CPU is busywaiting
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
} else {
|
||||
nCyclesDone[nCurrentCPU] += SekIdle(nCyclesSegment);
|
||||
}
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
|
||||
// sound! (increase interleave?)
|
||||
// sound!
|
||||
if (v25_reset) {
|
||||
nCyclesDone[1] += nCyclesTotal[1] / nInterleave;
|
||||
} else {
|
||||
@ -443,23 +426,23 @@ static INT32 DrvFrame()
|
||||
static INT32 MemIndex()
|
||||
{
|
||||
UINT8 *Next; Next = Mem;
|
||||
Rom01 = Next; Next += 0x080000; //
|
||||
Rom01 = Next; Next += 0x080000; //
|
||||
GP9001ROM[0] = Next; Next += nGP9001ROMSize[0]; // GP9001 tile data
|
||||
MSM6295ROM = Next; Next += 0x040000;
|
||||
EEPROM = Next; Next += 0x000080;
|
||||
RamStart = Next;
|
||||
Ram01 = Next; Next += 0x004000; // CPU #0 work RAM
|
||||
ExtraTROM = Next; Next += 0x010000; // Extra tile layer
|
||||
ExtraTRAM = Next; Next += 0x002000; // Extra tile layer
|
||||
ShareRAM = Next; Next += 0x010000;
|
||||
MSM6295ROM = Next; Next += 0x040000;
|
||||
EEPROM = Next; Next += 0x000080;
|
||||
RamStart = Next;
|
||||
Ram01 = Next; Next += 0x004000; // CPU #0 work RAM
|
||||
ExtraTROM = Next; Next += 0x010000; // Extra tile layer
|
||||
ExtraTRAM = Next; Next += 0x002000; // Extra tile layer
|
||||
ShareRAM = Next; Next += 0x010000;
|
||||
ExtraTScroll = Next; Next += 0x001000; //
|
||||
ExtraTSelect = Next; Next += 0x001000; //
|
||||
RamPal = Next; Next += 0x001000; // palette
|
||||
RamPal = Next; Next += 0x001000; // palette
|
||||
GP9001RAM[0] = Next; Next += 0x004000;
|
||||
GP9001Reg[0] = (UINT16*)Next; Next += 0x0100 * sizeof(UINT16);
|
||||
RamEnd = Next;
|
||||
ToaPalette = (UINT32 *)Next; Next += nColCount * sizeof(UINT32);
|
||||
MemEnd = Next;
|
||||
RamEnd = Next;
|
||||
ToaPalette = (UINT32 *)Next; Next += nColCount * sizeof(UINT32);
|
||||
MemEnd = Next;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -492,12 +475,12 @@ static INT32 DrvScan(INT32 nAction, INT32* pnMin)
|
||||
struct BurnArea ba;
|
||||
|
||||
memset(&ba, 0, sizeof(ba));
|
||||
ba.Data = RamStart;
|
||||
ba.Data = RamStart;
|
||||
ba.nLen = RamEnd - RamStart;
|
||||
ba.szName = "RAM";
|
||||
BurnAcb(&ba);
|
||||
|
||||
ba.Data = ShareRAM;
|
||||
ba.Data = ShareRAM;
|
||||
ba.nLen = 0x8000;
|
||||
ba.szName = "Shared RAM";
|
||||
BurnAcb(&ba);
|
||||
@ -510,12 +493,9 @@ static INT32 DrvScan(INT32 nAction, INT32* pnMin)
|
||||
MSM6295Scan(nAction, pnMin);
|
||||
BurnYM2151Scan(nAction, pnMin);
|
||||
|
||||
ToaScanGP9001(nAction, pnMin);
|
||||
ToaScanGP9001(nAction, pnMin);
|
||||
|
||||
SCAN_VAR(v25_reset); // level 2.5 savestate hung on load,
|
||||
SCAN_VAR(set_region); // hoping this might fix it.. -dink
|
||||
|
||||
bDrawScreen = true;
|
||||
SCAN_VAR(v25_reset); // level 2.5 savestate hung on load, hoping this might fix it.. -dink
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -617,8 +597,6 @@ static INT32 DrvInit(INT32 region)
|
||||
MSM6295Init(0, 1000000 / 132, 1);
|
||||
MSM6295SetRoute(0, 0.50, BURN_SND_ROUTE_BOTH);
|
||||
|
||||
bDrawScreen = true;
|
||||
|
||||
DrvDoReset(); // Reset machine
|
||||
|
||||
return 0;
|
||||
|
@ -12,8 +12,6 @@ static UINT8 DrvJoy2[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
static UINT8 DrvInput[6] = {0, 0, 0, 0, 0, 0};
|
||||
|
||||
static UINT8 DrvReset = 0;
|
||||
static UINT8 bDrawScreen;
|
||||
static bool bVBlank;
|
||||
|
||||
static UINT8 *Mem = NULL, *MemEnd = NULL;
|
||||
static UINT8 *RamStart, *RamEnd;
|
||||
@ -29,30 +27,30 @@ static INT8 PaddleOld[2];
|
||||
static INT32 nColCount = 0x0800;
|
||||
|
||||
static struct BurnInputInfo GhoxInputList[] = {
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin"},
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start"},
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up"},
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down"},
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left"},
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right"},
|
||||
{"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1"},
|
||||
{"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2"},
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin" },
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start" },
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up" },
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down" },
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left" },
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right" },
|
||||
{"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1" },
|
||||
{"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2" },
|
||||
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin"},
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start"},
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up"},
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down"},
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left"},
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right"},
|
||||
{"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1"},
|
||||
{"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2"},
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin" },
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start" },
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up" },
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down" },
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left" },
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right" },
|
||||
{"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1" },
|
||||
{"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2" },
|
||||
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset"},
|
||||
{"Service", BIT_DIGITAL, DrvButton + 0, "service"},
|
||||
{"Tilt", BIT_DIGITAL, DrvButton + 1, "tilt"},
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 3, "dip"},
|
||||
{"Dip B", BIT_DIPSWITCH, DrvInput + 4, "dip"},
|
||||
{"Dip C", BIT_DIPSWITCH, DrvInput + 5, "dip"},
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset" },
|
||||
{"Service", BIT_DIGITAL, DrvButton + 0, "service" },
|
||||
{"Tilt", BIT_DIGITAL, DrvButton + 1, "tilt" },
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 3, "dip" },
|
||||
{"Dip B", BIT_DIPSWITCH, DrvInput + 4, "dip" },
|
||||
{"Dip C", BIT_DIPSWITCH, DrvInput + 5, "dip" },
|
||||
};
|
||||
|
||||
STDINPUTINFO(Ghox)
|
||||
@ -272,12 +270,14 @@ static INT32 DrvScan(INT32 nAction,INT32 *pnMin)
|
||||
BurnAcb(&ba);
|
||||
|
||||
SekScan(nAction); // scan 68000 states
|
||||
|
||||
Z180Scan(nAction);
|
||||
|
||||
BurnYM2151Scan(nAction, pnMin);
|
||||
|
||||
ToaScanGP9001(nAction, pnMin);
|
||||
|
||||
bDrawScreen = true; // get background back ?
|
||||
SCAN_VAR(Paddle);
|
||||
SCAN_VAR(PaddleOld);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -296,7 +296,7 @@ static INT32 LoadRoms()
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT8 PaddleRead(UINT8 Num)
|
||||
static UINT8 PaddleRead(UINT8 Num)
|
||||
{
|
||||
INT8 Value;
|
||||
|
||||
@ -307,7 +307,7 @@ UINT8 PaddleRead(UINT8 Num)
|
||||
return Value;
|
||||
}
|
||||
|
||||
UINT8 __fastcall ghoxReadByte(UINT32 sekAddress)
|
||||
static UINT8 __fastcall ghoxReadByte(UINT32 sekAddress)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
case 0x18100d: // Dipswitch 3 - Territory
|
||||
@ -334,7 +334,7 @@ UINT8 __fastcall ghoxReadByte(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT16 __fastcall ghoxReadWord(UINT32 sekAddress)
|
||||
static UINT16 __fastcall ghoxReadWord(UINT32 sekAddress)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
case 0x140004:
|
||||
@ -361,7 +361,7 @@ UINT16 __fastcall ghoxReadWord(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __fastcall ghoxWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
static void __fastcall ghoxWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
case 0x181001: {
|
||||
@ -385,7 +385,7 @@ void __fastcall ghoxWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
// bprintf(PRINT_NORMAL, _T("Write Byte %x, %x\n"), sekAddress, byteValue);
|
||||
}
|
||||
|
||||
void __fastcall ghoxWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
static void __fastcall ghoxWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
case 0x140000: // Set GP9001 VRAM address-pointer
|
||||
@ -557,9 +557,8 @@ static INT32 DrvInit()
|
||||
BurnYM2151Init(27000000 / 8);
|
||||
BurnYM2151SetAllRoutes(0.50, BURN_SND_ROUTE_BOTH);
|
||||
|
||||
bDrawScreen = true;
|
||||
|
||||
DrvDoReset(); // Reset machine
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -583,10 +582,8 @@ static INT32 DrvDraw()
|
||||
{
|
||||
ToaClearScreen(0);
|
||||
|
||||
if (bDrawScreen) {
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
}
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
|
||||
ToaPalUpdate(); // Update the palette
|
||||
|
||||
@ -631,7 +628,7 @@ static INT32 DrvFrame()
|
||||
SekSetCyclesScanline(nCyclesTotal[0] / 262);
|
||||
nToaCyclesDisplayStart = nCyclesTotal[0] - ((nCyclesTotal[0] * (TOA_VBLANK_LINES + 240)) / 262);
|
||||
nToaCyclesVBlankStart = nCyclesTotal[0] - ((nCyclesTotal[0] * TOA_VBLANK_LINES) / 262);
|
||||
bVBlank = false;
|
||||
bool bVBlank = false;
|
||||
|
||||
for (INT32 i = 0; i < nInterleave; i++) {
|
||||
INT32 nNext;
|
||||
|
@ -11,8 +11,6 @@ static UINT8 DrvJoy2[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
static UINT8 DrvInput[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
static UINT8 DrvReset = 0;
|
||||
static UINT8 bDrawScreen;
|
||||
static bool bVBlank;
|
||||
|
||||
// Rom information
|
||||
static struct BurnRomInfo drvRomDesc[] = {
|
||||
@ -286,7 +284,7 @@ static INT32 LoadRoms()
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT8 __fastcall kbashReadByte(UINT32 sekAddress)
|
||||
static UINT8 __fastcall kbashReadByte(UINT32 sekAddress)
|
||||
{
|
||||
if ((sekAddress & 0xfff000) == 0x200000) {
|
||||
return ShareRAM[(sekAddress / 2) & 0x07ff];
|
||||
@ -310,7 +308,7 @@ UINT8 __fastcall kbashReadByte(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT16 __fastcall kbashReadWord(UINT32 sekAddress)
|
||||
static UINT16 __fastcall kbashReadWord(UINT32 sekAddress)
|
||||
{
|
||||
if ((sekAddress & 0xfff000) == 0x200000) {
|
||||
return ShareRAM[(sekAddress / 2) & 0x07ff];
|
||||
@ -343,7 +341,7 @@ UINT16 __fastcall kbashReadWord(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __fastcall kbashWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
static void __fastcall kbashWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
{
|
||||
if ((sekAddress & 0xfff000) == 0x200000) {
|
||||
ShareRAM[(sekAddress / 2) & 0x07ff] = byteValue;
|
||||
@ -361,7 +359,7 @@ void __fastcall kbashWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall kbashWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
static void __fastcall kbashWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
{
|
||||
if ((sekAddress & 0xfff000) == 0x200000) {
|
||||
ShareRAM[(sekAddress / 2) & 0x07ff] = wordValue;
|
||||
@ -394,7 +392,7 @@ void __fastcall kbashWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall kbash_v25_write(UINT32 address, UINT8 data)
|
||||
static void __fastcall kbash_v25_write(UINT32 address, UINT8 data)
|
||||
{
|
||||
switch (address)
|
||||
{
|
||||
@ -412,7 +410,7 @@ void __fastcall kbash_v25_write(UINT32 address, UINT8 data)
|
||||
}
|
||||
}
|
||||
|
||||
UINT8 __fastcall kbash_v25_read(UINT32 address)
|
||||
static UINT8 __fastcall kbash_v25_read(UINT32 address)
|
||||
{
|
||||
switch (address)
|
||||
{
|
||||
@ -426,7 +424,7 @@ UINT8 __fastcall kbash_v25_read(UINT32 address)
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT8 __fastcall kbash_v25_read_port(UINT32 port)
|
||||
static UINT8 __fastcall kbash_v25_read_port(UINT32 port)
|
||||
{
|
||||
switch (port)
|
||||
{
|
||||
@ -549,8 +547,6 @@ static INT32 DrvInit()
|
||||
ToaPalSrc = RamPal;
|
||||
ToaPalInit();
|
||||
|
||||
bDrawScreen = true;
|
||||
|
||||
DrvDoReset(); // Reset machine
|
||||
return 0;
|
||||
}
|
||||
@ -577,21 +573,14 @@ static INT32 DrvDraw()
|
||||
{
|
||||
ToaClearScreen(0x120);
|
||||
|
||||
if (bDrawScreen) {
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
}
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
|
||||
ToaPalUpdate(); // Update the palette
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline static INT32 CheckSleep(INT32)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static INT32 DrvFrame()
|
||||
{
|
||||
INT32 nInterleave = 10;
|
||||
@ -626,7 +615,7 @@ static INT32 DrvFrame()
|
||||
SekSetCyclesScanline(nCyclesTotal[0] / 262);
|
||||
nToaCyclesDisplayStart = nCyclesTotal[0] - ((nCyclesTotal[0] * (TOA_VBLANK_LINES + 240)) / 262);
|
||||
nToaCyclesVBlankStart = nCyclesTotal[0] - ((nCyclesTotal[0] * TOA_VBLANK_LINES) / 262);
|
||||
bVBlank = false;
|
||||
bool bVBlank = false;
|
||||
|
||||
VezOpen(0);
|
||||
|
||||
@ -638,7 +627,6 @@ static INT32 DrvFrame()
|
||||
nCurrentCPU = 0;
|
||||
nNext = (i + 1) * nCyclesTotal[nCurrentCPU] / nInterleave;
|
||||
|
||||
|
||||
// Trigger VBlank interrupt
|
||||
if (!bVBlank && nNext > nToaCyclesVBlankStart) {
|
||||
if (nCyclesDone[nCurrentCPU] < nToaCyclesVBlankStart) {
|
||||
@ -655,11 +643,7 @@ static INT32 DrvFrame()
|
||||
}
|
||||
|
||||
nCyclesSegment = nNext - nCyclesDone[nCurrentCPU];
|
||||
if (bVBlank || (!CheckSleep(nCurrentCPU))) { // See if this CPU is busywaiting
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
} else {
|
||||
nCyclesDone[nCurrentCPU] += SekIdle(nCyclesSegment);
|
||||
}
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
|
||||
nCyclesDone[1] += VezRun(nCyclesTotal[1] / nInterleave);
|
||||
|
||||
|
@ -10,8 +10,6 @@ static UINT8 DrvJoy2[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
static UINT8 DrvInput[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
static UINT8 DrvReset = 0;
|
||||
static UINT8 bDrawScreen;
|
||||
static bool bVBlank;
|
||||
|
||||
static INT32 nPreviousOkiBank;
|
||||
|
||||
@ -424,8 +422,6 @@ static INT32 DrvInit()
|
||||
ToaPalSrc = RamPal;
|
||||
ToaPalInit();
|
||||
|
||||
bDrawScreen = true;
|
||||
|
||||
DrvDoReset(); // Reset machine
|
||||
return 0;
|
||||
}
|
||||
@ -448,21 +444,14 @@ static INT32 DrvDraw()
|
||||
{
|
||||
ToaClearScreen(0);
|
||||
|
||||
if (bDrawScreen) {
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
}
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
|
||||
ToaPalUpdate(); // Update the palette
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline static INT32 CheckSleep(INT32)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static INT32 DrvFrame()
|
||||
{
|
||||
INT32 nInterleave = 4;
|
||||
@ -493,7 +482,7 @@ static INT32 DrvFrame()
|
||||
SekSetCyclesScanline(nCyclesTotal[0] / 262);
|
||||
nToaCyclesDisplayStart = nCyclesTotal[0] - ((nCyclesTotal[0] * (TOA_VBLANK_LINES + 240)) / 262);
|
||||
nToaCyclesVBlankStart = nCyclesTotal[0] - ((nCyclesTotal[0] * TOA_VBLANK_LINES) / 262);
|
||||
bVBlank = false;
|
||||
bool bVBlank = false;
|
||||
|
||||
for (INT32 i = 0; i < nInterleave; i++) {
|
||||
INT32 nCurrentCPU;
|
||||
@ -503,7 +492,6 @@ static INT32 DrvFrame()
|
||||
nCurrentCPU = 0;
|
||||
nNext = (i + 1) * nCyclesTotal[nCurrentCPU] / nInterleave;
|
||||
|
||||
|
||||
// Trigger VBlank interrupt
|
||||
if (!bVBlank && nNext > nToaCyclesVBlankStart) {
|
||||
if (nCyclesDone[nCurrentCPU] < nToaCyclesVBlankStart) {
|
||||
@ -520,12 +508,7 @@ static INT32 DrvFrame()
|
||||
}
|
||||
|
||||
nCyclesSegment = nNext - nCyclesDone[nCurrentCPU];
|
||||
if (bVBlank || (!CheckSleep(nCurrentCPU))) { // See if this CPU is busywaiting
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
} else {
|
||||
nCyclesDone[nCurrentCPU] += SekIdle(nCyclesSegment);
|
||||
}
|
||||
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
}
|
||||
|
||||
if (pBurnSoundOut) {
|
||||
|
@ -10,8 +10,6 @@ static UINT8 DrvJoy2[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
static UINT8 DrvInput[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
static UINT8 DrvReset = 0;
|
||||
static UINT8 bDrawScreen;
|
||||
static bool bVBlank;
|
||||
|
||||
// Rom information
|
||||
static struct BurnRomInfo mahoudaiRomDesc[] = {
|
||||
@ -66,33 +64,33 @@ STD_ROM_PICK(sstrikerk)
|
||||
STD_ROM_FN(sstrikerk)
|
||||
|
||||
static struct BurnInputInfo mahoudaiInputList[] = {
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin"},
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start"},
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin" },
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start" },
|
||||
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up"},
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down"},
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left"},
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right"},
|
||||
{"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1"},
|
||||
{"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2"},
|
||||
{"P1 Button 3", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 3"},
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up" },
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down" },
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left" },
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right" },
|
||||
{"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1" },
|
||||
{"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2" },
|
||||
{"P1 Button 3", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 3" },
|
||||
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin"},
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start"},
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin" },
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start" },
|
||||
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up"},
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down"},
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left"},
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right"},
|
||||
{"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1"},
|
||||
{"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2"},
|
||||
{"P2 Button 3", BIT_DIGITAL, DrvJoy2 + 6, "p2 fire 3"},
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up" },
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down" },
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left" },
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right" },
|
||||
{"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1" },
|
||||
{"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2" },
|
||||
{"P2 Button 3", BIT_DIGITAL, DrvJoy2 + 6, "p2 fire 3" },
|
||||
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset"},
|
||||
{"Diagnostics", BIT_DIGITAL, DrvButton + 0, "diag"},
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 3, "dip"},
|
||||
{"Dip B", BIT_DIPSWITCH, DrvInput + 4, "dip"},
|
||||
{"Dip C", BIT_DIPSWITCH, DrvInput + 5, "dip"},
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset" },
|
||||
{"Diagnostics", BIT_DIGITAL, DrvButton + 0, "diag" },
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 3, "dip" },
|
||||
{"Dip B", BIT_DIPSWITCH, DrvInput + 4, "dip" },
|
||||
{"Dip C", BIT_DIPSWITCH, DrvInput + 5, "dip" },
|
||||
};
|
||||
|
||||
STDINPUTINFO(mahoudai)
|
||||
@ -340,7 +338,7 @@ static INT32 DrvZ80Init()
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT8 __fastcall mahoudaiReadByte(UINT32 sekAddress)
|
||||
static UINT8 __fastcall mahoudaiReadByte(UINT32 sekAddress)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
case 0x21C021: // Player 1 inputs
|
||||
@ -370,7 +368,7 @@ UINT8 __fastcall mahoudaiReadByte(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT16 __fastcall mahoudaiReadWord(UINT32 sekAddress)
|
||||
static UINT16 __fastcall mahoudaiReadWord(UINT32 sekAddress)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
|
||||
@ -409,7 +407,7 @@ UINT16 __fastcall mahoudaiReadWord(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __fastcall mahoudaiWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
static void __fastcall mahoudaiWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
{
|
||||
// switch (sekAddress) {
|
||||
|
||||
@ -423,7 +421,7 @@ void __fastcall mahoudaiWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
// }
|
||||
}
|
||||
|
||||
void __fastcall mahoudaiWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
static void __fastcall mahoudaiWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
|
||||
@ -536,8 +534,6 @@ static INT32 DrvInit()
|
||||
MSM6295Init(0, 32000000 / 32 / 132, 1);
|
||||
MSM6295SetRoute(0, 1.00, BURN_SND_ROUTE_BOTH);
|
||||
|
||||
bDrawScreen = true;
|
||||
|
||||
DrvDoReset(); // Reset machine
|
||||
return 0;
|
||||
}
|
||||
@ -563,22 +559,15 @@ static INT32 DrvDraw()
|
||||
{
|
||||
ToaClearScreen(0);
|
||||
|
||||
if (bDrawScreen) {
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
ToaExtraTextLayer(); // Render extra text layer
|
||||
}
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
ToaExtraTextLayer(); // Render extra text layer
|
||||
|
||||
ToaPalUpdate(); // Update the palette
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline static INT32 CheckSleep(INT32)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static INT32 DrvFrame()
|
||||
{
|
||||
INT32 nInterleave = 4;
|
||||
@ -610,7 +599,7 @@ static INT32 DrvFrame()
|
||||
SekSetCyclesScanline(nCyclesTotal[0] / 262);
|
||||
nToaCyclesDisplayStart = nCyclesTotal[0] - ((nCyclesTotal[0] * (TOA_VBLANK_LINES + 240)) / 262);
|
||||
nToaCyclesVBlankStart = nCyclesTotal[0] - ((nCyclesTotal[0] * TOA_VBLANK_LINES) / 262);
|
||||
bVBlank = false;
|
||||
bool bVBlank = false;
|
||||
|
||||
INT32 nSoundBufferPos = 0;
|
||||
|
||||
@ -638,11 +627,7 @@ static INT32 DrvFrame()
|
||||
}
|
||||
|
||||
nCyclesSegment = nNext - nCyclesDone[nCurrentCPU];
|
||||
if (bVBlank || (!CheckSleep(nCurrentCPU))) { // See if this CPU is busywaiting
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
} else {
|
||||
nCyclesDone[nCurrentCPU] += SekIdle(nCyclesSegment);
|
||||
}
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
|
||||
// Run Z80
|
||||
nCurrentCPU = 1;
|
||||
|
@ -11,34 +11,32 @@ static UINT8 DrvJoy2[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
static UINT8 DrvInput[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
static UINT8 DrvReset = 0;
|
||||
static UINT8 bDrawScreen;
|
||||
static bool bVBlank;
|
||||
|
||||
static struct BurnInputInfo PipibibsInputList[] = {
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin"},
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start"},
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up"},
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down"},
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left"},
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right"},
|
||||
{"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1"},
|
||||
{"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2"},
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin" },
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start" },
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up" },
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down" },
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left" },
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right" },
|
||||
{"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1" },
|
||||
{"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2" },
|
||||
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin"},
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start"},
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up"},
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down"},
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left"},
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right"},
|
||||
{"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1"},
|
||||
{"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2"},
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin" },
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start" },
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up" },
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down" },
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left" },
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right" },
|
||||
{"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1" },
|
||||
{"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2" },
|
||||
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset"},
|
||||
{"Service", BIT_DIGITAL, DrvButton + 0, "service"},
|
||||
{"Tilt", BIT_DIGITAL, DrvButton + 1, "tilt"},
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 3, "dip"},
|
||||
{"Dip B", BIT_DIPSWITCH, DrvInput + 4, "dip"},
|
||||
{"Dip C", BIT_DIPSWITCH, DrvInput + 5, "dip"},
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset" },
|
||||
{"Service", BIT_DIGITAL, DrvButton + 0, "service" },
|
||||
{"Tilt", BIT_DIGITAL, DrvButton + 1, "tilt" },
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 3, "dip" },
|
||||
{"Dip B", BIT_DIPSWITCH, DrvInput + 4, "dip" },
|
||||
{"Dip C", BIT_DIPSWITCH, DrvInput + 5, "dip" },
|
||||
};
|
||||
|
||||
STDINPUTINFO(Pipibibs)
|
||||
@ -197,7 +195,7 @@ static INT32 LoadRoms()
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT8 __fastcall pipibibsReadByte(UINT32 sekAddress)
|
||||
static UINT8 __fastcall pipibibsReadByte(UINT32 sekAddress)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
case 0x19c031: // Player 1 inputs
|
||||
@ -224,7 +222,7 @@ UINT8 __fastcall pipibibsReadByte(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT16 __fastcall pipibibsReadWord(UINT32 sekAddress)
|
||||
static UINT16 __fastcall pipibibsReadWord(UINT32 sekAddress)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
case 0x19c030: // Player 1 inputs
|
||||
@ -256,7 +254,7 @@ UINT16 __fastcall pipibibsReadWord(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __fastcall pipibibsWriteByte(UINT32 /*sekAddress*/, UINT8 /*byteValue*/)
|
||||
static void __fastcall pipibibsWriteByte(UINT32 /*sekAddress*/, UINT8 /*byteValue*/)
|
||||
{
|
||||
// switch (sekAddress) {
|
||||
// default:
|
||||
@ -264,7 +262,7 @@ void __fastcall pipibibsWriteByte(UINT32 /*sekAddress*/, UINT8 /*byteValue*/)
|
||||
// }
|
||||
}
|
||||
|
||||
void __fastcall pipibibsWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
static void __fastcall pipibibsWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
|
||||
@ -292,7 +290,7 @@ void __fastcall pipibibsWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall pipibibs_sound_write(UINT16 address, UINT8 data)
|
||||
static void __fastcall pipibibs_sound_write(UINT16 address, UINT8 data)
|
||||
{
|
||||
switch (address)
|
||||
{
|
||||
@ -306,7 +304,7 @@ void __fastcall pipibibs_sound_write(UINT16 address, UINT8 data)
|
||||
}
|
||||
}
|
||||
|
||||
UINT8 __fastcall pipibibs_sound_read(UINT16 address)
|
||||
static UINT8 __fastcall pipibibs_sound_read(UINT16 address)
|
||||
{
|
||||
switch (address)
|
||||
{
|
||||
@ -331,9 +329,8 @@ static INT32 DrvDoReset()
|
||||
|
||||
ZetOpen(0);
|
||||
ZetReset();
|
||||
ZetClose();
|
||||
|
||||
BurnYM3812Reset();
|
||||
ZetClose();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -412,8 +409,6 @@ static INT32 DrvInit()
|
||||
ToaPalSrc = RamPal;
|
||||
ToaPalInit();
|
||||
|
||||
bDrawScreen = true;
|
||||
|
||||
DrvDoReset(); // Reset machine
|
||||
return 0;
|
||||
}
|
||||
@ -436,21 +431,14 @@ static INT32 DrvDraw()
|
||||
{
|
||||
ToaClearScreen(0);
|
||||
|
||||
if (bDrawScreen) {
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
}
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
|
||||
ToaPalUpdate(); // Update the palette
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline static INT32 CheckSleep(INT32)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static INT32 DrvFrame()
|
||||
{
|
||||
INT32 nInterleave = 4;
|
||||
@ -483,7 +471,7 @@ static INT32 DrvFrame()
|
||||
SekSetCyclesScanline(nCyclesTotal[0] / 262);
|
||||
nToaCyclesDisplayStart = nCyclesTotal[0] - ((nCyclesTotal[0] * (TOA_VBLANK_LINES + 240)) / 262);
|
||||
nToaCyclesVBlankStart = nCyclesTotal[0] - ((nCyclesTotal[0] * TOA_VBLANK_LINES) / 262);
|
||||
bVBlank = false;
|
||||
bool bVBlank = false;
|
||||
|
||||
for (INT32 i = 0; i < nInterleave; i++) {
|
||||
INT32 nNext;
|
||||
@ -509,12 +497,8 @@ static INT32 DrvFrame()
|
||||
}
|
||||
|
||||
nCyclesSegment = nNext - SekTotalCycles();
|
||||
if (bVBlank || (!CheckSleep(0))) {
|
||||
SekRun(nCyclesSegment);
|
||||
} else {
|
||||
SekIdle(nCyclesSegment);
|
||||
}
|
||||
|
||||
SekRun(nCyclesSegment);
|
||||
|
||||
BurnTimerUpdateYM3812(i * (nCyclesTotal[1] / nInterleave));
|
||||
}
|
||||
|
||||
|
@ -10,8 +10,6 @@ static UINT8 DrvJoy2[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
static UINT8 DrvInput[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
static UINT8 DrvReset = 0;
|
||||
static UINT8 bDrawScreen;
|
||||
static bool bVBlank;
|
||||
|
||||
// Rom information
|
||||
static struct BurnRomInfo shippumdRomDesc[] = {
|
||||
@ -51,33 +49,33 @@ STD_ROM_PICK(kingdmgp)
|
||||
STD_ROM_FN(kingdmgp)
|
||||
|
||||
static struct BurnInputInfo shippumdInputList[] = {
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin"},
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start"},
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin" },
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start" },
|
||||
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up"},
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down"},
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left"},
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right"},
|
||||
{"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1"},
|
||||
{"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2"},
|
||||
{"P1 Button 3", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 3"},
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up" },
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down" },
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left" },
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right" },
|
||||
{"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1" },
|
||||
{"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2" },
|
||||
{"P1 Button 3", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 3" },
|
||||
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin"},
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start"},
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin" },
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start" },
|
||||
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up"},
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down"},
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left"},
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right"},
|
||||
{"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1"},
|
||||
{"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2"},
|
||||
{"P2 Button 3", BIT_DIGITAL, DrvJoy2 + 6, "p2 fire 3"},
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up" },
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down" },
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left" },
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right" },
|
||||
{"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1" },
|
||||
{"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2" },
|
||||
{"P2 Button 3", BIT_DIGITAL, DrvJoy2 + 6, "p2 fire 3" },
|
||||
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset"},
|
||||
{"Diagnostics", BIT_DIGITAL, DrvButton + 0, "diag"},
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 3, "dip"},
|
||||
{"Dip B", BIT_DIPSWITCH, DrvInput + 4, "dip"},
|
||||
{"Dip C", BIT_DIPSWITCH, DrvInput + 5, "dip"},
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset" },
|
||||
{"Diagnostics", BIT_DIGITAL, DrvButton + 0, "diag" },
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 3, "dip" },
|
||||
{"Dip B", BIT_DIPSWITCH, DrvInput + 4, "dip" },
|
||||
{"Dip C", BIT_DIPSWITCH, DrvInput + 5, "dip" },
|
||||
};
|
||||
|
||||
STDINPUTINFO(shippumd)
|
||||
@ -255,7 +253,7 @@ static INT32 LoadRoms()
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT8 __fastcall shippumdZ80Read(UINT16 nAddress)
|
||||
static UINT8 __fastcall shippumdZ80Read(UINT16 nAddress)
|
||||
{
|
||||
if (nAddress == 0xE001) {
|
||||
return BurnYM2151Read();
|
||||
@ -266,7 +264,7 @@ UINT8 __fastcall shippumdZ80Read(UINT16 nAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __fastcall shippumdZ80Write(UINT16 nAddress, UINT8 nValue)
|
||||
static void __fastcall shippumdZ80Write(UINT16 nAddress, UINT8 nValue)
|
||||
{
|
||||
switch (nAddress) {
|
||||
case 0xE000:
|
||||
@ -306,7 +304,7 @@ static INT32 DrvZ80Init()
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT8 __fastcall shippumdReadByte(UINT32 sekAddress)
|
||||
static UINT8 __fastcall shippumdReadByte(UINT32 sekAddress)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
case 0x21C021: // Player 1 inputs
|
||||
@ -336,7 +334,7 @@ UINT8 __fastcall shippumdReadByte(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT16 __fastcall shippumdReadWord(UINT32 sekAddress)
|
||||
static UINT16 __fastcall shippumdReadWord(UINT32 sekAddress)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
|
||||
@ -375,7 +373,7 @@ UINT16 __fastcall shippumdReadWord(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __fastcall shippumdWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
static void __fastcall shippumdWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
case 0x21C01D: {
|
||||
@ -393,7 +391,7 @@ void __fastcall shippumdWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall shippumdWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
static void __fastcall shippumdWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
|
||||
@ -512,8 +510,6 @@ static INT32 DrvInit()
|
||||
MSM6295Init(0, 32000000 / 32 / 132, 1);
|
||||
MSM6295SetRoute(0, 1.00, BURN_SND_ROUTE_BOTH);
|
||||
|
||||
bDrawScreen = true;
|
||||
|
||||
DrvDoReset(); // Reset machine
|
||||
return 0;
|
||||
}
|
||||
@ -539,22 +535,15 @@ static INT32 DrvDraw()
|
||||
{
|
||||
ToaClearScreen(0);
|
||||
|
||||
if (bDrawScreen) {
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
ToaExtraTextLayer(); // Render extra text layer
|
||||
}
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
ToaExtraTextLayer(); // Render extra text layer
|
||||
|
||||
ToaPalUpdate(); // Update the palette
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline static INT32 CheckSleep(INT32)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static INT32 DrvFrame()
|
||||
{
|
||||
INT32 nInterleave = 4;
|
||||
@ -586,7 +575,7 @@ static INT32 DrvFrame()
|
||||
SekSetCyclesScanline(nCyclesTotal[0] / 262);
|
||||
nToaCyclesDisplayStart = nCyclesTotal[0] - ((nCyclesTotal[0] * (TOA_VBLANK_LINES + 240)) / 262);
|
||||
nToaCyclesVBlankStart = nCyclesTotal[0] - ((nCyclesTotal[0] * TOA_VBLANK_LINES) / 262);
|
||||
bVBlank = false;
|
||||
bool bVBlank = false;
|
||||
|
||||
INT32 nSoundBufferPos = 0;
|
||||
|
||||
@ -614,11 +603,7 @@ static INT32 DrvFrame()
|
||||
}
|
||||
|
||||
nCyclesSegment = nNext - nCyclesDone[nCurrentCPU];
|
||||
if (bVBlank || (!CheckSleep(nCurrentCPU))) { // See if this CPU is busywaiting
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
} else {
|
||||
nCyclesDone[nCurrentCPU] += SekIdle(nCyclesSegment);
|
||||
}
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
|
||||
// Run Z80
|
||||
nCurrentCPU = 1;
|
||||
|
@ -19,8 +19,6 @@ static UINT8 *Ram01, *RamPal;
|
||||
static INT32 nColCount = 0x0800;
|
||||
|
||||
static UINT8 DrvReset = 0;
|
||||
static UINT8 bDrawScreen;
|
||||
static bool bVBlank;
|
||||
|
||||
static struct BurnInputInfo snowbro2InputList[] = {
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin"},
|
||||
@ -177,7 +175,7 @@ static struct BurnDIPInfo snowbro2DIPList[] = {
|
||||
|
||||
STDDIPINFO(snowbro2)
|
||||
|
||||
UINT8 __fastcall snowbro2ReadByte(UINT32 sekAddress)
|
||||
static UINT8 __fastcall snowbro2ReadByte(UINT32 sekAddress)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
|
||||
@ -213,7 +211,7 @@ UINT8 __fastcall snowbro2ReadByte(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT16 __fastcall snowbro2ReadWord(UINT32 sekAddress)
|
||||
static UINT16 __fastcall snowbro2ReadWord(UINT32 sekAddress)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
|
||||
@ -252,7 +250,7 @@ UINT16 __fastcall snowbro2ReadWord(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __fastcall snowbro2WriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
static void __fastcall snowbro2WriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
case 0x600001:
|
||||
@ -272,7 +270,7 @@ void __fastcall snowbro2WriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall snowbro2WriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
static void __fastcall snowbro2WriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
case 0x300000: // Set GP9001 VRAM address-pointer
|
||||
@ -346,21 +344,14 @@ static INT32 DrvDraw()
|
||||
{
|
||||
ToaClearScreen(0);
|
||||
|
||||
if (bDrawScreen) {
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
}
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
|
||||
ToaPalUpdate(); // Update the palette
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline static INT32 CheckSleep(INT32)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static INT32 DrvFrame()
|
||||
{
|
||||
INT32 nInterleave = 4;
|
||||
@ -397,7 +388,7 @@ static INT32 DrvFrame()
|
||||
SekSetCyclesScanline(nCyclesTotal[0] / 262);
|
||||
nToaCyclesDisplayStart = nCyclesTotal[0] - ((nCyclesTotal[0] * (TOA_VBLANK_LINES + 240)) / 262);
|
||||
nToaCyclesVBlankStart = nCyclesTotal[0] - ((nCyclesTotal[0] * TOA_VBLANK_LINES) / 262);
|
||||
bVBlank = false;
|
||||
bool bVBlank = false;
|
||||
|
||||
INT32 nSoundBufferPos = 0;
|
||||
|
||||
@ -425,11 +416,7 @@ static INT32 DrvFrame()
|
||||
}
|
||||
|
||||
nCyclesSegment = nNext - nCyclesDone[nCurrentCPU];
|
||||
if (bVBlank || (!CheckSleep(nCurrentCPU))) { // See if this CPU is busywaiting
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
} else {
|
||||
nCyclesDone[nCurrentCPU] += SekIdle(nCyclesSegment);
|
||||
}
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
|
||||
{
|
||||
// Render sound segment
|
||||
@ -583,8 +570,6 @@ static INT32 DrvInit()
|
||||
MSM6295Init(0, 27000000 / 10 / 132, 1);
|
||||
MSM6295SetRoute(0, 1.00, BURN_SND_ROUTE_BOTH);
|
||||
|
||||
bDrawScreen = true;
|
||||
|
||||
DrvDoReset(); // Reset machine
|
||||
return 0;
|
||||
}
|
||||
|
@ -11,8 +11,6 @@ static UINT8 DrvJoy2[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
static UINT8 DrvInput[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
static UINT8 DrvReset = 0;
|
||||
static UINT8 bDrawScreen;
|
||||
static bool bVBlank;
|
||||
|
||||
static UINT8 to_mcu;
|
||||
static UINT8 z80cmdavailable;
|
||||
@ -64,33 +62,33 @@ STD_ROM_PICK(whoopee)
|
||||
STD_ROM_FN(whoopee)
|
||||
|
||||
static struct BurnInputInfo tekipakiInputList[] = {
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin"},
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start"},
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin" },
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start" },
|
||||
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up"},
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down"},
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left"},
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right"},
|
||||
{"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1"},
|
||||
{"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2"},
|
||||
{"P1 Button 3", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 3"},
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up" },
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down" },
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left" },
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right" },
|
||||
{"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1" },
|
||||
{"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2" },
|
||||
{"P1 Button 3", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 3" },
|
||||
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin"},
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start"},
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin" },
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start" },
|
||||
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up"},
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down"},
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left"},
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right"},
|
||||
{"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1"},
|
||||
{"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2"},
|
||||
{"P2 Button 3", BIT_DIGITAL, DrvJoy2 + 6, "p2 fire 3"},
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up" },
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down" },
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left" },
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right" },
|
||||
{"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1" },
|
||||
{"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2" },
|
||||
{"P2 Button 3", BIT_DIGITAL, DrvJoy2 + 6, "p2 fire 3" },
|
||||
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset"},
|
||||
{"Diagnostics", BIT_DIGITAL, DrvButton + 0, "diag"},
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 3, "dip"},
|
||||
{"Dip B", BIT_DIPSWITCH, DrvInput + 4, "dip"},
|
||||
{"Dip C", BIT_DIPSWITCH, DrvInput + 5, "dip"},
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset" },
|
||||
{"Diagnostics", BIT_DIGITAL, DrvButton + 0, "diag" },
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 3, "dip" },
|
||||
{"Dip B", BIT_DIPSWITCH, DrvInput + 4, "dip" },
|
||||
{"Dip C", BIT_DIPSWITCH, DrvInput + 5, "dip" },
|
||||
};
|
||||
|
||||
STDINPUTINFO(tekipaki)
|
||||
@ -485,7 +483,7 @@ static void __fastcall tekipakiZ80Out(UINT16 nAddress, UINT8 nValue)
|
||||
}
|
||||
}
|
||||
|
||||
INT32 tekipakiSynchroniseStream(INT32 nSoundRate)
|
||||
static INT32 tekipakiSynchroniseStream(INT32 nSoundRate)
|
||||
{
|
||||
return (INT64)ZetTotalCycles() * nSoundRate / 10000000;
|
||||
}
|
||||
@ -582,8 +580,6 @@ static INT32 DrvInit()
|
||||
BurnTimerAttachYM3812(&ZetConfig, 10000000);
|
||||
BurnYM3812SetRoute(0, BURN_SND_YM3812_ROUTE, 1.00, BURN_SND_ROUTE_BOTH);
|
||||
|
||||
bDrawScreen = true;
|
||||
|
||||
DrvDoReset(); // Reset machine
|
||||
return 0;
|
||||
}
|
||||
@ -615,21 +611,14 @@ static INT32 DrvDraw()
|
||||
{
|
||||
ToaClearScreen(0x120);
|
||||
|
||||
if (bDrawScreen) {
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
}
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
|
||||
ToaPalUpdate(); // Update the palette
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline static INT32 CheckSleep(INT32)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static INT32 DrvFrame()
|
||||
{
|
||||
INT32 nInterleave = 4;
|
||||
@ -664,7 +653,7 @@ static INT32 DrvFrame()
|
||||
SekSetCyclesScanline(nCyclesTotal[0] / 262);
|
||||
nToaCyclesDisplayStart = nCyclesTotal[0] - ((nCyclesTotal[0] * (TOA_VBLANK_LINES + 240)) / 262);
|
||||
nToaCyclesVBlankStart = nCyclesTotal[0] - ((nCyclesTotal[0] * TOA_VBLANK_LINES) / 262);
|
||||
bVBlank = false;
|
||||
bool bVBlank = false;
|
||||
|
||||
for (INT32 i = 0; i < nInterleave; i++) {
|
||||
INT32 nCurrentCPU;
|
||||
@ -690,11 +679,7 @@ static INT32 DrvFrame()
|
||||
}
|
||||
|
||||
nCyclesSegment = nNext - nCyclesDone[nCurrentCPU];
|
||||
if (bVBlank || (!CheckSleep(nCurrentCPU))) { // See if this CPU is busywaiting
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
} else {
|
||||
nCyclesDone[nCurrentCPU] += SekIdle(nCyclesSegment);
|
||||
}
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
|
||||
BurnTimerUpdateYM3812((i + 1) * (nCyclesTotal[1] / nInterleave));
|
||||
}
|
||||
@ -740,9 +725,6 @@ static INT32 DrvScan(INT32 nAction, INT32 *pnMin)
|
||||
|
||||
SCAN_VAR(to_mcu);
|
||||
SCAN_VAR(z80cmdavailable);
|
||||
|
||||
ToaRecalcPalette = 1;
|
||||
bDrawScreen = true; // get background back ?
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -17,39 +17,37 @@ static UINT8 *Ram01, *RamPal;
|
||||
static const INT32 nColCount = 0x0800;
|
||||
|
||||
static UINT8 DrvReset = 0;
|
||||
static UINT8 bDrawScreen;
|
||||
static bool bVBlank;
|
||||
|
||||
static UINT8 nIRQPending;
|
||||
|
||||
static struct BurnInputInfo truxton2InputList[] = {
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin"},
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start"},
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin" },
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start" },
|
||||
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up"},
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down"},
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left"},
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right"},
|
||||
{"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1"},
|
||||
{"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2"},
|
||||
{"P1 Button 3", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 3"},
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up" },
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down" },
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left" },
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right" },
|
||||
{"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1" },
|
||||
{"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2" },
|
||||
{"P1 Button 3", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 3" },
|
||||
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin"},
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start"},
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin" },
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start" },
|
||||
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up"},
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down"},
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left"},
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right"},
|
||||
{"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1"},
|
||||
{"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2"},
|
||||
{"P2 Button 3", BIT_DIGITAL, DrvJoy2 + 6, "p2 fire 3"},
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up" },
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down" },
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left" },
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right" },
|
||||
{"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1" },
|
||||
{"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2" },
|
||||
{"P2 Button 3", BIT_DIGITAL, DrvJoy2 + 6, "p2 fire 3" },
|
||||
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset"},
|
||||
{"Diagnostics", BIT_DIGITAL, DrvButton + 0, "diag"},
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 3, "dip"},
|
||||
{"Dip B", BIT_DIPSWITCH, DrvInput + 4, "dip"},
|
||||
{"Dip C", BIT_DIPSWITCH, DrvInput + 5, "dip"},
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset" },
|
||||
{"Diagnostics", BIT_DIGITAL, DrvButton + 0, "diag" },
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 3, "dip" },
|
||||
{"Dip B", BIT_DIPSWITCH, DrvInput + 4, "dip" },
|
||||
{"Dip C", BIT_DIPSWITCH, DrvInput + 5, "dip" },
|
||||
};
|
||||
|
||||
STDINPUTINFO(truxton2)
|
||||
@ -156,7 +154,7 @@ static struct BurnDIPInfo truxton2DIPList[] = {
|
||||
|
||||
STDDIPINFO(truxton2)
|
||||
|
||||
UINT8 __fastcall truxton2ReadByte(UINT32 sekAddress)
|
||||
static UINT8 __fastcall truxton2ReadByte(UINT32 sekAddress)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
|
||||
@ -189,7 +187,7 @@ UINT8 __fastcall truxton2ReadByte(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT16 __fastcall truxton2ReadWord(UINT32 sekAddress)
|
||||
static UINT16 __fastcall truxton2ReadWord(UINT32 sekAddress)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
|
||||
@ -233,7 +231,7 @@ UINT16 __fastcall truxton2ReadWord(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __fastcall truxton2WriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
static void __fastcall truxton2WriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
case 0x700011:
|
||||
@ -257,7 +255,7 @@ void __fastcall truxton2WriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall truxton2WriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
static void __fastcall truxton2WriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
{
|
||||
switch (sekAddress) {
|
||||
case 0x200000: // Set GP9001 VRAM address-pointer
|
||||
@ -334,22 +332,15 @@ static INT32 DrvDraw()
|
||||
{
|
||||
ToaClearScreen(0);
|
||||
|
||||
if (bDrawScreen) {
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
ToaExtraTextLayer(); // Render extra text layer
|
||||
}
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
ToaExtraTextLayer(); // Render extra text layer
|
||||
|
||||
ToaPalUpdate(); // Update the palette
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline static INT32 CheckSleep(INT32)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static INT32 DrvFrame()
|
||||
{
|
||||
INT32 nInterleave = 8;
|
||||
@ -380,7 +371,7 @@ static INT32 DrvFrame()
|
||||
SekSetCyclesScanline(nCyclesTotal[0] / 262);
|
||||
nToaCyclesDisplayStart = nCyclesTotal[0] - ((nCyclesTotal[0] * (TOA_VBLANK_LINES + 240)) / 262);
|
||||
nToaCyclesVBlankStart = nCyclesTotal[0] - ((nCyclesTotal[0] * TOA_VBLANK_LINES) / 262);
|
||||
bVBlank = false;
|
||||
bool bVBlank = false;
|
||||
|
||||
INT32 nSoundBufferPos = 0;
|
||||
|
||||
@ -397,11 +388,7 @@ static INT32 DrvFrame()
|
||||
if (!bVBlank && nNext > nToaCyclesVBlankStart) {
|
||||
if (nCyclesDone[nCurrentCPU] < nToaCyclesVBlankStart) {
|
||||
nCyclesSegment = nToaCyclesVBlankStart - nCyclesDone[nCurrentCPU];
|
||||
if (!CheckSleep(nCurrentCPU)) {
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
} else {
|
||||
nCyclesDone[nCurrentCPU] += SekIdle(nCyclesSegment);
|
||||
}
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
}
|
||||
|
||||
nIRQPending = 1;
|
||||
@ -413,12 +400,8 @@ static INT32 DrvFrame()
|
||||
}
|
||||
|
||||
nCyclesSegment = nNext - nCyclesDone[nCurrentCPU];
|
||||
if (bVBlank || (!CheckSleep(nCurrentCPU))) { // See if this CPU is busywaiting
|
||||
nIRQPending = 0;
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
} else {
|
||||
nCyclesDone[nCurrentCPU] += SekIdle(nCyclesSegment);
|
||||
}
|
||||
nIRQPending = 0;
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
|
||||
if ((i & 1) == 0) {
|
||||
// Render sound segment
|
||||
@ -514,7 +497,6 @@ static INT32 DrvScan(INT32 nAction, INT32* pnMin)
|
||||
|
||||
ToaScanGP9001(nAction, pnMin);
|
||||
|
||||
SCAN_VAR(DrvInput);
|
||||
SCAN_VAR(nIRQPending);
|
||||
}
|
||||
|
||||
@ -585,8 +567,6 @@ static INT32 DrvInit()
|
||||
MSM6295Init(0, 16000000 / 4 / MSM6295_PIN7_LOW, 1);
|
||||
MSM6295SetRoute(0, 1.00, BURN_SND_ROUTE_BOTH);
|
||||
|
||||
bDrawScreen = true;
|
||||
|
||||
DrvDoReset(); // Reset machine
|
||||
|
||||
return 0;
|
||||
|
@ -10,8 +10,6 @@ static UINT8 DrvJoy2[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
static UINT8 DrvInput[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
static UINT8 DrvReset = 0;
|
||||
static UINT8 bDrawScreen;
|
||||
static bool bVBlank;
|
||||
|
||||
static INT32 v25_reset = 0;
|
||||
|
||||
@ -50,33 +48,33 @@ STD_ROM_PICK(grindsta)
|
||||
STD_ROM_FN(grindsta)
|
||||
|
||||
static struct BurnInputInfo vfiveInputList[] = {
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin"},
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start"},
|
||||
{"P1 Coin", BIT_DIGITAL, DrvButton + 3, "p1 coin" },
|
||||
{"P1 Start", BIT_DIGITAL, DrvButton + 5, "p1 start" },
|
||||
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up"},
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down"},
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left"},
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right"},
|
||||
{"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1"},
|
||||
{"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2"},
|
||||
{"P1 Button 3", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 3"},
|
||||
{"P1 Up", BIT_DIGITAL, DrvJoy1 + 0, "p1 up" },
|
||||
{"P1 Down", BIT_DIGITAL, DrvJoy1 + 1, "p1 down" },
|
||||
{"P1 Left", BIT_DIGITAL, DrvJoy1 + 2, "p1 left" },
|
||||
{"P1 Right", BIT_DIGITAL, DrvJoy1 + 3, "p1 right" },
|
||||
{"P1 Button 1", BIT_DIGITAL, DrvJoy1 + 4, "p1 fire 1" },
|
||||
{"P1 Button 2", BIT_DIGITAL, DrvJoy1 + 5, "p1 fire 2" },
|
||||
{"P1 Button 3", BIT_DIGITAL, DrvJoy1 + 6, "p1 fire 3" },
|
||||
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin"},
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start"},
|
||||
{"P2 Coin", BIT_DIGITAL, DrvButton + 4, "p2 coin" },
|
||||
{"P2 Start", BIT_DIGITAL, DrvButton + 6, "p2 start" },
|
||||
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up"},
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down"},
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left"},
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right"},
|
||||
{"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1"},
|
||||
{"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2"},
|
||||
{"P2 Button 3", BIT_DIGITAL, DrvJoy2 + 6, "p2 fire 3"},
|
||||
{"P2 Up", BIT_DIGITAL, DrvJoy2 + 0, "p2 up" },
|
||||
{"P2 Down", BIT_DIGITAL, DrvJoy2 + 1, "p2 down" },
|
||||
{"P2 Left", BIT_DIGITAL, DrvJoy2 + 2, "p2 left" },
|
||||
{"P2 Right", BIT_DIGITAL, DrvJoy2 + 3, "p2 right" },
|
||||
{"P2 Button 1", BIT_DIGITAL, DrvJoy2 + 4, "p2 fire 1" },
|
||||
{"P2 Button 2", BIT_DIGITAL, DrvJoy2 + 5, "p2 fire 2" },
|
||||
{"P2 Button 3", BIT_DIGITAL, DrvJoy2 + 6, "p2 fire 3" },
|
||||
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset"},
|
||||
{"Diagnostics", BIT_DIGITAL, DrvButton + 0, "diag"},
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 3, "dip"},
|
||||
{"Dip B", BIT_DIPSWITCH, DrvInput + 4, "dip"},
|
||||
{"Dip C", BIT_DIPSWITCH, DrvInput + 5, "dip"},
|
||||
{"Reset", BIT_DIGITAL, &DrvReset, "reset" },
|
||||
{"Diagnostics", BIT_DIGITAL, DrvButton + 0, "diag" },
|
||||
{"Dip A", BIT_DIPSWITCH, DrvInput + 3, "dip" },
|
||||
{"Dip B", BIT_DIPSWITCH, DrvInput + 4, "dip" },
|
||||
{"Dip C", BIT_DIPSWITCH, DrvInput + 5, "dip" },
|
||||
};
|
||||
|
||||
STDINPUTINFO(vfive)
|
||||
@ -226,9 +224,10 @@ static INT32 DrvScan(INT32 nAction,INT32 *pnMin)
|
||||
if (pnMin) { // Return minimum compatible version
|
||||
*pnMin = 0x020997;
|
||||
}
|
||||
|
||||
if (nAction & ACB_VOLATILE) { // Scan volatile ram
|
||||
memset(&ba, 0, sizeof(ba));
|
||||
ba.Data = RamStart;
|
||||
ba.Data = RamStart;
|
||||
ba.nLen = RamEnd-RamStart;
|
||||
ba.szName = "All Ram";
|
||||
BurnAcb(&ba);
|
||||
@ -238,6 +237,8 @@ static INT32 DrvScan(INT32 nAction,INT32 *pnMin)
|
||||
BurnYM2151Scan(nAction, pnMin);
|
||||
|
||||
ToaScanGP9001(nAction, pnMin);
|
||||
|
||||
SCAN_VAR(v25_reset);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -254,7 +255,7 @@ static INT32 LoadRoms()
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT8 __fastcall vfiveReadByte(UINT32 sekAddress)
|
||||
static UINT8 __fastcall vfiveReadByte(UINT32 sekAddress)
|
||||
{
|
||||
if ((sekAddress & 0xff0000) == 0x210000) {
|
||||
return ShareRAM[(sekAddress / 2) & 0x7fff];
|
||||
@ -279,7 +280,7 @@ UINT8 __fastcall vfiveReadByte(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT16 __fastcall vfiveReadWord(UINT32 sekAddress)
|
||||
static UINT16 __fastcall vfiveReadWord(UINT32 sekAddress)
|
||||
{
|
||||
if ((sekAddress & 0xff0000) == 0x210000) {
|
||||
return ShareRAM[(sekAddress / 2) & 0x7fff];
|
||||
@ -312,7 +313,7 @@ UINT16 __fastcall vfiveReadWord(UINT32 sekAddress)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __fastcall vfiveWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
static void __fastcall vfiveWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
{
|
||||
//printf("Attempt to write byte value %x to location %x\n", byteValue, sekAddress);
|
||||
|
||||
@ -334,7 +335,7 @@ void __fastcall vfiveWriteByte(UINT32 sekAddress, UINT8 byteValue)
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall vfiveWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
static void __fastcall vfiveWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
{
|
||||
if ((sekAddress & 0xff0000) == 0x210000) {
|
||||
ShareRAM[(sekAddress / 2) & 0x7fff] = wordValue;
|
||||
@ -367,7 +368,7 @@ void __fastcall vfiveWriteWord(UINT32 sekAddress, UINT16 wordValue)
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall vfive_v25_write(UINT32 address, UINT8 data)
|
||||
static void __fastcall vfive_v25_write(UINT32 address, UINT8 data)
|
||||
{
|
||||
switch (address)
|
||||
{
|
||||
@ -381,7 +382,7 @@ void __fastcall vfive_v25_write(UINT32 address, UINT8 data)
|
||||
}
|
||||
}
|
||||
|
||||
UINT8 __fastcall vfive_v25_read(UINT32 address)
|
||||
static UINT8 __fastcall vfive_v25_read(UINT32 address)
|
||||
{
|
||||
switch (address)
|
||||
{
|
||||
@ -392,7 +393,7 @@ UINT8 __fastcall vfive_v25_read(UINT32 address)
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT8 __fastcall vfive_v25_read_port(UINT32 port)
|
||||
static UINT8 __fastcall vfive_v25_read_port(UINT32 port)
|
||||
{
|
||||
switch (port)
|
||||
{
|
||||
@ -514,8 +515,6 @@ static INT32 DrvInit()
|
||||
ToaPalSrc = RamPal;
|
||||
ToaPalInit();
|
||||
|
||||
bDrawScreen = true;
|
||||
|
||||
DrvDoReset(); // Reset machine
|
||||
return 0;
|
||||
}
|
||||
@ -538,21 +537,14 @@ static INT32 DrvDraw()
|
||||
{
|
||||
ToaClearScreen(0x120);
|
||||
|
||||
if (bDrawScreen) {
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
}
|
||||
ToaGetBitmap();
|
||||
ToaRenderGP9001(); // Render GP9001 graphics
|
||||
|
||||
ToaPalUpdate(); // Update the palette
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline static INT32 CheckSleep(INT32)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static INT32 DrvFrame()
|
||||
{
|
||||
INT32 nInterleave = 10;
|
||||
@ -588,7 +580,7 @@ static INT32 DrvFrame()
|
||||
SekSetCyclesScanline(nCyclesTotal[0] / 262);
|
||||
nToaCyclesDisplayStart = nCyclesTotal[0] - ((nCyclesTotal[0] * (TOA_VBLANK_LINES + 240)) / 262);
|
||||
nToaCyclesVBlankStart = nCyclesTotal[0] - ((nCyclesTotal[0] * TOA_VBLANK_LINES) / 262);
|
||||
bVBlank = false;
|
||||
bool bVBlank = false;
|
||||
|
||||
VezOpen(0);
|
||||
|
||||
@ -617,13 +609,9 @@ static INT32 DrvFrame()
|
||||
}
|
||||
|
||||
nCyclesSegment = nNext - nCyclesDone[nCurrentCPU];
|
||||
if (bVBlank || (!CheckSleep(nCurrentCPU))) { // See if this CPU is busywaiting
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
} else {
|
||||
nCyclesDone[nCurrentCPU] += SekIdle(nCyclesSegment);
|
||||
}
|
||||
nCyclesDone[nCurrentCPU] += SekRun(nCyclesSegment);
|
||||
|
||||
// sound! (increase interleave?)
|
||||
// sound!
|
||||
if (v25_reset) {
|
||||
nCyclesDone[1] += nCyclesTotal[1] / nInterleave;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user