NSRT Header support part 3.
This commit is contained in:
@@ -727,6 +727,12 @@ extern bool Sup48mbit;
|
|||||||
extern bool Sup16mbit;
|
extern bool Sup16mbit;
|
||||||
extern unsigned char snesmouse;
|
extern unsigned char snesmouse;
|
||||||
unsigned char snesinputdefault;
|
unsigned char snesinputdefault;
|
||||||
|
bool input1gp;
|
||||||
|
bool input1mouse;
|
||||||
|
bool input2gp;
|
||||||
|
bool input2mouse;
|
||||||
|
bool input2scope;
|
||||||
|
bool input2just;
|
||||||
void findZipIPS(char *);
|
void findZipIPS(char *);
|
||||||
void loadROM()
|
void loadROM()
|
||||||
{
|
{
|
||||||
@@ -809,6 +815,12 @@ void loadROM()
|
|||||||
}
|
}
|
||||||
|
|
||||||
snesmouse = 0;
|
snesmouse = 0;
|
||||||
|
input1gp = true;
|
||||||
|
input1mouse = true;
|
||||||
|
input2gp = true;
|
||||||
|
input2mouse = true;
|
||||||
|
input2scope = true;
|
||||||
|
input2just = true;
|
||||||
|
|
||||||
if (Header512)
|
if (Header512)
|
||||||
{
|
{
|
||||||
@@ -817,18 +829,84 @@ void loadROM()
|
|||||||
{
|
{
|
||||||
switch (ROM[0x1ED])
|
switch (ROM[0x1ED])
|
||||||
{
|
{
|
||||||
case 0: default: break;
|
default: break;
|
||||||
|
|
||||||
case 0x01: snesmouse = 2; break; //Mouse port 2
|
case 0:
|
||||||
case 0x03: snesmouse = 3; break; //Super Scope port 2
|
input1mouse = false;
|
||||||
case 0x04: break; //Super Scope or Gamepad port 2
|
input2mouse = false;
|
||||||
case 0x05: snesmouse = 4; break; //Justifier (Lethal Enforcer gun) port 2
|
input2scope = false;
|
||||||
case 0x06: break; //Multitap port 2
|
input2just = false;
|
||||||
case 0x08: break; //Mouse or Multitap port 2
|
break;
|
||||||
case 0x10: snesmouse = 1; break; //Mouse port 1
|
|
||||||
case 0x20: break; //Mouse or Gamepad port 1
|
case 0x01: //Mouse port 2
|
||||||
case 0x22: break; //Mouse or Gamepad port 1 and port 2
|
snesmouse = 2;
|
||||||
case 0x27: break; //Mouse or Gamepad port 1, Mouse, Super Scope, or Gamepad port 2
|
input2gp = false;
|
||||||
|
input2scope = false;
|
||||||
|
input2just = false;
|
||||||
|
input1mouse = false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x03: //Super Scope port 2
|
||||||
|
snesmouse = 3;
|
||||||
|
input2gp = false;
|
||||||
|
input2mouse = false;
|
||||||
|
input2just = false;
|
||||||
|
input1mouse = false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x04: //Super Scope or Gamepad port 2
|
||||||
|
snesmouse = 3;
|
||||||
|
input2mouse = false;
|
||||||
|
input2just = false;
|
||||||
|
input1mouse = false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x05: //Justifier (Lethal Enforcer gun) port 2
|
||||||
|
snesmouse = 4;
|
||||||
|
input2mouse = false;
|
||||||
|
input2scope = false;
|
||||||
|
input1mouse = false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x06: //Multitap port 2
|
||||||
|
input2gp = false;
|
||||||
|
input2mouse = false;
|
||||||
|
input2just = false;
|
||||||
|
input2scope = false;
|
||||||
|
input1mouse = false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x08: //Mouse or Multitap port 2
|
||||||
|
snesmouse = 2;
|
||||||
|
input2just = false;
|
||||||
|
input2scope = false;
|
||||||
|
input1mouse = false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x10: //Mouse port 1
|
||||||
|
snesmouse = 1;
|
||||||
|
input2mouse = false;
|
||||||
|
input2just = false;
|
||||||
|
input2scope = false;
|
||||||
|
input1gp = false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x20: //Mouse or Gamepad port 1
|
||||||
|
snesmouse = 1;
|
||||||
|
input2mouse = false;
|
||||||
|
input2just = false;
|
||||||
|
input2scope = false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x22: //Mouse or Gamepad port 1 and port 2
|
||||||
|
snesmouse = 1;
|
||||||
|
input2just = false;
|
||||||
|
input2scope = false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x27: //Mouse or Gamepad port 1, Mouse, Super Scope, or Gamepad port 2
|
||||||
|
input2just = false;
|
||||||
|
break;
|
||||||
|
|
||||||
case 0x99: break; //Lasabirdie
|
case 0x99: break; //Lasabirdie
|
||||||
case 0x0A: break; //Barcode Battler
|
case 0x0A: break; //Barcode Battler
|
||||||
|
|||||||
@@ -52,3 +52,46 @@ void allocspc7110()
|
|||||||
{
|
{
|
||||||
spc7110romptr = (unsigned char *)doMemAlloc(8192*1024+4096);
|
spc7110romptr = (unsigned char *)doMemAlloc(8192*1024+4096);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern bool input1gp;
|
||||||
|
extern bool input1mouse;
|
||||||
|
extern bool input2gp;
|
||||||
|
extern bool input2mouse;
|
||||||
|
extern bool input2scope;
|
||||||
|
extern bool input2just;
|
||||||
|
extern unsigned char snesmouse;
|
||||||
|
void cycleinputdevice()
|
||||||
|
{
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
snesmouse++;
|
||||||
|
if (snesmouse >= 5)
|
||||||
|
{
|
||||||
|
snesmouse = 0;
|
||||||
|
}
|
||||||
|
if (snesmouse == 0)
|
||||||
|
{
|
||||||
|
if (input1gp && input2gp) { return; }
|
||||||
|
snesmouse++;
|
||||||
|
}
|
||||||
|
if (snesmouse == 1)
|
||||||
|
{
|
||||||
|
if (input1mouse) { return; }
|
||||||
|
snesmouse++;
|
||||||
|
}
|
||||||
|
if (snesmouse == 2)
|
||||||
|
{
|
||||||
|
if (input2mouse) { return; }
|
||||||
|
snesmouse++;
|
||||||
|
}
|
||||||
|
if (snesmouse == 3)
|
||||||
|
{
|
||||||
|
if (input2scope) { return; }
|
||||||
|
snesmouse++;
|
||||||
|
}
|
||||||
|
if (snesmouse == 4)
|
||||||
|
{
|
||||||
|
if (input2just) { return; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -55,12 +55,12 @@ EXTSYM vcache8b,vidmemch8
|
|||||||
EXTSYM offsetmshl,NextLineCache
|
EXTSYM offsetmshl,NextLineCache
|
||||||
EXTSYM tltype2b
|
EXTSYM tltype2b
|
||||||
EXTSYM tltype8b,objwlrpos
|
EXTSYM tltype8b,objwlrpos
|
||||||
EXTSYM snesinputdefault
|
EXTSYM snesinputdefault,cycleinputdevice
|
||||||
|
|
||||||
|
|
||||||
NEWSYM VCacheAsmStart
|
NEWSYM VCacheAsmStart
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; Process stuff & Cache sprites
|
; Process stuff & Cache sprites
|
||||||
|
|
||||||
SECTION .bss
|
SECTION .bss
|
||||||
@@ -534,11 +534,9 @@ NEWSYM cachevideo
|
|||||||
test byte[pressed+eax],1
|
test byte[pressed+eax],1
|
||||||
je near .nodis7
|
je near .nodis7
|
||||||
mov byte[pressed+eax],2
|
mov byte[pressed+eax],2
|
||||||
inc byte[snesmouse]
|
pushad
|
||||||
cmp byte[snesmouse],5
|
call cycleinputdevice
|
||||||
jne .mousewrap
|
popad
|
||||||
mov byte[snesmouse],0
|
|
||||||
.mousewrap
|
|
||||||
mov dword[Msgptr],snesle
|
mov dword[Msgptr],snesle
|
||||||
cmp byte[snesmouse],0
|
cmp byte[snesmouse],0
|
||||||
jne .nom0
|
jne .nom0
|
||||||
|
|||||||
Reference in New Issue
Block a user