Compare commits
10 Commits
d7f3efcbf8
...
7d24db709d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d24db709d | ||
|
|
e06d977329 | ||
|
|
800eb94424 | ||
|
|
91fa0d5fb4 | ||
|
|
eafddfd3f6 | ||
|
|
6394bfec50 | ||
|
|
1299a4a2c1 | ||
|
|
9b6e87c55e | ||
|
|
2d9c4affdc | ||
|
|
4118cc8fd5 |
@@ -594,21 +594,516 @@ void DSP3_Decode()
|
||||
SetDSP3 = &DSP3_Decode_A;
|
||||
}
|
||||
|
||||
|
||||
// Opcodes 1E/3E bit-perfect to 'dsp3-intro' log
|
||||
// src: adapted from SD Gundam X/G-Next
|
||||
|
||||
int16 op3e_x;
|
||||
int16 op3e_y;
|
||||
|
||||
int16 op1e_terrain[0x2000];
|
||||
int16 op1e_cost[0x2000];
|
||||
int16 op1e_weight[0x2000];
|
||||
|
||||
int16 op1e_cell;
|
||||
int16 op1e_turn;
|
||||
int16 op1e_search;
|
||||
|
||||
int16 op1e_x;
|
||||
int16 op1e_y;
|
||||
|
||||
int16 op1e_min_radius;
|
||||
int16 op1e_max_radius;
|
||||
|
||||
int16 op1e_max_search_radius;
|
||||
int16 op1e_max_path_radius;
|
||||
|
||||
int16 op1e_lcv_radius;
|
||||
int16 op1e_lcv_steps;
|
||||
int16 op1e_lcv_turns;
|
||||
|
||||
void DSP3_OP3E()
|
||||
{
|
||||
op3e_x = (uint8)(DSP3_DR & 0x00ff);
|
||||
op3e_y = (uint8)((DSP3_DR & 0xff00)>>8);
|
||||
|
||||
DSP3_OP03();
|
||||
|
||||
op1e_terrain[ DSP3_DR ] = 0x00;
|
||||
op1e_cost[ DSP3_DR ] = 0xff;
|
||||
op1e_weight[ DSP3_DR ] = 0;
|
||||
|
||||
op1e_max_search_radius = 0;
|
||||
op1e_max_path_radius = 0;
|
||||
}
|
||||
|
||||
void DSP3_OP1E_A();
|
||||
void DSP3_OP1E_A1();
|
||||
void DSP3_OP1E_A2();
|
||||
void DSP3_OP1E_A3();
|
||||
|
||||
void DSP3_OP1E_B();
|
||||
void DSP3_OP1E_B1();
|
||||
void DSP3_OP1E_B2();
|
||||
|
||||
void DSP3_OP1E_C();
|
||||
void DSP3_OP1E_C1();
|
||||
void DSP3_OP1E_C2();
|
||||
|
||||
void DSP3_OP1E_D( int16, int16 *, int16 * );
|
||||
void DSP3_OP1E_D1( int16 move, int16 *lo, int16 *hi );
|
||||
|
||||
void DSP3_OP1E()
|
||||
{
|
||||
int lcv;
|
||||
|
||||
op1e_min_radius = (uint8)(DSP3_DR & 0x00ff);
|
||||
op1e_max_radius = (uint8)((DSP3_DR & 0xff00)>>8);
|
||||
|
||||
if( op1e_min_radius == 0 )
|
||||
op1e_min_radius++;
|
||||
|
||||
if( op1e_max_search_radius >= op1e_min_radius )
|
||||
op1e_min_radius = op1e_max_search_radius+1;
|
||||
|
||||
if( op1e_max_radius > op1e_max_search_radius )
|
||||
op1e_max_search_radius = op1e_max_radius;
|
||||
|
||||
op1e_lcv_radius = op1e_min_radius;
|
||||
op1e_lcv_steps = op1e_min_radius;
|
||||
|
||||
op1e_lcv_turns = 6;
|
||||
op1e_turn = 0;
|
||||
|
||||
op1e_x = op3e_x;
|
||||
op1e_y = op3e_y;
|
||||
|
||||
for( lcv = 0; lcv < op1e_min_radius; lcv++ )
|
||||
DSP3_OP1E_D( op1e_turn, &op1e_x, &op1e_y );
|
||||
|
||||
DSP3_OP1E_A();
|
||||
}
|
||||
|
||||
void DSP3_OP1E_A()
|
||||
{
|
||||
int lcv;
|
||||
|
||||
if( op1e_lcv_steps == 0 ) {
|
||||
op1e_lcv_radius++;
|
||||
|
||||
op1e_lcv_steps = op1e_lcv_radius;
|
||||
|
||||
op1e_x = op3e_x;
|
||||
op1e_y = op3e_y;
|
||||
|
||||
for( lcv = 0; lcv < op1e_lcv_radius; lcv++ )
|
||||
DSP3_OP1E_D( op1e_turn, &op1e_x, &op1e_y );
|
||||
}
|
||||
|
||||
if( op1e_lcv_radius > op1e_max_radius ) {
|
||||
op1e_turn++;
|
||||
op1e_lcv_turns--;
|
||||
|
||||
op1e_lcv_radius = op1e_min_radius;
|
||||
op1e_lcv_steps = op1e_min_radius;
|
||||
|
||||
op1e_x = op3e_x;
|
||||
op1e_y = op3e_y;
|
||||
|
||||
for( lcv = 0; lcv < op1e_min_radius; lcv++ )
|
||||
DSP3_OP1E_D( op1e_turn, &op1e_x, &op1e_y );
|
||||
}
|
||||
|
||||
if( op1e_lcv_turns == 0 ) {
|
||||
DSP3_DR = 0xffff;
|
||||
DSP3_SR = 0x0080;
|
||||
SetDSP3 = &DSP3_OP1E_B;
|
||||
return;
|
||||
}
|
||||
|
||||
DSP3_DR = (uint8)(op1e_x) | ((uint8)(op1e_y)<<8);
|
||||
DSP3_OP03();
|
||||
|
||||
op1e_cell = DSP3_DR;
|
||||
|
||||
DSP3_SR = 0x0080;
|
||||
SetDSP3 = &DSP3_OP1E_A1;
|
||||
}
|
||||
|
||||
void DSP3_OP1E_A1()
|
||||
{
|
||||
DSP3_SR = 0x0084;
|
||||
SetDSP3 = &DSP3_OP1E_A2;
|
||||
}
|
||||
|
||||
void DSP3_OP1E_A2()
|
||||
{
|
||||
op1e_terrain[ op1e_cell ] = (uint8)(DSP3_DR & 0x00ff);
|
||||
|
||||
DSP3_SR = 0x0084;
|
||||
SetDSP3 = &DSP3_OP1E_A3;
|
||||
}
|
||||
|
||||
void DSP3_OP1E_A3()
|
||||
{
|
||||
op1e_cost[ op1e_cell ] = (uint8)(DSP3_DR & 0x00ff);
|
||||
|
||||
if( op1e_lcv_radius == 1 ) {
|
||||
if( op1e_terrain[ op1e_cell ] & 1 ) {
|
||||
op1e_weight[ op1e_cell ] = 0xff;
|
||||
} else {
|
||||
op1e_weight[ op1e_cell ] = op1e_cost[ op1e_cell ];
|
||||
}
|
||||
}
|
||||
else {
|
||||
op1e_weight[ op1e_cell ] = 0xff;
|
||||
}
|
||||
|
||||
DSP3_OP1E_D( (int16)(op1e_turn+2), &op1e_x, &op1e_y );
|
||||
op1e_lcv_steps--;
|
||||
|
||||
DSP3_SR = 0x0080;
|
||||
DSP3_OP1E_A();
|
||||
}
|
||||
|
||||
|
||||
void DSP3_OP1E_B()
|
||||
{
|
||||
op1e_x = op3e_x;
|
||||
op1e_y = op3e_y;
|
||||
op1e_lcv_radius = 1;
|
||||
|
||||
op1e_search = 0;
|
||||
|
||||
DSP3_OP1E_B1();
|
||||
|
||||
SetDSP3 = &DSP3_OP1E_C;
|
||||
}
|
||||
|
||||
|
||||
void DSP3_OP1E_B1()
|
||||
{
|
||||
while( op1e_lcv_radius < op1e_max_radius ) {
|
||||
op1e_y--;
|
||||
|
||||
op1e_lcv_turns = 6;
|
||||
op1e_turn = 5;
|
||||
|
||||
while( op1e_lcv_turns ) {
|
||||
op1e_lcv_steps = op1e_lcv_radius;
|
||||
|
||||
while( op1e_lcv_steps ) {
|
||||
DSP3_OP1E_D1( op1e_turn, &op1e_x, &op1e_y );
|
||||
|
||||
if( 0 <= op1e_y && op1e_y < DSP3_WinHi &&
|
||||
0 <= op1e_x && op1e_x < DSP3_WinLo ) {
|
||||
DSP3_DR = (uint8)(op1e_x) | ((uint8)(op1e_y)<<8);
|
||||
DSP3_OP03();
|
||||
|
||||
op1e_cell = DSP3_DR;
|
||||
if( op1e_cost[ op1e_cell ] < 0x80 &&
|
||||
op1e_terrain[ op1e_cell ] < 0x40 ) {
|
||||
DSP3_OP1E_B2();
|
||||
} // end cell perimeter
|
||||
}
|
||||
|
||||
op1e_lcv_steps--;
|
||||
} // end search line
|
||||
|
||||
op1e_turn--;
|
||||
if( op1e_turn == 0 ) op1e_turn = 6;
|
||||
|
||||
op1e_lcv_turns--;
|
||||
} // end circle search
|
||||
|
||||
op1e_lcv_radius++;
|
||||
} // end radius search
|
||||
}
|
||||
|
||||
|
||||
void DSP3_OP1E_B2()
|
||||
{
|
||||
int16 cell;
|
||||
int16 path;
|
||||
int16 x,y;
|
||||
int16 lcv_turns;
|
||||
|
||||
path = 0xff;
|
||||
lcv_turns = 6;
|
||||
|
||||
while( lcv_turns ) {
|
||||
x = op1e_x;
|
||||
y = op1e_y;
|
||||
|
||||
DSP3_OP1E_D1( lcv_turns, &x, &y );
|
||||
|
||||
DSP3_DR = (uint8)(x) | ((uint8)(y)<<8);
|
||||
DSP3_OP03();
|
||||
|
||||
cell = DSP3_DR;
|
||||
|
||||
if( 0 <= y && y < DSP3_WinHi &&
|
||||
0 <= x && x < DSP3_WinLo ) {
|
||||
|
||||
if( op1e_terrain[ cell ] < 0x80 || op1e_weight[ cell ] == 0 ) {
|
||||
if( op1e_weight[ cell ] < path ) {
|
||||
path = op1e_weight[ cell ];
|
||||
}
|
||||
}
|
||||
} // end step travel
|
||||
|
||||
lcv_turns--;
|
||||
} // end while turns
|
||||
|
||||
if( path != 0xff ) {
|
||||
op1e_weight[ op1e_cell ] = path + op1e_cost[ op1e_cell ];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DSP3_OP1E_C()
|
||||
{
|
||||
int lcv;
|
||||
|
||||
op1e_min_radius = (uint8)(DSP3_DR & 0x00ff);
|
||||
op1e_max_radius = (uint8)((DSP3_DR & 0xff00)>>8);
|
||||
|
||||
if( op1e_min_radius == 0 )
|
||||
op1e_min_radius++;
|
||||
|
||||
if( op1e_max_path_radius >= op1e_min_radius )
|
||||
op1e_min_radius = op1e_max_path_radius+1;
|
||||
|
||||
if( op1e_max_radius > op1e_max_path_radius )
|
||||
op1e_max_path_radius = op1e_max_radius;
|
||||
|
||||
op1e_lcv_radius = op1e_min_radius;
|
||||
op1e_lcv_steps = op1e_min_radius;
|
||||
|
||||
op1e_lcv_turns = 6;
|
||||
op1e_turn = 0;
|
||||
|
||||
op1e_x = op3e_x;
|
||||
op1e_y = op3e_y;
|
||||
|
||||
for( lcv = 0; lcv < op1e_min_radius; lcv++ )
|
||||
DSP3_OP1E_D( op1e_turn, &op1e_x, &op1e_y );
|
||||
|
||||
DSP3_OP1E_C1();
|
||||
}
|
||||
|
||||
|
||||
void DSP3_OP1E_C1()
|
||||
{
|
||||
int lcv;
|
||||
|
||||
if( op1e_lcv_steps == 0 ) {
|
||||
op1e_lcv_radius++;
|
||||
|
||||
op1e_lcv_steps = op1e_lcv_radius;
|
||||
|
||||
op1e_x = op3e_x;
|
||||
op1e_y = op3e_y;
|
||||
|
||||
for( lcv = 0; lcv < op1e_lcv_radius; lcv++ )
|
||||
DSP3_OP1E_D( op1e_turn, &op1e_x, &op1e_y );
|
||||
}
|
||||
|
||||
if( op1e_lcv_radius > op1e_max_radius ) {
|
||||
op1e_turn++;
|
||||
op1e_lcv_turns--;
|
||||
|
||||
op1e_lcv_radius = op1e_min_radius;
|
||||
op1e_lcv_steps = op1e_min_radius;
|
||||
|
||||
op1e_x = op3e_x;
|
||||
op1e_y = op3e_y;
|
||||
|
||||
for( lcv = 0; lcv < op1e_min_radius; lcv++ )
|
||||
DSP3_OP1E_D( op1e_turn, &op1e_x, &op1e_y );
|
||||
}
|
||||
|
||||
if( op1e_lcv_turns == 0 ) {
|
||||
DSP3_DR = 0xffff;
|
||||
DSP3_SR = 0x0080;
|
||||
SetDSP3 = &DSP3_Reset;
|
||||
return;
|
||||
}
|
||||
|
||||
DSP3_DR = (uint8)(op1e_x) | ((uint8)(op1e_y)<<8);
|
||||
DSP3_OP03();
|
||||
|
||||
op1e_cell = DSP3_DR;
|
||||
|
||||
DSP3_SR = 0x0080;
|
||||
SetDSP3 = &DSP3_OP1E_C2;
|
||||
}
|
||||
|
||||
|
||||
void DSP3_OP1E_C2()
|
||||
{
|
||||
DSP3_DR = op1e_weight[ op1e_cell ];
|
||||
|
||||
DSP3_OP1E_D( (int16)(op1e_turn+2), &op1e_x, &op1e_y );
|
||||
op1e_lcv_steps--;
|
||||
|
||||
DSP3_SR = 0x0084;
|
||||
SetDSP3 = &DSP3_OP1E_C1;
|
||||
}
|
||||
|
||||
|
||||
void DSP3_OP1E_D( int16 move, int16 *lo, int16 *hi )
|
||||
{
|
||||
uint32 dataOfs = ((move << 1) + 0x03b2) & 0x03ff;
|
||||
int16 Lo;
|
||||
int16 Hi;
|
||||
|
||||
DSP3_AddHi = DSP3_DataROM[dataOfs];
|
||||
DSP3_AddLo = DSP3_DataROM[dataOfs + 1];
|
||||
|
||||
Lo = (uint8)(*lo);
|
||||
Hi = (uint8)(*hi);
|
||||
|
||||
if (Lo & 1) Hi += (DSP3_AddLo & 1);
|
||||
|
||||
DSP3_AddLo += Lo;
|
||||
DSP3_AddHi += Hi;
|
||||
|
||||
if (DSP3_AddLo < 0)
|
||||
DSP3_AddLo += DSP3_WinLo;
|
||||
else
|
||||
if (DSP3_AddLo >= DSP3_WinLo)
|
||||
DSP3_AddLo -= DSP3_WinLo;
|
||||
|
||||
if (DSP3_AddHi < 0)
|
||||
DSP3_AddHi += DSP3_WinHi;
|
||||
else
|
||||
if (DSP3_AddHi >= DSP3_WinHi)
|
||||
DSP3_AddHi -= DSP3_WinHi;
|
||||
|
||||
*lo = DSP3_AddLo;
|
||||
*hi = DSP3_AddHi;
|
||||
}
|
||||
|
||||
|
||||
void DSP3_OP1E_D1( int16 move, int16 *lo, int16 *hi )
|
||||
{
|
||||
uint32 dataOfs = ((move << 1) + 0x03b2) & 0x03ff;
|
||||
int16 Lo;
|
||||
int16 Hi;
|
||||
|
||||
const unsigned short HiAdd[] = {
|
||||
0x00, 0xFF, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00,
|
||||
0x00, 0xFF, 0xFF, 0x00, 0x01, 0x00, 0xFF, 0x00
|
||||
};
|
||||
const unsigned short LoAdd[] = {
|
||||
0x00, 0x00, 0x01, 0x01, 0x00, 0xFF, 0xFF, 0x00
|
||||
};
|
||||
|
||||
if( (*lo) & 1 )
|
||||
DSP3_AddHi = HiAdd[ move + 8 ];
|
||||
else
|
||||
DSP3_AddHi = HiAdd[ move + 0 ];
|
||||
DSP3_AddLo = LoAdd[ move ];
|
||||
|
||||
Lo = (uint8)(*lo);
|
||||
Hi = (uint8)(*hi);
|
||||
|
||||
if (Lo & 1) Hi += (DSP3_AddLo & 1);
|
||||
|
||||
DSP3_AddLo += Lo;
|
||||
DSP3_AddHi += Hi;
|
||||
|
||||
*lo = DSP3_AddLo;
|
||||
*hi = DSP3_AddHi;
|
||||
}
|
||||
|
||||
|
||||
void DSP3_OP10()
|
||||
{
|
||||
if( DSP3_DR == 0xffff ) {
|
||||
DSP3_Reset();
|
||||
} else {
|
||||
// absorb 2 bytes
|
||||
DSP3_DR = DSP3_DR;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DSP3_OP0C_A()
|
||||
{
|
||||
// absorb 2 bytes
|
||||
|
||||
DSP3_DR = 0;
|
||||
SetDSP3 = &DSP3_Reset;
|
||||
}
|
||||
|
||||
|
||||
void DSP3_OP0C()
|
||||
{
|
||||
// absorb 2 bytes
|
||||
|
||||
DSP3_DR = 0;
|
||||
//SetDSP3 = &DSP3_OP0C_A;
|
||||
SetDSP3 = &DSP3_Reset;
|
||||
}
|
||||
|
||||
|
||||
void DSP3_OP1C_C()
|
||||
{
|
||||
// return 2 bytes
|
||||
DSP3_DR = 0;
|
||||
SetDSP3 = &DSP3_Reset;
|
||||
}
|
||||
|
||||
|
||||
void DSP3_OP1C_B()
|
||||
{
|
||||
// absorb 2 bytes
|
||||
|
||||
// return 2 bytes
|
||||
DSP3_DR = 0;
|
||||
SetDSP3 = &DSP3_OP1C_C;
|
||||
}
|
||||
|
||||
|
||||
void DSP3_OP1C_A()
|
||||
{
|
||||
// absorb 2 bytes
|
||||
|
||||
SetDSP3 = &DSP3_OP1C_B;
|
||||
}
|
||||
|
||||
|
||||
void DSP3_OP1C()
|
||||
{
|
||||
// absorb 2 bytes
|
||||
|
||||
SetDSP3 = &DSP3_OP1C_A;
|
||||
}
|
||||
|
||||
|
||||
void DSP3_Command()
|
||||
{
|
||||
if (DSP3_DR < 0x40)
|
||||
{
|
||||
switch (DSP3_DR)
|
||||
{
|
||||
case 0x02: SetDSP3 = &DSP3_Coordinate; break;
|
||||
case 0x03: SetDSP3 = &DSP3_OP03; break;
|
||||
case 0x06: SetDSP3 = &DSP3_OP06; break;
|
||||
case 0x07: SetDSP3 = &DSP3_OP07; return;
|
||||
case 0x0f: SetDSP3 = &DSP3_TestMemory; break;
|
||||
case 0x18: SetDSP3 = &DSP3_Convert; break;
|
||||
case 0x1f: SetDSP3 = &DSP3_MemoryDump; break;
|
||||
case 0x2f: SetDSP3 = &DSP3_MemorySize; break;
|
||||
case 0x38: SetDSP3 = &DSP3_Decode; break;
|
||||
case 0x02: SetDSP3 = &DSP3_Coordinate; break;
|
||||
case 0x03: SetDSP3 = &DSP3_OP03; break;
|
||||
case 0x06: SetDSP3 = &DSP3_OP06; break;
|
||||
case 0x07: SetDSP3 = &DSP3_OP07; return;
|
||||
case 0x0c: SetDSP3 = &DSP3_OP0C; break;
|
||||
case 0x0f: SetDSP3 = &DSP3_TestMemory; break;
|
||||
case 0x10: SetDSP3 = &DSP3_OP10; break;
|
||||
case 0x18: SetDSP3 = &DSP3_Convert; break;
|
||||
case 0x1c: SetDSP3 = &DSP3_OP1C; break;
|
||||
case 0x1e: SetDSP3 = &DSP3_OP1E; break;
|
||||
case 0x1f: SetDSP3 = &DSP3_MemoryDump; break;
|
||||
case 0x38: SetDSP3 = &DSP3_Decode; break;
|
||||
case 0x3e: SetDSP3 = &DSP3_OP3E; break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
DSP3_SR = 0x0080;
|
||||
DSP3_Index = 0;
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
|
||||
EXTSYM KeyRewind,statesaver,Voice0Status,UpdateDPage
|
||||
EXTSYM StartGUI,debuggeron,romdata,initvideo
|
||||
EXTSYM vidbufferofsa,disable65816sh,GUISaveVars,virqnodisable
|
||||
EXTSYM vidbufferofsa,disable65816sh,GUISaveVars
|
||||
EXTSYM KeySaveState,KeyLoadState,KeyQuickExit,KeyQuickLoad,KeyQuickRst
|
||||
EXTSYM GUIDoReset,GUIReset,KeyOnStA,KeyOnStB,ProcessKeyOn,C4Enable,KeyQuickClock
|
||||
EXTSYM KeyQuickSaveSPC,TimerEnable,IRQHack,splitflags,joinflags
|
||||
EXTSYM KeyQuickSaveSPC,TimerEnable,splitflags,joinflags
|
||||
EXTSYM KeyQuickSnapShot,csounddisable,videotroub,ResetTripleBuf
|
||||
EXTSYM Output_Text,Check_Key,Get_Key,Change_Dir
|
||||
EXTSYM InitPreGame,Curtableaddr,curcyc,debugdisble,dmadata,guioff,memtabler8
|
||||
@@ -157,8 +157,6 @@ VoiceStartMute:
|
||||
|
||||
%macro ProcessIRQStuff 0
|
||||
; check for VIRQ/HIRQ
|
||||
cmp byte[virqnodisable],1
|
||||
je %%virqdo
|
||||
test dl,04h
|
||||
jnz %%virqdo
|
||||
cmp byte[doirqnext],1
|
||||
@@ -167,7 +165,6 @@ VoiceStartMute:
|
||||
test byte[INTEnab],20h
|
||||
jz near %%novirq
|
||||
mov ax,[VIRQLoc]
|
||||
add ax,[IRQHack]
|
||||
cmp ax,[resolutn]
|
||||
jne %%notres
|
||||
dec ax
|
||||
@@ -1543,7 +1540,6 @@ NEWSYM cpuover
|
||||
.novblch
|
||||
mov byte[NMIEnab],01h
|
||||
call starthdma
|
||||
.noirqhack
|
||||
; check for VIRQ/HIRQ/NMI
|
||||
ProcessIRQStuff
|
||||
xor ebx,ebx
|
||||
|
||||
@@ -709,8 +709,6 @@ reg213Cr:
|
||||
|
||||
; V counter data by external or software latch
|
||||
reg213Dr:
|
||||
cmp byte[latchyr],2 ; hack for games that don't read 213F
|
||||
je .noreset
|
||||
cmp byte[latchyr],1
|
||||
je .highv
|
||||
mov al,[latchy]
|
||||
@@ -722,11 +720,7 @@ reg213Dr:
|
||||
or al,byte[latchy+1]
|
||||
mov byte[latchyr],0
|
||||
ret
|
||||
.noreset
|
||||
mov al,[latchy]
|
||||
and al,0FEh
|
||||
or al,byte[latchy+1]
|
||||
ret
|
||||
|
||||
; PPU Status Flag & Version number (OBJ over flags)
|
||||
reg213Er:
|
||||
mov al,01h
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
EXTSYM initsfxregsw,reg420Bw,reg420Cw,regptw,initSA1regsw,SDD1Reset
|
||||
EXTSYM SPC7110Reset,RTCReset2,debstop,NextLineCache,vidmemch2,vidmemch4
|
||||
EXTSYM vidmemch8,vrama,nmirept,sndwrit,SPCRAM,HIRQCycNext,HIRQNextExe,HIRQSkip
|
||||
EXTSYM vidmemch8,vrama,nmirept,sndwrit,SPCRAM,HIRQCycNext,HIRQNextExe
|
||||
EXTSYM cycpb268,cycpb358,cycpbl,cycpblt,opexec268,opexec268cph,opexec358
|
||||
EXTSYM opexec358cph
|
||||
|
||||
@@ -1406,8 +1406,6 @@ reg4206w:
|
||||
|
||||
|
||||
DetermineHIRQExec
|
||||
cmp byte[HIRQSkip],1
|
||||
je near .ret
|
||||
add dh,[HIRQCycNext]
|
||||
mov byte[HIRQCycNext],0
|
||||
mov byte[HIRQNextExe],0
|
||||
@@ -1428,7 +1426,6 @@ DetermineHIRQExec
|
||||
.notokay
|
||||
pop ecx
|
||||
pop eax
|
||||
.ret
|
||||
ret
|
||||
.hirqokay
|
||||
sub dh,cl
|
||||
|
||||
@@ -139,7 +139,6 @@ NEWSYM init
|
||||
inc eax
|
||||
dec ecx
|
||||
jnz .rbackupl
|
||||
mov byte[virqnodisable],0
|
||||
pushad
|
||||
call clearmem
|
||||
popad
|
||||
@@ -991,13 +990,8 @@ NEWSYM disableeffects, db 0
|
||||
NEWSYM hdmaearlstart, db 0
|
||||
NEWSYM disable65816sh, db 0
|
||||
NEWSYM disablespcclr, db 0
|
||||
NEWSYM virqnodisable, db 0
|
||||
NEWSYM numspcvblleft, dd 0
|
||||
NEWSYM spc700idle, dd 0
|
||||
NEWSYM IRQHack, dw 0
|
||||
NEWSYM CacheCheckSkip, db 0
|
||||
NEWSYM HIRQSkip, db 0
|
||||
NEWSYM ClearScreenSkip, db 0
|
||||
NEWSYM ENVDisable, db 0
|
||||
SECTION .text
|
||||
|
||||
@@ -1022,7 +1016,6 @@ SECTION .bss
|
||||
NEWSYM ReturnFromSPCStall, resb 1
|
||||
NEWSYM SPCStallSetting, resb 1
|
||||
NEWSYM SPCSkipXtraROM, resb 1
|
||||
NEWSYM WindowDisables, resd 1
|
||||
SECTION .text
|
||||
|
||||
%macro helpclearmem 2
|
||||
|
||||
@@ -1421,10 +1421,7 @@ Would be nice to trash this section in the future
|
||||
|
||||
extern unsigned char disablehdma;
|
||||
extern unsigned char hdmaearlstart;
|
||||
extern unsigned int WindowDisables;
|
||||
extern unsigned char ClearScreenSkip;
|
||||
extern unsigned char ENVDisable;
|
||||
extern unsigned char latchyr;
|
||||
extern unsigned char cycpb268;
|
||||
extern unsigned char cycpb358;
|
||||
extern unsigned char cycpbl2;
|
||||
@@ -1440,7 +1437,6 @@ extern unsigned char opexec358cph;
|
||||
extern unsigned char opexec268cphb;
|
||||
extern unsigned char opexec358cphb;
|
||||
extern unsigned char DSP1Type;
|
||||
extern unsigned char cycpl;
|
||||
unsigned char HacksDisable;
|
||||
|
||||
void headerhack()
|
||||
@@ -1448,8 +1444,6 @@ void headerhack()
|
||||
char *RomData = (char *)romdata;
|
||||
disablehdma = 0;
|
||||
hdmaearlstart = 0;
|
||||
WindowDisables = 0;
|
||||
ClearScreenSkip = 0;
|
||||
ENVDisable = 0;
|
||||
|
||||
if ((curromspace < Lo) || (HacksDisable && !DSP1Type))
|
||||
@@ -1460,6 +1454,7 @@ void headerhack()
|
||||
//These next few look like RAM init hacks, should be looked into
|
||||
|
||||
//Should be Super Famista (J), uses non-standard characters
|
||||
//Shows black screen after one screen.
|
||||
if (!strncmp((RomData+Lo),"\x0bd\x0b0\x0ca\x0df\x0b0\x0cc\x0a7\x0d0\x0bd\x0c0 " ,16))
|
||||
{
|
||||
RomData[0x2762F] = 0xEA;
|
||||
@@ -1467,6 +1462,7 @@ void headerhack()
|
||||
}
|
||||
|
||||
//Should be Super Famista 2 (J), uses non-standard characters
|
||||
//Shows black screen after loading the ROM.
|
||||
if (!strncmp((RomData+Lo),"\x0bd\x0b0\x0ca\x0df\x0b0\x0cc\x0a7\x0d0\x0bd\x0c0 \x032 " ,16))
|
||||
{
|
||||
//Skip a check for value FF at 2140 when spc not initialized yet?!?
|
||||
@@ -1477,26 +1473,17 @@ void headerhack()
|
||||
RomData[0x6CFA] = 0xEA;
|
||||
}
|
||||
|
||||
//Kamen Rider (J)
|
||||
if (!strncmp((RomData+Lo),"SFC \x0b6\x0d2\x0dd\x0d7\x0b2\x0c0\x0de\x0b0 " ,16))
|
||||
{
|
||||
latchyr = 2;
|
||||
}
|
||||
|
||||
//Deae Tonosama Appare Ichiban (J)
|
||||
//Shows some screen and hangs there.
|
||||
if (!strncmp((RomData+Lo),"\x0c3\x0de\x0b1\x0b4\x0c4\x0c9\x0bb\x0cf \x0b1\x0af\x0ca" ,12))
|
||||
{
|
||||
RomData[0x17837] = 0xEA;
|
||||
RomData[0x17838] = 0xEA;
|
||||
RomData[0x17837C] = 0xEA;
|
||||
RomData[0x17837D] = 0xEA;
|
||||
}
|
||||
|
||||
/*
|
||||
The asm indicates the hack is for HGP3, but all of these are affected
|
||||
Human Grand Prix (J), Human Grand Prix II (J),
|
||||
Human Grand Prix III - F1 Triple Battle (J).
|
||||
Human Grand Prix IV is a HiROM and is not affected
|
||||
*/
|
||||
if (!strncmp((RomData+Lo),"HUMAN GRANDP" ,12))
|
||||
//Human Grand Prix III - F1 Triple Battle (J)
|
||||
//Shows black screen after loading the ROM.
|
||||
if (!strncmp((RomData+Lo),"HUMAN GRANDPRIX 3 " ,20))
|
||||
{
|
||||
cycpb268 = 135;
|
||||
cycpb358 = 157;
|
||||
@@ -1507,34 +1494,23 @@ void headerhack()
|
||||
}
|
||||
|
||||
//Accele Brid (J)
|
||||
//Hangs after some time in the first level.
|
||||
if (!strncmp((RomData+Lo),"ACCELEBRID " ,12))
|
||||
{
|
||||
RomData[0x34DA2] = 0;
|
||||
RomData[0x34DA3] = 0;
|
||||
}
|
||||
|
||||
//Battle Grand Prix (J)
|
||||
if (!strncmp((RomData+Lo),"BATTLE GRAND" ,12))
|
||||
{
|
||||
RomData[0x18089] = 0xFB;
|
||||
RomData[0x6C95] = 0xFB;
|
||||
}
|
||||
|
||||
//Neugier (J), and it's English translation
|
||||
if (!strncmp((RomData+Lo),"NEUGIER " ,12) ||
|
||||
!strncmp((RomData+Lo),"Neugier (tr." ,12))
|
||||
{
|
||||
RomData[0xD4150] = 0xF9;
|
||||
}
|
||||
|
||||
//Home Alone (J/E/U)
|
||||
if (!strncmp((RomData+Lo),"HOME ALO" ,8))
|
||||
//Hangs after starting a new game.
|
||||
if (!strncmp((RomData+Lo),"HOME ALONE " ,12))
|
||||
{
|
||||
RomData[0x666B] = 0xEE;
|
||||
RomData[0x666C] = 0xBC;
|
||||
}
|
||||
|
||||
//Emerald Dragon (J)
|
||||
//Hangs while drawing the logo after loading the ROM.
|
||||
if (!strncmp((RomData+Hi),"EMERALD DRAG" ,12))
|
||||
{
|
||||
ENVDisable = true;
|
||||
@@ -1544,6 +1520,7 @@ void headerhack()
|
||||
Super Mario World 2 - Yoshi's Island (U/E),
|
||||
Super Mario - Yossy Island (J), and variants
|
||||
*/
|
||||
//Probably some GFX bugs.
|
||||
if (!strncmp((RomData+Lo),"YOSSY'S ISLA" ,12) ||
|
||||
!strncmp((RomData+Lo),"YOSHI'S ISLA" ,12))
|
||||
{
|
||||
@@ -1552,17 +1529,6 @@ void headerhack()
|
||||
opexec358 = 126;
|
||||
}
|
||||
|
||||
//Bubsy II (U/E)
|
||||
if (!strncmp((RomData+Hi),"BUBSY II" ,8))
|
||||
{
|
||||
cycpb268 = 125;
|
||||
cycpb358 = 147;
|
||||
cycpbl2 = 125;
|
||||
cycpblt2 = 125;
|
||||
cycpbl = 125;
|
||||
cycpblt = 125;
|
||||
}
|
||||
|
||||
/*
|
||||
Marvelous (J) has this hack in the asm, but disabled
|
||||
|
||||
@@ -1571,6 +1537,7 @@ void headerhack()
|
||||
!strncmp((RomData+Lo),"REND", 4))
|
||||
*/
|
||||
//Rendering Ranger R2
|
||||
//Shows black screen after loading the ROM.
|
||||
if (!strncmp((RomData+Lo),"REND", 4))
|
||||
{
|
||||
cycpb268 = 157;
|
||||
@@ -1582,6 +1549,7 @@ void headerhack()
|
||||
}
|
||||
|
||||
//Clay Fighter (U), other versions are CLAYFIGHTER with no space
|
||||
//Hangs in the intro. Missing sound in battles.
|
||||
if (!strncmp((RomData+Hi),"CLAY FIGHTER " ,16))
|
||||
{
|
||||
//Intro
|
||||
@@ -1593,12 +1561,16 @@ void headerhack()
|
||||
}
|
||||
|
||||
//Bahamut Lagoon (J) and all known translations
|
||||
//Garbled lines in the intro at some point on the bottom.
|
||||
if (!strncmp((RomData+Hi),"Bahamut Lago" ,12))
|
||||
{
|
||||
RomData[0x10254] = 0xEE;
|
||||
}
|
||||
|
||||
//Mortal Kombat (J/U/E), Super Punch-Out, Dragon Quest 5 (J)
|
||||
//Messed up damage bar in battles. (Mortal Kombat)
|
||||
//Messed up countdown. (Super Punch-Out)
|
||||
//Flickering clouds in intro after starting a new game. (DQ5)
|
||||
if (!strncmp((RomData+Lo),"DRAGONQUEST5" ,12) ||
|
||||
!strncmp((RomData+Lo),"MORTAL KOMBAT " ,16) ||
|
||||
!strncmp((RomData+Lo),"Super Punch-Out!! ", 20))
|
||||
@@ -1606,19 +1578,10 @@ void headerhack()
|
||||
disablehdma = true;
|
||||
}
|
||||
|
||||
//Super Final Match Tennis (J)
|
||||
if (!strncmp((RomData+Lo),"SP F", 4))
|
||||
{
|
||||
cycpb268 = 145;
|
||||
cycpb358 = 147;
|
||||
cycpbl2 = 145;
|
||||
cycpblt2 = 145;
|
||||
cycpbl = 145;
|
||||
cycpblt = 145;
|
||||
}
|
||||
|
||||
//Tuff E Nuff (U/E), Dead Dance (J),
|
||||
//Cyber Knight II - Tikyu Teikoku no Yabou (J)
|
||||
//Shows black screen after loading the ROM. (Tuff E Nuff, Dead Dance)
|
||||
//Shows black screen after two screens. (Cyber Knight II)
|
||||
if (!strncmp((RomData+Lo),"CYBER KNIGHT 2 " ,16) ||
|
||||
!strncmp((RomData+Lo),"DEAD", 4) ||
|
||||
!strncmp((RomData+Lo),"TUFF", 4))
|
||||
@@ -1634,14 +1597,8 @@ void headerhack()
|
||||
//Okaaay...
|
||||
if(DSP1Type) { disablehdma = true; }
|
||||
|
||||
//Lamborghini - American Challenge (U/E)
|
||||
if (!strncmp((RomData+Lo), "LAMBORGHINI AMERICAN", 20))
|
||||
{
|
||||
opexec268 = 187;
|
||||
opexec358 = 187;
|
||||
}
|
||||
|
||||
//Addams Family Values (U/E)
|
||||
//Restarts or shows a black screen after starting a new game.
|
||||
if (!strncmp((RomData+Lo), "ADDAMS FAMILY VALUES", 20))
|
||||
{
|
||||
opexec268 = 120;
|
||||
@@ -1649,6 +1606,7 @@ void headerhack()
|
||||
}
|
||||
|
||||
//Front Mission
|
||||
//Flickering worldmap and statusbar.
|
||||
if (!strncmp((RomData+Hi), "\x0cc\x0db\x0dd\x0c4\x0d0\x0af\x0bc\x0ae", 8) ||
|
||||
!strncmp((RomData+Hi), "FRONT MI", 8))
|
||||
{
|
||||
|
||||
@@ -440,9 +440,7 @@ NEWSYM Get_Key
|
||||
; for extended keys, return a 0, then the extended key afterwards
|
||||
xor eax,eax
|
||||
.nokey
|
||||
pushad
|
||||
call JoyRead
|
||||
popad
|
||||
; call JoyRead
|
||||
mov al,[CurKeyReadPos]
|
||||
cmp al,[CurKeyPos]
|
||||
je .nokey
|
||||
@@ -777,7 +775,6 @@ db '256x224 R W',0 ;0
|
||||
db '256x224 R F',0 ;1
|
||||
db '512x448 DR W',0 ;2
|
||||
db '512x448 DR F',0 ;3
|
||||
db '640x480 DS W',0 ;4
|
||||
db '640x480 DR F',0 ;4
|
||||
db '800x600 DR F',0 ;5
|
||||
%ifdef __OPENGL__
|
||||
@@ -803,30 +800,30 @@ db 'VARIABLE OD W',0 ;21
|
||||
; Video Mode Feature Availability (1 = Available, 0 = Not Available)
|
||||
; Left side starts with Video Mode 0
|
||||
; vid mode column = 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1
|
||||
NEWSYM GUI16VID, db 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ; 16-bit mode
|
||||
NEWSYM GUINGVID, db 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ; New Graphics Engine
|
||||
NEWSYM GUISLVID, db 0,0,0,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ; Scanlines
|
||||
NEWSYM GUIINVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (DOS Interpolation)
|
||||
NEWSYM GUII2VID, db 0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Interpolation
|
||||
NEWSYM GUIEAVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (DOS Eagle)
|
||||
NEWSYM GUIIEVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (DOSEagle+Int)
|
||||
NEWSYM GUIFSVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (DOS Fullscreen)
|
||||
NEWSYM GUIWSVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (DOS Widescreen)
|
||||
NEWSYM GUISSVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (DOS Smallscreen)
|
||||
NEWSYM GUITBVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (DOS Triple Buffer)
|
||||
NEWSYM GUIHSVID, db 0,0,0,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ; Half/Quarter Scanlines
|
||||
NEWSYM GUI2xVID, db 0,0,0,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ; 2xSaI/Super Engines
|
||||
NEWSYM GUIM7VID, db 0,0,0,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ; Hires Mode 7
|
||||
NEWSYM GUIWFVID, db 0,0,1,0,0,1,1,0,0,1,0,0,0,1,0,0,1,0,0,1,1,1,0 ; Fullscreen
|
||||
NEWSYM GUIDSIZE, db 0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; D modes
|
||||
NEWSYM GUIRATIO, db 0,0,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Ratio-Fullscreen modes
|
||||
NEWSYM GUIBIFIL, db 0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ; SDL Bilinear Filter
|
||||
NEWSYM GUITBWVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (Win Triple Buffer)
|
||||
NEWSYM GUIHQ2X, db 0,0,0,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1 ; hq2x filter
|
||||
NEWSYM GUIHQ3X, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (hq3x filter)
|
||||
NEWSYM GUIHQ4X, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (hq4x filter)
|
||||
NEWSYM GUIRESIZE, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 ; SDL Resizable
|
||||
NEWSYM GUINTVID, db 0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; NTSC Filter
|
||||
NEWSYM GUI16VID, db 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ; 16-bit mode
|
||||
NEWSYM GUINGVID, db 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ; New Graphics Engine
|
||||
NEWSYM GUISLVID, db 0,0,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ; Scanlines
|
||||
NEWSYM GUIINVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (DOS Interpolation)
|
||||
NEWSYM GUII2VID, db 0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Interpolation
|
||||
NEWSYM GUIEAVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (DOS Eagle)
|
||||
NEWSYM GUIIEVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (DOS Eagle+Int)
|
||||
NEWSYM GUIFSVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (DOS Fullscreen)
|
||||
NEWSYM GUIWSVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (DOS Widescreen)
|
||||
NEWSYM GUISSVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (DOS Smallscreen)
|
||||
NEWSYM GUITBVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (DOS Triple Buffer)
|
||||
NEWSYM GUIHSVID, db 0,0,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ; Half/Quarter Scanlines
|
||||
NEWSYM GUI2xVID, db 0,0,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ; 2xSaI/Super Engines
|
||||
NEWSYM GUIM7VID, db 0,0,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ; Hires Mode 7
|
||||
NEWSYM GUIWFVID, db 0,1,0,1,1,1,0,0,1,0,0,0,1,0,0,1,0,0,1,1,1,0 ; Fullscreen
|
||||
NEWSYM GUIDSIZE, db 0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; D modes
|
||||
NEWSYM GUIRATIO, db 0,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Ratio-Fullscreen modes
|
||||
NEWSYM GUIBIFIL, db 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ; SDL Bilinear Filter
|
||||
NEWSYM GUITBWVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (Win Triple Buffer)
|
||||
NEWSYM GUIHQ2X, db 0,0,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1 ; hq2x filter
|
||||
NEWSYM GUIHQ3X, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (hq3x filter)
|
||||
NEWSYM GUIHQ4X, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (hq4x filter)
|
||||
NEWSYM GUIRESIZE, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 ; SDL Resizable
|
||||
NEWSYM GUINTVID, db 0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; NTSC Filter
|
||||
|
||||
SECTION .text
|
||||
|
||||
|
||||
@@ -103,8 +103,8 @@ unsigned char opexec268 = 155; // # of opcodes/scanline in 2.68Mhz mode
|
||||
unsigned char opexec358 = 142; // # of opcodes/scanline in 3.58Mhz mode (228/180)
|
||||
unsigned char opexec268cph = 42; // # of opcodes/hblank in 2.68Mhz mode
|
||||
unsigned char opexec358cph = 45; // # of opcodes/hblank in 3.58Mhz mode (56/50)
|
||||
unsigned char opexec268b = 142; // # of opcodes/scanline in 2.68Mhz mode
|
||||
unsigned char opexec358b = 155; // # of opcodes/scanline in 3.58Mhz mode (228/180)
|
||||
unsigned char opexec268b = 155; // # of opcodes/scanline in 2.68Mhz mode
|
||||
unsigned char opexec358b = 142; // # of opcodes/scanline in 3.58Mhz mode (228/180)
|
||||
unsigned char opexec268cphb = 42; // # of opcodes/hblank in 2.68Mhz mode
|
||||
unsigned char opexec358cphb = 45; // # of opcodes/hblank in 3.58Mhz mode (56/50)
|
||||
unsigned char debugdisble = 1; // debugger disable. 0 = no, 1 = yes
|
||||
|
||||
@@ -38,7 +38,7 @@ EXTSYM KeyStateSlc0,KeyStateSlc1,KeyStateSlc2,KeyStateSlc3,KeyStateSlc4
|
||||
EXTSYM KeyStateSlc5,KeyStateSlc6,KeyStateSlc7,KeyStateSlc8,KeyStateSlc9
|
||||
EXTSYM KeyIncStateSlot,KeyDecStateSlot,KeyUsePlayer1234,maxskip,DSPMem,dsp1ptr
|
||||
EXTSYM dsp1array,FastFwdToggle,SaveSramData,ngextbg,Mode7HiRes,Check60hz
|
||||
EXTSYM Get_MouseData,Get_MousePositionDisplacement,WindowDisables,scanlines
|
||||
EXTSYM Get_MouseData,Get_MousePositionDisplacement,scanlines
|
||||
EXTSYM romispal,MusicRelVol,MusicVol,WDSPReg0C,WDSPReg1C,Op02AAS,Op02AZS,Op02CX
|
||||
EXTSYM Op02CY,Op02FX,Op02FY,Op02FZ,Op02LES,Op02LFE,Op02VOF,Op02VVA,KeySlowDown
|
||||
EXTSYM genfulladdtab,KeyFRateDown,KeyFRateUp,KeyVolUp,KeyVolDown,KeyDisplayFPS
|
||||
@@ -250,10 +250,6 @@ NEWSYM cachevideo
|
||||
mov dword[scaddtngbx],0FFFFFFFFh
|
||||
mov byte[hiresstuff],0
|
||||
mov byte[Mode7HiRes],0
|
||||
cmp dword[WindowDisables],0
|
||||
je .nowindis
|
||||
dec dword[WindowDisables]
|
||||
.nowindis
|
||||
|
||||
call ClockCounter
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ EXTSYM colormodeofs,drawline16b,forceblnk,newengine8b,preparesprpr,scaddset
|
||||
EXTSYM spritetablea,sprleftpr,vidbright,ForceNewGfxOff,curypos,drawmode7
|
||||
EXTSYM mode7set,mosaicon,mosaicsz,sprleftpr1,sprleftpr2,sprleftpr3,sprlefttot
|
||||
EXTSYM sprprifix,drawmode7extbg,interlval,drawmode7extbg2,sprclprio,sprpriodata
|
||||
EXTSYM sprsingle,cachetile2b,cachetile4b,cachetile8b,vram,CacheCheckSkip
|
||||
EXTSYM sprsingle,cachetile2b,cachetile4b,cachetile8b,vram
|
||||
EXTSYM cachetile2b16x16,cachetile4b16x16,cachetile8b16x16,osm2dis,xtravbuf
|
||||
EXTSYM bg3ptr,bg3scrolx,bg3scroly,vidmemch4,ofsmcptr,ofsmady,ofsmadx,yposngom
|
||||
EXTSYM flipyposngom,ofsmtptr,ofsmmptr,ofsmcyps,bgtxadd,bg1ptrx,bg1ptry
|
||||
@@ -2435,11 +2435,9 @@ NEWSYM proc8x8
|
||||
shr eax,3
|
||||
and eax,63
|
||||
and ebx,07h
|
||||
cmp byte[CacheCheckSkip],1
|
||||
je .docache
|
||||
cmp byte[edi+eax],0
|
||||
jne .nocachereq
|
||||
.docache
|
||||
;.docache
|
||||
; cmp byte[ccud],0
|
||||
; jne .nocachereq
|
||||
mov byte[edi+eax],1
|
||||
|
||||
@@ -43,7 +43,7 @@ EXTSYM winbg1enval,winbg2enval,winbg3enval,winbg4enval,winbgobjenval
|
||||
EXTSYM winlogicaval,disableeffects,winenabs,scanlines,winl1,winbg1en,winobjen
|
||||
EXTSYM winlogica,winenabm,bgallchange,bg1change,bg2change,bg3change,bg4change
|
||||
EXTSYM hiresstuff,drawlineng16x84b,drawlineng16x82b,drawlinengom4b,WindowRedraw
|
||||
EXTSYM WindowDisables,winlogicb,ngwinptr,objwlrpos,objwen,objclineptr,CSprWinPtr
|
||||
EXTSYM winlogicb,ngwinptr,objwlrpos,objwen,objclineptr,CSprWinPtr
|
||||
|
||||
%include "video/vidmacro.mac"
|
||||
%include "video/newgfx2.mac"
|
||||
@@ -601,10 +601,6 @@ NEWSYM BuildWindow2
|
||||
NEWSYM BuildWindow
|
||||
cmp byte[WindowRedraw],1
|
||||
je .ns2
|
||||
cmp byte[WindowDisables],0
|
||||
je .nodisable
|
||||
ret
|
||||
.nodisable
|
||||
mov dword[valtemp],0EE00h
|
||||
push edx
|
||||
push ecx
|
||||
|
||||
@@ -516,7 +516,7 @@ NEWSYM Get_Key
|
||||
; for extended keys, return a 0, then the extended key afterwards
|
||||
xor eax,eax
|
||||
.nokey
|
||||
call JoyRead
|
||||
; call JoyRead
|
||||
mov al,[CurKeyReadPos]
|
||||
cmp al,[CurKeyPos]
|
||||
je .nokey
|
||||
|
||||
@@ -1955,7 +1955,7 @@ void initwinvideo(void)
|
||||
case 35:
|
||||
case 36:
|
||||
WindowWidth=1600;
|
||||
WindowHeight=1024;
|
||||
WindowHeight=1200;
|
||||
break;
|
||||
case 37:
|
||||
WindowWidth=1680;
|
||||
|
||||
Reference in New Issue
Block a user