Merge branch 'master' of https://github.com/barry65536/FBAlpha
This commit is contained in:
commit
21bb0131a7
|
@ -866,12 +866,12 @@ static INT32 alt2_kludge(UINT32 /*offset*/)
|
||||||
{
|
{
|
||||||
static const SekRegister SekRegs1[8] = { SEK_REG_A0, SEK_REG_A1, SEK_REG_A2, SEK_REG_A3, SEK_REG_A4, SEK_REG_A5, SEK_REG_A6, SEK_REG_A7 };
|
static const SekRegister SekRegs1[8] = { SEK_REG_A0, SEK_REG_A1, SEK_REG_A2, SEK_REG_A3, SEK_REG_A4, SEK_REG_A5, SEK_REG_A6, SEK_REG_A7 };
|
||||||
|
|
||||||
|
UINT32 pc = SekDbgGetRegister(SEK_REG_PPC);
|
||||||
/* first verify that the prefetched PC matches the first alternate */
|
/* first verify that the prefetched PC matches the first alternate */
|
||||||
if (MATCHES_MASK_VALUE((INT32)(SekGetPC(-1) >> 1), slapstic.alt1))
|
if (MATCHES_MASK_VALUE((INT32)((pc+2) >> 1), slapstic.alt1))
|
||||||
{
|
{
|
||||||
/* now look for a move.w (An),(An) or cmpm.w (An)+,(An)+ */
|
/* now look for a move.w (An),(An) or cmpm.w (An)+,(An)+ */
|
||||||
UINT16 opcode = SekFetchWord((SekGetPC(-1) - 4) & 0xffffff); // IQ_132 check this!
|
UINT16 opcode = SekReadWord(pc);
|
||||||
// UINT16 opcode = space->direct().read_decrypted_word(cpu_get_previouspc(&space->device()) & 0xffffff);
|
|
||||||
if ((opcode & 0xf1f8) == 0x3090 || (opcode & 0xf1f8) == 0xb148)
|
if ((opcode & 0xf1f8) == 0x3090 || (opcode & 0xf1f8) == 0xb148)
|
||||||
{
|
{
|
||||||
/* fetch the value of the register for the second operand, and see */
|
/* fetch the value of the register for the second operand, and see */
|
||||||
|
|
|
@ -430,7 +430,7 @@ static void suna_palette_write(INT32 offset)
|
||||||
//------------------
|
//------------------
|
||||||
// 68k
|
// 68k
|
||||||
|
|
||||||
UINT16 __fastcall bestbest_read_word(UINT32 address)
|
static UINT16 __fastcall bestbest_read_word(UINT32 address)
|
||||||
{
|
{
|
||||||
switch (address & ~1)
|
switch (address & ~1)
|
||||||
{
|
{
|
||||||
|
@ -447,7 +447,7 @@ UINT16 __fastcall bestbest_read_word(UINT32 address)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT8 __fastcall bestbest_read_byte(UINT32 address)
|
static UINT8 __fastcall bestbest_read_byte(UINT32 address)
|
||||||
{
|
{
|
||||||
switch (address)
|
switch (address)
|
||||||
{
|
{
|
||||||
|
@ -470,7 +470,7 @@ UINT8 __fastcall bestbest_read_byte(UINT32 address)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __fastcall bestbest_write_word(UINT32 address, UINT16 data)
|
static void __fastcall bestbest_write_word(UINT32 address, UINT16 data)
|
||||||
{
|
{
|
||||||
if ((address & 0xfff000) == 0x540000) {
|
if ((address & 0xfff000) == 0x540000) {
|
||||||
*((UINT16*)(DrvPalRAM + (address & 0x0fff))) = BURN_ENDIAN_SWAP_INT16(data);
|
*((UINT16*)(DrvPalRAM + (address & 0x0fff))) = BURN_ENDIAN_SWAP_INT16(data);
|
||||||
|
@ -492,7 +492,7 @@ void __fastcall bestbest_write_word(UINT32 address, UINT16 data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __fastcall bestbest_write_byte(UINT32 address, UINT8 data)
|
static void __fastcall bestbest_write_byte(UINT32 address, UINT8 data)
|
||||||
{
|
{
|
||||||
if ((address & 0xfff000) == 0x540000) {
|
if ((address & 0xfff000) == 0x540000) {
|
||||||
DrvPalRAM[address & 0xfff] = data;
|
DrvPalRAM[address & 0xfff] = data;
|
||||||
|
@ -528,7 +528,7 @@ void __fastcall bestbest_write_byte(UINT32 address, UINT8 data)
|
||||||
//------------------
|
//------------------
|
||||||
// Z80 #0
|
// Z80 #0
|
||||||
|
|
||||||
void __fastcall bestbest_sound0_write(UINT16 address, UINT8 data)
|
static void __fastcall bestbest_sound0_write(UINT16 address, UINT8 data)
|
||||||
{
|
{
|
||||||
switch (address)
|
switch (address)
|
||||||
{
|
{
|
||||||
|
@ -550,7 +550,7 @@ void __fastcall bestbest_sound0_write(UINT16 address, UINT8 data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT8 __fastcall bestbest_sound0_read(UINT16 address)
|
static UINT8 __fastcall bestbest_sound0_read(UINT16 address)
|
||||||
{
|
{
|
||||||
switch (address)
|
switch (address)
|
||||||
{
|
{
|
||||||
|
@ -564,21 +564,21 @@ UINT8 __fastcall bestbest_sound0_read(UINT16 address)
|
||||||
//------------------
|
//------------------
|
||||||
// Z80 #1
|
// Z80 #1
|
||||||
|
|
||||||
void __fastcall bestbest_sound1_out(UINT16 port, UINT8 data)
|
static void __fastcall bestbest_sound1_out(UINT16 port, UINT8 data)
|
||||||
{
|
{
|
||||||
switch (port & 0xff)
|
switch (port & 0xff)
|
||||||
{
|
{
|
||||||
case 0x00: { DACWrite(0, (data & 0xf) * 0x11); return; }
|
case 0x00: { DACSignedWrite(0, (data & 0xf) * 0x11); return; }
|
||||||
case 0x01: { DACWrite(1, (data & 0xf) * 0x11); return; }
|
case 0x01: { DACSignedWrite(1, (data & 0xf) * 0x11); return; }
|
||||||
|
|
||||||
case 0x02: { DACWrite(2, (data & 0xf) * 0x11); return; }
|
case 0x02: { DACSignedWrite(2, (data & 0xf) * 0x11); return; }
|
||||||
case 0x03: { DACWrite(3, (data & 0xf) * 0x11); return; }
|
case 0x03: { DACSignedWrite(3, (data & 0xf) * 0x11); return; }
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT8 __fastcall bestbest_sound1_in(UINT16 port)
|
static UINT8 __fastcall bestbest_sound1_in(UINT16 port)
|
||||||
{
|
{
|
||||||
switch (port & 0xff)
|
switch (port & 0xff)
|
||||||
{
|
{
|
||||||
|
@ -597,7 +597,7 @@ UINT8 __fastcall bestbest_sound1_in(UINT16 port)
|
||||||
//------------------
|
//------------------
|
||||||
// 68k
|
// 68k
|
||||||
|
|
||||||
UINT16 __fastcall sunaq_read_word(UINT32 address)
|
static UINT16 __fastcall sunaq_read_word(UINT32 address)
|
||||||
{
|
{
|
||||||
if ((address & 0xfff000) == 0x540000) {
|
if ((address & 0xfff000) == 0x540000) {
|
||||||
if (address & 0x200) {
|
if (address & 0x200) {
|
||||||
|
@ -626,7 +626,7 @@ UINT16 __fastcall sunaq_read_word(UINT32 address)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT8 __fastcall sunaq_read_byte(UINT32 address)
|
static UINT8 __fastcall sunaq_read_byte(UINT32 address)
|
||||||
{
|
{
|
||||||
if ((address & 0xfff000) == 0x540000) {
|
if ((address & 0xfff000) == 0x540000) {
|
||||||
if (address & 0x200) {
|
if (address & 0x200) {
|
||||||
|
@ -659,7 +659,7 @@ UINT8 __fastcall sunaq_read_byte(UINT32 address)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __fastcall sunaq_write_word(UINT32 address, UINT16 data)
|
static void __fastcall sunaq_write_word(UINT32 address, UINT16 data)
|
||||||
{
|
{
|
||||||
if ((address & 0xfff000) == 0x540000) {
|
if ((address & 0xfff000) == 0x540000) {
|
||||||
if (address & 0x200) {
|
if (address & 0x200) {
|
||||||
|
@ -690,7 +690,7 @@ void __fastcall sunaq_write_word(UINT32 address, UINT16 data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __fastcall sunaq_write_byte(UINT32 address, UINT8 data)
|
static void __fastcall sunaq_write_byte(UINT32 address, UINT8 data)
|
||||||
{
|
{
|
||||||
if ((address & 0xfff000) == 0x540000) {
|
if ((address & 0xfff000) == 0x540000) {
|
||||||
if (address & 0x200) {
|
if (address & 0x200) {
|
||||||
|
@ -728,7 +728,7 @@ void __fastcall sunaq_write_byte(UINT32 address, UINT8 data)
|
||||||
//------------------
|
//------------------
|
||||||
// Z80 #0
|
// Z80 #0
|
||||||
|
|
||||||
void __fastcall sunaq_sound0_write(UINT16 address, UINT8 data)
|
static void __fastcall sunaq_sound0_write(UINT16 address, UINT8 data)
|
||||||
{
|
{
|
||||||
switch (address)
|
switch (address)
|
||||||
{
|
{
|
||||||
|
@ -793,7 +793,7 @@ static void uballoon_prot_write(UINT16 offset, UINT8 data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT16 __fastcall uballoon_read_word(UINT32 address)
|
static UINT16 __fastcall uballoon_read_word(UINT32 address)
|
||||||
{
|
{
|
||||||
if ((address & 0xfff000) == 0x200000) {
|
if ((address & 0xfff000) == 0x200000) {
|
||||||
if (address & 0x200) {
|
if (address & 0x200) {
|
||||||
|
@ -822,7 +822,7 @@ UINT16 __fastcall uballoon_read_word(UINT32 address)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT8 __fastcall uballoon_read_byte(UINT32 address)
|
static UINT8 __fastcall uballoon_read_byte(UINT32 address)
|
||||||
{
|
{
|
||||||
if ((address & 0xff0000) == 0xa00000) {
|
if ((address & 0xff0000) == 0xa00000) {
|
||||||
return uballoon_prot_read(address);
|
return uballoon_prot_read(address);
|
||||||
|
@ -859,7 +859,7 @@ UINT8 __fastcall uballoon_read_byte(UINT32 address)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __fastcall uballoon_write_word(UINT32 address, UINT16 data)
|
static void __fastcall uballoon_write_word(UINT32 address, UINT16 data)
|
||||||
{
|
{
|
||||||
if ((address & 0xfff000) == 0x200000) {
|
if ((address & 0xfff000) == 0x200000) {
|
||||||
if (address & 0x200) {
|
if (address & 0x200) {
|
||||||
|
@ -886,7 +886,7 @@ void __fastcall uballoon_write_word(UINT32 address, UINT16 data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __fastcall uballoon_write_byte(UINT32 address, UINT8 data)
|
static void __fastcall uballoon_write_byte(UINT32 address, UINT8 data)
|
||||||
{
|
{
|
||||||
if ((address & 0xfff000) == 0x200000) {
|
if ((address & 0xfff000) == 0x200000) {
|
||||||
if (address & 0x200) {
|
if (address & 0x200) {
|
||||||
|
@ -929,16 +929,15 @@ static void uballoon_bankswitch(INT32 data)
|
||||||
|
|
||||||
INT32 bank = ((data & 1) << 16) | 0x400;
|
INT32 bank = ((data & 1) << 16) | 0x400;
|
||||||
|
|
||||||
ZetMapArea(0x0400, 0xffff, 0, DrvZ80ROM1 + bank);
|
ZetMapMemory(DrvZ80ROM1 + bank, 0x0400, 0xffff, MAP_ROM);
|
||||||
ZetMapArea(0x0400, 0xffff, 2, DrvZ80ROM1 + bank);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void __fastcall uballoon_sound1_out(UINT16 port, UINT8 data)
|
static void __fastcall uballoon_sound1_out(UINT16 port, UINT8 data)
|
||||||
{
|
{
|
||||||
switch (port & 0xff)
|
switch (port & 0xff)
|
||||||
{
|
{
|
||||||
case 0x00: { DACWrite(0, (data & 0xf) * 0x11); return; }
|
case 0x00: { DACSignedWrite(0, (data & 0xf) * 0x11); return; }
|
||||||
case 0x01: { DACWrite(1, (data & 0xf) * 0x11); return; }
|
case 0x01: { DACSignedWrite(1, (data & 0xf) * 0x11); return; }
|
||||||
|
|
||||||
case 0x03:
|
case 0x03:
|
||||||
uballoon_bankswitch(data);
|
uballoon_bankswitch(data);
|
||||||
|
@ -948,7 +947,7 @@ void __fastcall uballoon_sound1_out(UINT16 port, UINT8 data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT8 __fastcall uballoon_sound1_in(UINT16 port)
|
static UINT8 __fastcall uballoon_sound1_in(UINT16 port)
|
||||||
{
|
{
|
||||||
switch (port & 0xff)
|
switch (port & 0xff)
|
||||||
{
|
{
|
||||||
|
@ -967,7 +966,7 @@ UINT8 __fastcall uballoon_sound1_in(UINT16 port)
|
||||||
//------------------
|
//------------------
|
||||||
// 68k
|
// 68k
|
||||||
|
|
||||||
UINT16 __fastcall bssoccer_read_word(UINT32 address)
|
static UINT16 __fastcall bssoccer_read_word(UINT32 address)
|
||||||
{
|
{
|
||||||
if ((address & 0xfff000) == 0x400000) {
|
if ((address & 0xfff000) == 0x400000) {
|
||||||
if (address & 0x200) {
|
if (address & 0x200) {
|
||||||
|
@ -1003,7 +1002,7 @@ UINT16 __fastcall bssoccer_read_word(UINT32 address)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT8 __fastcall bssoccer_read_byte(UINT32 address)
|
static UINT8 __fastcall bssoccer_read_byte(UINT32 address)
|
||||||
{
|
{
|
||||||
if ((address & 0xfff000) == 0x400000) {
|
if ((address & 0xfff000) == 0x400000) {
|
||||||
if (address & 0x200) {
|
if (address & 0x200) {
|
||||||
|
@ -1044,7 +1043,7 @@ UINT8 __fastcall bssoccer_read_byte(UINT32 address)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __fastcall bssoccer_write_word(UINT32 address, UINT16 data)
|
static void __fastcall bssoccer_write_word(UINT32 address, UINT16 data)
|
||||||
{
|
{
|
||||||
if ((address & 0xfff000) == 0x400000) {
|
if ((address & 0xfff000) == 0x400000) {
|
||||||
if (address & 0x200) {
|
if (address & 0x200) {
|
||||||
|
@ -1071,7 +1070,7 @@ void __fastcall bssoccer_write_word(UINT32 address, UINT16 data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __fastcall bssoccer_write_byte(UINT32 address, UINT8 data)
|
static void __fastcall bssoccer_write_byte(UINT32 address, UINT8 data)
|
||||||
{
|
{
|
||||||
if ((address & 0xfff000) == 0x400000) {
|
if ((address & 0xfff000) == 0x400000) {
|
||||||
if (address & 0x200) {
|
if (address & 0x200) {
|
||||||
|
@ -1109,11 +1108,10 @@ static void bssoccer_bankswitch_w(UINT8 *z80data, INT32 p, INT32 data)
|
||||||
|
|
||||||
INT32 bank = ((data & 7) << 16) | 0x1000;
|
INT32 bank = ((data & 7) << 16) | 0x1000;
|
||||||
|
|
||||||
ZetMapArea(0x1000, 0xffff, 0, z80data + bank);
|
ZetMapMemory(z80data + bank, 0x1000, 0xffff, MAP_ROM);
|
||||||
ZetMapArea(0x1000, 0xffff, 2, z80data + bank);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void __fastcall bssoccer_sound0_write(UINT16 address, UINT8 data)
|
static void __fastcall bssoccer_sound0_write(UINT16 address, UINT8 data)
|
||||||
{
|
{
|
||||||
switch (address)
|
switch (address)
|
||||||
{
|
{
|
||||||
|
@ -1137,7 +1135,7 @@ void __fastcall bssoccer_sound0_write(UINT16 address, UINT8 data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT8 __fastcall bssoccer_sound0_read(UINT16 address)
|
static UINT8 __fastcall bssoccer_sound0_read(UINT16 address)
|
||||||
{
|
{
|
||||||
switch (address)
|
switch (address)
|
||||||
{
|
{
|
||||||
|
@ -1154,12 +1152,12 @@ UINT8 __fastcall bssoccer_sound0_read(UINT16 address)
|
||||||
//------------------
|
//------------------
|
||||||
// Z80 #1
|
// Z80 #1
|
||||||
|
|
||||||
void __fastcall bssoccer_sound1_out(UINT16 port, UINT8 data)
|
static void __fastcall bssoccer_sound1_out(UINT16 port, UINT8 data)
|
||||||
{
|
{
|
||||||
switch (port & 0xff)
|
switch (port & 0xff)
|
||||||
{
|
{
|
||||||
case 0x00: { DACWrite(0, (data & 0xf) * 0x11); return; }
|
case 0x00: { DACSignedWrite(0, (data & 0xf) * 0x11); return; }
|
||||||
case 0x01: { DACWrite(1, (data & 0xf) * 0x11); return; }
|
case 0x01: { DACSignedWrite(1, (data & 0xf) * 0x11); return; }
|
||||||
|
|
||||||
case 0x03:
|
case 0x03:
|
||||||
bssoccer_bankswitch_w(DrvZ80ROM1, 0, data);
|
bssoccer_bankswitch_w(DrvZ80ROM1, 0, data);
|
||||||
|
@ -1169,7 +1167,7 @@ void __fastcall bssoccer_sound1_out(UINT16 port, UINT8 data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT8 __fastcall bssoccer_sound1_in(UINT16 port)
|
static UINT8 __fastcall bssoccer_sound1_in(UINT16 port)
|
||||||
{
|
{
|
||||||
switch (port & 0xff)
|
switch (port & 0xff)
|
||||||
{
|
{
|
||||||
|
@ -1183,12 +1181,12 @@ UINT8 __fastcall bssoccer_sound1_in(UINT16 port)
|
||||||
//------------------
|
//------------------
|
||||||
// Z80 #2
|
// Z80 #2
|
||||||
|
|
||||||
void __fastcall bssoccer_sound2_out(UINT16 port, UINT8 data)
|
static void __fastcall bssoccer_sound2_out(UINT16 port, UINT8 data)
|
||||||
{
|
{
|
||||||
switch (port & 0xff)
|
switch (port & 0xff)
|
||||||
{
|
{
|
||||||
case 0x00: { DACWrite(2, (data & 0xf) * 0x11); return; }
|
case 0x00: { DACSignedWrite(2, (data & 0xf) * 0x11); return; }
|
||||||
case 0x01: { DACWrite(3, (data & 0xf) * 0x11); return; }
|
case 0x01: { DACSignedWrite(3, (data & 0xf) * 0x11); return; }
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case 0x03:
|
case 0x03:
|
||||||
|
@ -1199,7 +1197,7 @@ void __fastcall bssoccer_sound2_out(UINT16 port, UINT8 data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT8 __fastcall bssoccer_sound2_in(UINT16 port)
|
static UINT8 __fastcall bssoccer_sound2_in(UINT16 port)
|
||||||
{
|
{
|
||||||
switch (port & 0xff)
|
switch (port & 0xff)
|
||||||
{
|
{
|
||||||
|
@ -1412,7 +1410,7 @@ static INT32 DrvLoadRoms()
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void bestbest_ay8910_write_a(UINT32,UINT32)
|
static void bestbest_ay8910_write_a(UINT32,UINT32)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1430,16 +1428,6 @@ static INT32 bestbestSynchroniseStream(INT32 nSoundRate)
|
||||||
return (INT64)ZetTotalCycles() * nSoundRate / 6000000;
|
return (INT64)ZetTotalCycles() * nSoundRate / 6000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
static INT32 bestbestSyncDAC()
|
|
||||||
{
|
|
||||||
return (INT32)(float)(nBurnSoundLen * (ZetTotalCycles() / (6000000.0000 / (nBurnFPS / 100.0000))));
|
|
||||||
}
|
|
||||||
|
|
||||||
static INT32 bssoccerSyncDAC()
|
|
||||||
{
|
|
||||||
return (INT32)(float)(nBurnSoundLen * (ZetTotalCycles() / (5000000.0000 / (nBurnFPS / 100.0000))));
|
|
||||||
}
|
|
||||||
|
|
||||||
static INT32 BestbestInit()
|
static INT32 BestbestInit()
|
||||||
{
|
{
|
||||||
INT32 nLen;
|
INT32 nLen;
|
||||||
|
@ -1475,19 +1463,15 @@ static INT32 BestbestInit()
|
||||||
|
|
||||||
ZetInit(0);
|
ZetInit(0);
|
||||||
ZetOpen(0);
|
ZetOpen(0);
|
||||||
ZetMapArea(0x0000, 0xbfff, 0, DrvZ80ROM0);
|
ZetMapMemory(DrvZ80ROM0, 0x0000, 0xbfff, MAP_ROM);
|
||||||
ZetMapArea(0x0000, 0xbfff, 2, DrvZ80ROM0);
|
ZetMapMemory(DrvZ80RAM0, 0xe000, 0xe7ff, MAP_RAM);
|
||||||
ZetMapArea(0xe000, 0xe7ff, 0, DrvZ80RAM0);
|
|
||||||
ZetMapArea(0xe000, 0xe7ff, 1, DrvZ80RAM0);
|
|
||||||
ZetMapArea(0xe000, 0xe7ff, 2, DrvZ80RAM0);
|
|
||||||
ZetSetReadHandler(bestbest_sound0_read);
|
ZetSetReadHandler(bestbest_sound0_read);
|
||||||
ZetSetWriteHandler(bestbest_sound0_write);
|
ZetSetWriteHandler(bestbest_sound0_write);
|
||||||
ZetClose();
|
ZetClose();
|
||||||
|
|
||||||
ZetInit(1);
|
ZetInit(1);
|
||||||
ZetOpen(1);
|
ZetOpen(1);
|
||||||
ZetMapArea(0x0000, 0xffff, 0, DrvZ80ROM1);
|
ZetMapMemory(DrvZ80ROM1, 0x0000, 0xffff, MAP_ROM);
|
||||||
ZetMapArea(0x0000, 0xffff, 2, DrvZ80ROM1);
|
|
||||||
ZetSetInHandler(bestbest_sound1_in);
|
ZetSetInHandler(bestbest_sound1_in);
|
||||||
ZetSetOutHandler(bestbest_sound1_out);
|
ZetSetOutHandler(bestbest_sound1_out);
|
||||||
ZetClose();
|
ZetClose();
|
||||||
|
@ -1502,10 +1486,10 @@ static INT32 BestbestInit()
|
||||||
AY8910SetRoute(0, BURN_SND_AY8910_ROUTE_2, 1.00, BURN_SND_ROUTE_RIGHT);
|
AY8910SetRoute(0, BURN_SND_AY8910_ROUTE_2, 1.00, BURN_SND_ROUTE_RIGHT);
|
||||||
AY8910SetRoute(0, BURN_SND_AY8910_ROUTE_3, 0.00, BURN_SND_ROUTE_BOTH); // suppressed?
|
AY8910SetRoute(0, BURN_SND_AY8910_ROUTE_3, 0.00, BURN_SND_ROUTE_BOTH); // suppressed?
|
||||||
|
|
||||||
DACInit(0, 0, 1, bestbestSyncDAC);
|
DACInit(0, 0, 1, ZetTotalCycles, 6000000);
|
||||||
DACInit(1, 0, 1, bestbestSyncDAC);
|
DACInit(1, 0, 1, ZetTotalCycles, 6000000);
|
||||||
DACInit(2, 0, 1, bestbestSyncDAC);
|
DACInit(2, 0, 1, ZetTotalCycles, 6000000);
|
||||||
DACInit(3, 0, 1, bestbestSyncDAC);
|
DACInit(3, 0, 1, ZetTotalCycles, 6000000);
|
||||||
DACSetRoute(0, 0.40, BURN_SND_ROUTE_LEFT);
|
DACSetRoute(0, 0.40, BURN_SND_ROUTE_LEFT);
|
||||||
DACSetRoute(1, 0.40, BURN_SND_ROUTE_RIGHT);
|
DACSetRoute(1, 0.40, BURN_SND_ROUTE_RIGHT);
|
||||||
DACSetRoute(2, 0.40, BURN_SND_ROUTE_LEFT);
|
DACSetRoute(2, 0.40, BURN_SND_ROUTE_LEFT);
|
||||||
|
@ -1547,21 +1531,15 @@ static INT32 SunaqInit()
|
||||||
|
|
||||||
ZetInit(0);
|
ZetInit(0);
|
||||||
ZetOpen(0);
|
ZetOpen(0);
|
||||||
ZetMapArea(0x0000, 0xefff, 0, DrvZ80ROM0);
|
ZetMapMemory(DrvZ80ROM0, 0x0000, 0xefff, MAP_ROM);
|
||||||
ZetMapArea(0x0000, 0xefff, 2, DrvZ80ROM0);
|
ZetMapMemory(DrvZ80RAM0, 0xf000, 0xf7ff, MAP_RAM);
|
||||||
ZetMapArea(0xf000, 0xf7ff, 0, DrvZ80RAM0);
|
|
||||||
ZetMapArea(0xf000, 0xf7ff, 1, DrvZ80RAM0);
|
|
||||||
ZetMapArea(0xf000, 0xf7ff, 2, DrvZ80RAM0);
|
|
||||||
ZetSetWriteHandler(sunaq_sound0_write);
|
ZetSetWriteHandler(sunaq_sound0_write);
|
||||||
ZetSetReadHandler(bssoccer_sound0_read);
|
ZetSetReadHandler(bssoccer_sound0_read);
|
||||||
ZetClose();
|
ZetClose();
|
||||||
|
|
||||||
ZetInit(1);
|
ZetInit(1);
|
||||||
ZetOpen(1);
|
ZetOpen(1);
|
||||||
ZetMapArea(0x0000, 0x0fff, 0, DrvZ80ROM1);
|
ZetMapMemory(DrvZ80ROM1, 0x0000, 0xffff, MAP_ROM);
|
||||||
ZetMapArea(0x0000, 0x0fff, 2, DrvZ80ROM1);
|
|
||||||
ZetMapArea(0x1000, 0xffff, 0, DrvZ80ROM1 + 0x1000);
|
|
||||||
ZetMapArea(0x1000, 0xffff, 2, DrvZ80ROM1 + 0x1000);
|
|
||||||
ZetSetInHandler(bssoccer_sound1_in);
|
ZetSetInHandler(bssoccer_sound1_in);
|
||||||
ZetSetOutHandler(bssoccer_sound1_out);
|
ZetSetOutHandler(bssoccer_sound1_out);
|
||||||
ZetClose();
|
ZetClose();
|
||||||
|
@ -1570,8 +1548,8 @@ static INT32 SunaqInit()
|
||||||
BurnYM2151SetRoute(BURN_SND_YM2151_YM2151_ROUTE_1, 0.50, BURN_SND_ROUTE_LEFT);
|
BurnYM2151SetRoute(BURN_SND_YM2151_YM2151_ROUTE_1, 0.50, BURN_SND_ROUTE_LEFT);
|
||||||
BurnYM2151SetRoute(BURN_SND_YM2151_YM2151_ROUTE_2, 0.50, BURN_SND_ROUTE_RIGHT);
|
BurnYM2151SetRoute(BURN_SND_YM2151_YM2151_ROUTE_2, 0.50, BURN_SND_ROUTE_RIGHT);
|
||||||
|
|
||||||
DACInit(0, 0, 2, bestbestSyncDAC);
|
DACInit(0, 0, 2, ZetTotalCycles, 6000000);
|
||||||
DACInit(1, 0, 2, bestbestSyncDAC);
|
DACInit(1, 0, 2, ZetTotalCycles, 6000000);
|
||||||
DACSetRoute(0, 0.50, BURN_SND_ROUTE_LEFT);
|
DACSetRoute(0, 0.50, BURN_SND_ROUTE_LEFT);
|
||||||
DACSetRoute(1, 0.50, BURN_SND_ROUTE_RIGHT);
|
DACSetRoute(1, 0.50, BURN_SND_ROUTE_RIGHT);
|
||||||
|
|
||||||
|
@ -1613,21 +1591,15 @@ static INT32 UballoonInit()
|
||||||
|
|
||||||
ZetInit(0);
|
ZetInit(0);
|
||||||
ZetOpen(0);
|
ZetOpen(0);
|
||||||
ZetMapArea(0x0000, 0xefff, 0, DrvZ80ROM0);
|
ZetMapMemory(DrvZ80ROM0, 0x0000, 0xefff, MAP_ROM);
|
||||||
ZetMapArea(0x0000, 0xefff, 2, DrvZ80ROM0);
|
ZetMapMemory(DrvZ80RAM0, 0xf000, 0xf7ff, MAP_RAM);
|
||||||
ZetMapArea(0xf000, 0xf7ff, 0, DrvZ80RAM0);
|
|
||||||
ZetMapArea(0xf000, 0xf7ff, 1, DrvZ80RAM0);
|
|
||||||
ZetMapArea(0xf000, 0xf7ff, 2, DrvZ80RAM0);
|
|
||||||
ZetSetWriteHandler(sunaq_sound0_write);
|
ZetSetWriteHandler(sunaq_sound0_write);
|
||||||
ZetSetReadHandler(bssoccer_sound0_read);
|
ZetSetReadHandler(bssoccer_sound0_read);
|
||||||
ZetClose();
|
ZetClose();
|
||||||
|
|
||||||
ZetInit(1);
|
ZetInit(1);
|
||||||
ZetOpen(1);
|
ZetOpen(1);
|
||||||
ZetMapArea(0x0000, 0x03ff, 0, DrvZ80ROM1);
|
ZetMapMemory(DrvZ80ROM1, 0x0000, 0xffff, MAP_ROM);
|
||||||
ZetMapArea(0x0000, 0x03ff, 2, DrvZ80ROM1);
|
|
||||||
ZetMapArea(0x0400, 0xffff, 0, DrvZ80ROM1 + 0x400);
|
|
||||||
ZetMapArea(0x0400, 0xffff, 2, DrvZ80ROM1 + 0x400);
|
|
||||||
ZetSetInHandler(uballoon_sound1_in);
|
ZetSetInHandler(uballoon_sound1_in);
|
||||||
ZetSetOutHandler(uballoon_sound1_out);
|
ZetSetOutHandler(uballoon_sound1_out);
|
||||||
ZetClose();
|
ZetClose();
|
||||||
|
@ -1636,8 +1608,8 @@ static INT32 UballoonInit()
|
||||||
BurnYM2151SetRoute(BURN_SND_YM2151_YM2151_ROUTE_1, 0.50, BURN_SND_ROUTE_LEFT);
|
BurnYM2151SetRoute(BURN_SND_YM2151_YM2151_ROUTE_1, 0.50, BURN_SND_ROUTE_LEFT);
|
||||||
BurnYM2151SetRoute(BURN_SND_YM2151_YM2151_ROUTE_2, 0.50, BURN_SND_ROUTE_RIGHT);
|
BurnYM2151SetRoute(BURN_SND_YM2151_YM2151_ROUTE_2, 0.50, BURN_SND_ROUTE_RIGHT);
|
||||||
|
|
||||||
DACInit(0, 0, 1, bssoccerSyncDAC);
|
DACInit(0, 0, 1, ZetTotalCycles, 5333333);
|
||||||
DACInit(1, 0, 1, bssoccerSyncDAC);
|
DACInit(1, 0, 1, ZetTotalCycles, 5333333);
|
||||||
DACSetRoute(0, 0.50, BURN_SND_ROUTE_LEFT);
|
DACSetRoute(0, 0.50, BURN_SND_ROUTE_LEFT);
|
||||||
DACSetRoute(1, 0.50, BURN_SND_ROUTE_RIGHT);
|
DACSetRoute(1, 0.50, BURN_SND_ROUTE_RIGHT);
|
||||||
|
|
||||||
|
@ -1677,31 +1649,22 @@ static INT32 BssoccerInit()
|
||||||
|
|
||||||
ZetInit(0);
|
ZetInit(0);
|
||||||
ZetOpen(0);
|
ZetOpen(0);
|
||||||
ZetMapArea(0x0000, 0x7fff, 0, DrvZ80ROM0);
|
ZetMapMemory(DrvZ80ROM0, 0x0000, 0x7fff, MAP_ROM);
|
||||||
ZetMapArea(0x0000, 0x7fff, 2, DrvZ80ROM0);
|
ZetMapMemory(DrvZ80RAM0, 0xf000, 0xf7ff, MAP_RAM);
|
||||||
ZetMapArea(0xf000, 0xf7ff, 0, DrvZ80RAM0);
|
|
||||||
ZetMapArea(0xf000, 0xf7ff, 1, DrvZ80RAM0);
|
|
||||||
ZetMapArea(0xf000, 0xf7ff, 2, DrvZ80RAM0);
|
|
||||||
ZetSetWriteHandler(bssoccer_sound0_write);
|
ZetSetWriteHandler(bssoccer_sound0_write);
|
||||||
ZetSetReadHandler(bssoccer_sound0_read);
|
ZetSetReadHandler(bssoccer_sound0_read);
|
||||||
ZetClose();
|
ZetClose();
|
||||||
|
|
||||||
ZetInit(1);
|
ZetInit(1);
|
||||||
ZetOpen(1);
|
ZetOpen(1);
|
||||||
ZetMapArea(0x0000, 0x0fff, 0, DrvZ80ROM1);
|
ZetMapMemory(DrvZ80ROM1, 0x0000, 0xffff, MAP_ROM);
|
||||||
ZetMapArea(0x0000, 0x0fff, 2, DrvZ80ROM1);
|
|
||||||
ZetMapArea(0x1000, 0xffff, 0, DrvZ80ROM1 + 0x1000);
|
|
||||||
ZetMapArea(0x1000, 0xffff, 2, DrvZ80ROM1 + 0x1000);
|
|
||||||
ZetSetInHandler(bssoccer_sound1_in);
|
ZetSetInHandler(bssoccer_sound1_in);
|
||||||
ZetSetOutHandler(bssoccer_sound1_out);
|
ZetSetOutHandler(bssoccer_sound1_out);
|
||||||
ZetClose();
|
ZetClose();
|
||||||
|
|
||||||
ZetInit(2);
|
ZetInit(2);
|
||||||
ZetOpen(2);
|
ZetOpen(2);
|
||||||
ZetMapArea(0x0000, 0x0fff, 0, DrvZ80ROM2);
|
ZetMapMemory(DrvZ80ROM2, 0x0000, 0xffff, MAP_ROM);
|
||||||
ZetMapArea(0x0000, 0x0fff, 2, DrvZ80ROM2);
|
|
||||||
ZetMapArea(0x1000, 0xffff, 0, DrvZ80ROM2 + 0x1000);
|
|
||||||
ZetMapArea(0x1000, 0xffff, 2, DrvZ80ROM2 + 0x1000);
|
|
||||||
ZetSetInHandler(bssoccer_sound2_in);
|
ZetSetInHandler(bssoccer_sound2_in);
|
||||||
ZetSetOutHandler(bssoccer_sound2_out);
|
ZetSetOutHandler(bssoccer_sound2_out);
|
||||||
ZetClose();
|
ZetClose();
|
||||||
|
@ -1710,12 +1673,12 @@ static INT32 BssoccerInit()
|
||||||
BurnYM2151SetRoute(BURN_SND_YM2151_YM2151_ROUTE_1, 0.20, BURN_SND_ROUTE_LEFT);
|
BurnYM2151SetRoute(BURN_SND_YM2151_YM2151_ROUTE_1, 0.20, BURN_SND_ROUTE_LEFT);
|
||||||
BurnYM2151SetRoute(BURN_SND_YM2151_YM2151_ROUTE_2, 0.20, BURN_SND_ROUTE_RIGHT);
|
BurnYM2151SetRoute(BURN_SND_YM2151_YM2151_ROUTE_2, 0.20, BURN_SND_ROUTE_RIGHT);
|
||||||
|
|
||||||
DACInit(0, 0, 1, bssoccerSyncDAC);
|
DACInit(0, 0, 1, ZetTotalCycles, 5333333);
|
||||||
DACInit(1, 0, 1, bssoccerSyncDAC);
|
DACInit(1, 0, 1, ZetTotalCycles, 5333333);
|
||||||
DACInit(2, 0, 1, bssoccerSyncDAC);
|
DACInit(2, 0, 1, ZetTotalCycles, 5333333);
|
||||||
DACInit(3, 0, 1, bssoccerSyncDAC);
|
DACInit(3, 0, 1, ZetTotalCycles, 5333333);
|
||||||
DACSetRoute(0, 0.40, BURN_SND_ROUTE_LEFT);
|
DACSetRoute(0, 0.40, BURN_SND_ROUTE_BOTH);
|
||||||
DACSetRoute(1, 0.40, BURN_SND_ROUTE_RIGHT);
|
DACSetRoute(1, 0.40, BURN_SND_ROUTE_BOTH);
|
||||||
DACSetRoute(2, 0.40, BURN_SND_ROUTE_LEFT);
|
DACSetRoute(2, 0.40, BURN_SND_ROUTE_LEFT);
|
||||||
DACSetRoute(3, 0.40, BURN_SND_ROUTE_RIGHT);
|
DACSetRoute(3, 0.40, BURN_SND_ROUTE_RIGHT);
|
||||||
|
|
||||||
|
@ -1870,9 +1833,7 @@ static INT32 DrvDraw()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (INT32 i = 0; i < nScreenWidth * nScreenHeight; i++) {
|
BurnTransferClear(0xff);
|
||||||
pTransDraw[i] = 0xff;
|
|
||||||
}
|
|
||||||
|
|
||||||
draw_sprites((UINT16*)DrvSprRAM0, DrvGfxROM0, nGfxROM0Len);
|
draw_sprites((UINT16*)DrvSprRAM0, DrvGfxROM0, nGfxROM0Len);
|
||||||
if (!game_select) {
|
if (!game_select) {
|
||||||
|
@ -2070,6 +2031,7 @@ static INT32 UballoonFrame()
|
||||||
INT32 nInterleave = 50;
|
INT32 nInterleave = 50;
|
||||||
INT32 nSoundBufferPos = 0;
|
INT32 nSoundBufferPos = 0;
|
||||||
INT32 nCyclesTotal[3];
|
INT32 nCyclesTotal[3];
|
||||||
|
INT32 nCyclesDone[3] = { 0, 0, 0 };
|
||||||
|
|
||||||
if (DrvReset) {
|
if (DrvReset) {
|
||||||
DrvDoReset();
|
DrvDoReset();
|
||||||
|
@ -2079,7 +2041,7 @@ static INT32 UballoonFrame()
|
||||||
|
|
||||||
nCyclesTotal[0] = 8000000 / 60;
|
nCyclesTotal[0] = 8000000 / 60;
|
||||||
nCyclesTotal[1] = 3579500 / 60;
|
nCyclesTotal[1] = 3579500 / 60;
|
||||||
nCyclesTotal[2] = 5000000 / 60;
|
nCyclesTotal[2] = 5333333 / 60;
|
||||||
|
|
||||||
SekNewFrame();
|
SekNewFrame();
|
||||||
ZetNewFrame();
|
ZetNewFrame();
|
||||||
|
@ -2091,11 +2053,13 @@ static INT32 UballoonFrame()
|
||||||
SekRun(nCyclesTotal[0] / nInterleave);
|
SekRun(nCyclesTotal[0] / nInterleave);
|
||||||
if (i == (nInterleave )-1) SekSetIRQLine(1, CPU_IRQSTATUS_AUTO);
|
if (i == (nInterleave )-1) SekSetIRQLine(1, CPU_IRQSTATUS_AUTO);
|
||||||
|
|
||||||
for (INT32 j = 0; j < 2; j++) {
|
ZetOpen(0);
|
||||||
ZetOpen(j);
|
nCyclesDone[1] += ZetRun(((i + 1) * nCyclesTotal[1] / nInterleave) - nCyclesDone[1]);
|
||||||
ZetRun(nCyclesTotal[j+1] / nInterleave);
|
ZetClose();
|
||||||
|
|
||||||
|
ZetOpen(1);
|
||||||
|
nCyclesDone[2] += ZetRun(((i + 1) * nCyclesTotal[2] / nInterleave) - nCyclesDone[2]);
|
||||||
ZetClose();
|
ZetClose();
|
||||||
}
|
|
||||||
|
|
||||||
if (pBurnSoundOut) {
|
if (pBurnSoundOut) {
|
||||||
INT32 nSegmentLength = nBurnSoundLen / nInterleave;
|
INT32 nSegmentLength = nBurnSoundLen / nInterleave;
|
||||||
|
@ -2115,7 +2079,9 @@ static INT32 UballoonFrame()
|
||||||
BurnYM2151Render(pSoundBuf, nSegmentLength);
|
BurnYM2151Render(pSoundBuf, nSegmentLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ZetOpen(1);
|
||||||
DACUpdate(pBurnSoundOut, nBurnSoundLen);
|
DACUpdate(pBurnSoundOut, nBurnSoundLen);
|
||||||
|
ZetClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
SekClose();
|
SekClose();
|
||||||
|
@ -2133,6 +2099,7 @@ static INT32 BssoccerFrame()
|
||||||
INT32 nInterleave = 50;
|
INT32 nInterleave = 50;
|
||||||
INT32 nSoundBufferPos = 0;
|
INT32 nSoundBufferPos = 0;
|
||||||
INT32 nCyclesTotal[4];
|
INT32 nCyclesTotal[4];
|
||||||
|
INT32 nCyclesDone[4] = { 0, 0, 0, 0 };
|
||||||
|
|
||||||
if (DrvReset) {
|
if (DrvReset) {
|
||||||
DrvDoReset();
|
DrvDoReset();
|
||||||
|
@ -2142,8 +2109,8 @@ static INT32 BssoccerFrame()
|
||||||
|
|
||||||
nCyclesTotal[0] = 8000000 / 60;
|
nCyclesTotal[0] = 8000000 / 60;
|
||||||
nCyclesTotal[1] = 3579500 / 60;
|
nCyclesTotal[1] = 3579500 / 60;
|
||||||
nCyclesTotal[2] = 5000000 / 60;
|
nCyclesTotal[2] = 5333333 / 60;
|
||||||
nCyclesTotal[3] = 5000000 / 60;
|
nCyclesTotal[3] = 5333333 / 60;
|
||||||
|
|
||||||
SekNewFrame();
|
SekNewFrame();
|
||||||
ZetNewFrame();
|
ZetNewFrame();
|
||||||
|
@ -2156,11 +2123,15 @@ static INT32 BssoccerFrame()
|
||||||
if (i == (nInterleave / 2)-1) SekSetIRQLine(2, CPU_IRQSTATUS_AUTO);
|
if (i == (nInterleave / 2)-1) SekSetIRQLine(2, CPU_IRQSTATUS_AUTO);
|
||||||
if (i == (nInterleave )-1) SekSetIRQLine(1, CPU_IRQSTATUS_AUTO);
|
if (i == (nInterleave )-1) SekSetIRQLine(1, CPU_IRQSTATUS_AUTO);
|
||||||
|
|
||||||
for (INT32 j = 0; j < 3; j++) {
|
ZetOpen(0);
|
||||||
ZetOpen(j);
|
nCyclesDone[1] += ZetRun(((i + 1) * nCyclesTotal[1] / nInterleave) - nCyclesDone[1]);
|
||||||
ZetRun(nCyclesTotal[j+1] / nInterleave);
|
ZetClose();
|
||||||
|
ZetOpen(1);
|
||||||
|
nCyclesDone[2] += ZetRun(((i + 1) * nCyclesTotal[2] / nInterleave) - nCyclesDone[2]);
|
||||||
|
ZetClose();
|
||||||
|
ZetOpen(2);
|
||||||
|
nCyclesDone[3] += ZetRun(((i + 1) * nCyclesTotal[3] / nInterleave) - nCyclesDone[3]);
|
||||||
ZetClose();
|
ZetClose();
|
||||||
}
|
|
||||||
|
|
||||||
if (pBurnSoundOut) {
|
if (pBurnSoundOut) {
|
||||||
INT32 nSegmentLength = nBurnSoundLen / nInterleave;
|
INT32 nSegmentLength = nBurnSoundLen / nInterleave;
|
||||||
|
@ -2179,7 +2150,9 @@ static INT32 BssoccerFrame()
|
||||||
BurnYM2151Render(pSoundBuf, nSegmentLength);
|
BurnYM2151Render(pSoundBuf, nSegmentLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ZetOpen(1);
|
||||||
DACUpdate(pBurnSoundOut, nBurnSoundLen);
|
DACUpdate(pBurnSoundOut, nBurnSoundLen);
|
||||||
|
ZetClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
SekClose();
|
SekClose();
|
||||||
|
@ -2383,7 +2356,7 @@ STD_ROM_FN(bssoccer)
|
||||||
|
|
||||||
struct BurnDriver BurnDrvBssoccer = {
|
struct BurnDriver BurnDrvBssoccer = {
|
||||||
"bssoccer", NULL, NULL, NULL, "1996",
|
"bssoccer", NULL, NULL, NULL, "1996",
|
||||||
"Back Street Soccer\0", "graphics issues?", "SunA", "Miscellaneous",
|
"Back Street Soccer\0", NULL, "SunA", "Miscellaneous",
|
||||||
NULL, NULL, NULL, NULL,
|
NULL, NULL, NULL, NULL,
|
||||||
BDF_GAME_WORKING, 4, HARDWARE_MISC_POST90S, GBF_SPORTSFOOTBALL, 0,
|
BDF_GAME_WORKING, 4, HARDWARE_MISC_POST90S, GBF_SPORTSFOOTBALL, 0,
|
||||||
NULL, bssoccerRomInfo, bssoccerRomName, NULL, NULL, BssoccerInputInfo, bssoccerDIPInfo,
|
NULL, bssoccerRomInfo, bssoccerRomName, NULL, NULL, BssoccerInputInfo, bssoccerDIPInfo,
|
||||||
|
|
|
@ -5327,10 +5327,12 @@ static INT32 BlockgalInit()
|
||||||
nRet = System1Init(2, 0x4000, 1, 0x2000, 6, 0x2000, 4, 0x4000, 1);
|
nRet = System1Init(2, 0x4000, 1, 0x2000, 6, 0x2000, 4, 0x4000, 1);
|
||||||
BurnFree(System1MC8123Key);
|
BurnFree(System1MC8123Key);
|
||||||
|
|
||||||
|
if (nRet == 0) {
|
||||||
ZetOpen(0);
|
ZetOpen(0);
|
||||||
ZetSetInHandler(BlockgalZ801PortRead);
|
ZetSetInHandler(BlockgalZ801PortRead);
|
||||||
ZetClose();
|
ZetClose();
|
||||||
MakeInputsFunction = BlockgalMakeInputs;
|
MakeInputsFunction = BlockgalMakeInputs;
|
||||||
|
}
|
||||||
|
|
||||||
return nRet;
|
return nRet;
|
||||||
}
|
}
|
||||||
|
@ -5344,11 +5346,13 @@ static INT32 BrainInit()
|
||||||
|
|
||||||
nRet = System1Init(3, 0x8000, 1, 0x8000, 3, 0x4000, 3, 0x8000, 0);
|
nRet = System1Init(3, 0x8000, 1, 0x8000, 3, 0x4000, 3, 0x8000, 0);
|
||||||
|
|
||||||
|
if (nRet == 0) {
|
||||||
ZetOpen(0);
|
ZetOpen(0);
|
||||||
ZetSetOutHandler(BrainZ801PortWrite);
|
ZetSetOutHandler(BrainZ801PortWrite);
|
||||||
ZetClose();
|
ZetClose();
|
||||||
|
|
||||||
System1DoReset();
|
System1DoReset();
|
||||||
|
}
|
||||||
|
|
||||||
return nRet;
|
return nRet;
|
||||||
}
|
}
|
||||||
|
@ -5409,11 +5413,13 @@ static INT32 GardiaInit()
|
||||||
|
|
||||||
nRet = System1Init(3, 0x8000, 1, 0x4000, 3, 0x4000, 4, 0x8000, 0);
|
nRet = System1Init(3, 0x8000, 1, 0x4000, 3, 0x4000, 4, 0x8000, 0);
|
||||||
|
|
||||||
|
if (nRet == 0) {
|
||||||
ZetOpen(0);
|
ZetOpen(0);
|
||||||
ZetSetOutHandler(BrainZ801PortWrite);
|
ZetSetOutHandler(BrainZ801PortWrite);
|
||||||
ZetClose();
|
ZetClose();
|
||||||
|
|
||||||
System1DoReset();
|
System1DoReset();
|
||||||
|
}
|
||||||
|
|
||||||
return nRet;
|
return nRet;
|
||||||
}
|
}
|
||||||
|
@ -5429,11 +5435,13 @@ static INT32 GardiabInit()
|
||||||
|
|
||||||
nRet = System1Init(3, 0x8000, 1, 0x4000, 3, 0x4000, 4, 0x8000, 0);
|
nRet = System1Init(3, 0x8000, 1, 0x4000, 3, 0x4000, 4, 0x8000, 0);
|
||||||
|
|
||||||
|
if (nRet == 0) {
|
||||||
ZetOpen(0);
|
ZetOpen(0);
|
||||||
ZetSetOutHandler(BrainZ801PortWrite);
|
ZetSetOutHandler(BrainZ801PortWrite);
|
||||||
ZetClose();
|
ZetClose();
|
||||||
|
|
||||||
System1DoReset();
|
System1DoReset();
|
||||||
|
}
|
||||||
|
|
||||||
return nRet;
|
return nRet;
|
||||||
}
|
}
|
||||||
|
@ -5449,11 +5457,13 @@ static INT32 GardiajInit()
|
||||||
|
|
||||||
nRet = System1Init(3, 0x8000, 1, 0x4000, 3, 0x8000, 4, 0x8000, 0);
|
nRet = System1Init(3, 0x8000, 1, 0x4000, 3, 0x8000, 4, 0x8000, 0);
|
||||||
|
|
||||||
|
if (nRet == 0) {
|
||||||
ZetOpen(0);
|
ZetOpen(0);
|
||||||
ZetSetOutHandler(BrainZ801PortWrite);
|
ZetSetOutHandler(BrainZ801PortWrite);
|
||||||
ZetClose();
|
ZetClose();
|
||||||
|
|
||||||
System1DoReset();
|
System1DoReset();
|
||||||
|
}
|
||||||
|
|
||||||
return nRet;
|
return nRet;
|
||||||
}
|
}
|
||||||
|
@ -5469,11 +5479,13 @@ static INT32 HvymetalInit()
|
||||||
|
|
||||||
nRet = System1Init(3, 0x8000, 1, 0x8000, 6, 0x4000, 4, 0x8000, 0);
|
nRet = System1Init(3, 0x8000, 1, 0x8000, 6, 0x4000, 4, 0x8000, 0);
|
||||||
|
|
||||||
|
if (nRet == 0) {
|
||||||
ZetOpen(0);
|
ZetOpen(0);
|
||||||
ZetSetOutHandler(BrainZ801PortWrite);
|
ZetSetOutHandler(BrainZ801PortWrite);
|
||||||
ZetClose();
|
ZetClose();
|
||||||
|
|
||||||
System1DoReset();
|
System1DoReset();
|
||||||
|
}
|
||||||
|
|
||||||
return nRet;
|
return nRet;
|
||||||
}
|
}
|
||||||
|
@ -5527,6 +5539,8 @@ static INT32 NobbInit()
|
||||||
System1BankedRom = 1;
|
System1BankedRom = 1;
|
||||||
|
|
||||||
nRet = System1Init(3, 0x8000, 1, 0x4000, 3, 0x8000, 4, 0x8000, 0);
|
nRet = System1Init(3, 0x8000, 1, 0x4000, 3, 0x8000, 4, 0x8000, 0);
|
||||||
|
|
||||||
|
if (nRet == 0) {
|
||||||
nCyclesTotal[0] = 8000000 / 60;
|
nCyclesTotal[0] = 8000000 / 60;
|
||||||
System1Rom2[0x02f9] = 0x28;
|
System1Rom2[0x02f9] = 0x28;
|
||||||
|
|
||||||
|
@ -5573,6 +5587,7 @@ static INT32 NobbInit()
|
||||||
ZetClose();
|
ZetClose();
|
||||||
|
|
||||||
System1DoReset();
|
System1DoReset();
|
||||||
|
}
|
||||||
|
|
||||||
return nRet;
|
return nRet;
|
||||||
}
|
}
|
||||||
|
@ -5753,6 +5768,8 @@ static INT32 ChplftbInit()
|
||||||
System1ColourProms = 1;
|
System1ColourProms = 1;
|
||||||
System1BankedRom = 1;
|
System1BankedRom = 1;
|
||||||
nRet = System1Init(3, 0x8000, 1, 0x8000, 3, 0x8000, 4, 0x8000, 1);
|
nRet = System1Init(3, 0x8000, 1, 0x8000, 3, 0x8000, 4, 0x8000, 1);
|
||||||
|
|
||||||
|
if (nRet == 0) {
|
||||||
System1RowScroll = 1;
|
System1RowScroll = 1;
|
||||||
ZetOpen(0);
|
ZetOpen(0);
|
||||||
|
|
||||||
|
@ -5771,6 +5788,7 @@ static INT32 ChplftbInit()
|
||||||
ZetSetInHandler(ChplftZ801PortRead);
|
ZetSetInHandler(ChplftZ801PortRead);
|
||||||
ZetSetOutHandler(ChplftZ801PortWrite);
|
ZetSetOutHandler(ChplftZ801PortWrite);
|
||||||
ZetClose();
|
ZetClose();
|
||||||
|
}
|
||||||
|
|
||||||
return nRet;
|
return nRet;
|
||||||
}
|
}
|
||||||
|
@ -6416,7 +6434,7 @@ struct BurnDriver BurnDrvBlockgal = {
|
||||||
"blockgal", NULL, NULL, NULL, "1987",
|
"blockgal", NULL, NULL, NULL, "1987",
|
||||||
"Block Gal (MC-8123B, 317-0029)\0", NULL, "Sega / Vic Tokai", "System 1",
|
"Block Gal (MC-8123B, 317-0029)\0", NULL, "Sega / Vic Tokai", "System 1",
|
||||||
NULL, NULL, NULL, NULL,
|
NULL, NULL, NULL, NULL,
|
||||||
BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL | BDF_ORIENTATION_FLIPPED, 2, HARDWARE_SEGA_SYSTEM1, GBF_PUZZLE, 0,
|
BDF_GAME_WORKING | BDF_ORIENTATION_VERTICAL | BDF_ORIENTATION_FLIPPED, 2, HARDWARE_SEGA_SYSTEM1, GBF_BREAKOUT, 0,
|
||||||
NULL, BlockgalRomInfo, BlockgalRomName, NULL, NULL, BlockgalInputInfo, BlockgalDIPInfo,
|
NULL, BlockgalRomInfo, BlockgalRomName, NULL, NULL, BlockgalInputInfo, BlockgalDIPInfo,
|
||||||
BlockgalInit, System1Exit, System1Frame, System1Render, System1Scan,
|
BlockgalInit, System1Exit, System1Frame, System1Render, System1Scan,
|
||||||
NULL, 0x800, 224, 256, 3, 4
|
NULL, 0x800, 224, 256, 3, 4
|
||||||
|
|
|
@ -982,14 +982,14 @@ void GenericTilemapDraw(INT32 which, UINT16 *Bitmap, INT32 priority)
|
||||||
INT32 scrollx = ((cur_map->scrollx - cur_map->xoffset) / cur_map->twidth) * cur_map->twidth;
|
INT32 scrollx = ((cur_map->scrollx - cur_map->xoffset) / cur_map->twidth) * cur_map->twidth;
|
||||||
|
|
||||||
// start drawing at tile-border, and let RenderCustomTile..Clip() take care of the sub-tile clipping.
|
// start drawing at tile-border, and let RenderCustomTile..Clip() take care of the sub-tile clipping.
|
||||||
miny -= (miny % cur_map->theight);
|
INT32 starty = miny - (miny % cur_map->theight);
|
||||||
minx -= (minx % cur_map->twidth);
|
INT32 startx = minx - (minx % cur_map->twidth);
|
||||||
|
|
||||||
for (INT32 y = miny; y < (INT32)(maxy + cur_map->theight); y += cur_map->theight)
|
for (INT32 y = starty; y < (INT32)(maxy + cur_map->theight); y += cur_map->theight)
|
||||||
{
|
{
|
||||||
INT32 syy = (y + scrolly) % (cur_map->theight * cur_map->mheight);
|
INT32 syy = (y + scrolly) % (cur_map->theight * cur_map->mheight);
|
||||||
|
|
||||||
for (INT32 x = minx; x < (INT32)(maxx + cur_map->twidth); x += cur_map->twidth)
|
for (INT32 x = startx; x < (INT32)(maxx + cur_map->twidth); x += cur_map->twidth)
|
||||||
{
|
{
|
||||||
INT32 sxx = (x + scrollx) % (cur_map->twidth * cur_map->mwidth);
|
INT32 sxx = (x + scrollx) % (cur_map->twidth * cur_map->mwidth);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue