Code cleanup, fixed jumps.
This commit is contained in:
@@ -138,7 +138,7 @@ SECTION .text
|
|||||||
;*******************************************************
|
;*******************************************************
|
||||||
%macro CommandJmp 2
|
%macro CommandJmp 2
|
||||||
cmp al,%1
|
cmp al,%1
|
||||||
je %2
|
je near %2
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro DevWriteX 1
|
%macro DevWriteX 1
|
||||||
@@ -246,7 +246,7 @@ NEWSYM DSP2Write8b
|
|||||||
.enter
|
.enter
|
||||||
; Tests halt flag
|
; Tests halt flag
|
||||||
test byte[dsp2state],DSP2F_HALT
|
test byte[dsp2state],DSP2F_HALT
|
||||||
jnz .halt
|
jnz near .halt
|
||||||
|
|
||||||
; *** Locates current predicator store
|
; *** Locates current predicator store
|
||||||
mov byte[dsp2input],al
|
mov byte[dsp2input],al
|
||||||
@@ -263,7 +263,7 @@ NEWSYM DSP2Write8b
|
|||||||
jnz .noaddrchk
|
jnz .noaddrchk
|
||||||
; *** Tests whether cx points expected address
|
; *** Tests whether cx points expected address
|
||||||
cmp [dsp2enforcer+4],cx
|
cmp [dsp2enforcer+4],cx
|
||||||
jne .gohalt
|
jne near .gohalt
|
||||||
.noaddrchk
|
.noaddrchk
|
||||||
; *** Reads next inside command should be proceeded
|
; *** Reads next inside command should be proceeded
|
||||||
mov al,[dsp2enforcer]
|
mov al,[dsp2enforcer]
|
||||||
@@ -300,7 +300,7 @@ NEWSYM DSP2Write8b
|
|||||||
mov byte[dsp2f0dSizeNew],al
|
mov byte[dsp2f0dSizeNew],al
|
||||||
|
|
||||||
test al,al
|
test al,al
|
||||||
jz .gohalt
|
jz near .gohalt
|
||||||
|
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
@@ -332,7 +332,7 @@ NEWSYM DSP2Write8b
|
|||||||
mov byte[dsp2f0dSizeOrg],al
|
mov byte[dsp2f0dSizeOrg],al
|
||||||
|
|
||||||
test al,al
|
test al,al
|
||||||
jz .gohalt
|
jz near .gohalt
|
||||||
|
|
||||||
mov dword[dsp2enforcer+0],0Ah
|
mov dword[dsp2enforcer+0],0Ah
|
||||||
mov dword[dsp2enforcer+4],8000h
|
mov dword[dsp2enforcer+4],8000h
|
||||||
@@ -374,7 +374,7 @@ NEWSYM DSP2Write8b
|
|||||||
EnterInsideCommand 6
|
EnterInsideCommand 6
|
||||||
|
|
||||||
cmp byte[dsp2input],0
|
cmp byte[dsp2input],0
|
||||||
je .gohalt
|
je near .gohalt
|
||||||
|
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
xor ecx,ecx
|
xor ecx,ecx
|
||||||
@@ -435,7 +435,7 @@ NEWSYM DSP2Write8b
|
|||||||
EnterInsideCommand 3
|
EnterInsideCommand 3
|
||||||
|
|
||||||
cmp byte[dsp2input],0
|
cmp byte[dsp2input],0
|
||||||
je .gohalt
|
je near .gohalt
|
||||||
|
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
.w03aloop
|
.w03aloop
|
||||||
|
|||||||
@@ -1609,9 +1609,9 @@ SECTION .text
|
|||||||
|
|
||||||
GUIPathKeys:
|
GUIPathKeys:
|
||||||
cmp dh,0
|
cmp dh,0
|
||||||
je .nokeypressed
|
je near .nokeypressed
|
||||||
cmp dword[GUIInputBox],0
|
cmp dword[GUIInputBox],0
|
||||||
je .nokeypressed
|
je near .nokeypressed
|
||||||
|
|
||||||
cmp dword[GUIInputBox],1
|
cmp dword[GUIInputBox],1
|
||||||
jne .notBox1
|
jne .notBox1
|
||||||
|
|||||||
@@ -2194,7 +2194,7 @@ DisplayGUIInputClick:
|
|||||||
mov eax,dword[keycontrolval]
|
mov eax,dword[keycontrolval]
|
||||||
cmp dword[eax],0
|
cmp dword[eax],0
|
||||||
pop eax
|
pop eax
|
||||||
je .lockInputChange
|
je near .lockInputChange
|
||||||
|
|
||||||
DGOptnsProcBox 45,150,[edi]
|
DGOptnsProcBox 45,150,[edi]
|
||||||
DGOptnsProcBox 45,140,[edi+4]
|
DGOptnsProcBox 45,140,[edi+4]
|
||||||
|
|||||||
@@ -5621,7 +5621,7 @@ SECTION .text
|
|||||||
call BlinkCursorCheck
|
call BlinkCursorCheck
|
||||||
cmp ebx,%4
|
cmp ebx,%4
|
||||||
pop ebx
|
pop ebx
|
||||||
jne %%fixreg
|
jne near %%fixreg
|
||||||
cmp byte[GUIBlinkCursor],' '
|
cmp byte[GUIBlinkCursor],' '
|
||||||
je %%three
|
je %%three
|
||||||
mov byte[GUIBlinkCursor],' '
|
mov byte[GUIBlinkCursor],' '
|
||||||
|
|||||||
@@ -167,21 +167,25 @@ void CheckIntl1(unsigned char *ROM)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SwapData(unsigned int *loc1, unsigned int *loc2, unsigned int amount)
|
||||||
|
{
|
||||||
|
unsigned int temp, i;
|
||||||
|
for (i = 0; i < amount; i++)
|
||||||
|
{
|
||||||
|
temp = loc1[i];
|
||||||
|
loc1[i] = loc2[i];
|
||||||
|
loc2[i] = temp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CheckIntlEHi(unsigned char *ROM)
|
void CheckIntlEHi(unsigned char *ROM)
|
||||||
{
|
{
|
||||||
if (EHiHeader(ROM, Lo))
|
if (EHiHeader(ROM, Lo))
|
||||||
{
|
{
|
||||||
unsigned int temp, i, oldNumBanks = NumofBanks,
|
unsigned int oldNumBanks = NumofBanks;
|
||||||
*loc1 = romdata,
|
|
||||||
*loc2 = romdata + ((NumofBytes - 0x400000)/4);
|
|
||||||
|
|
||||||
//Swap 4MB ROM with the other one
|
//Swap 4MB ROM with the other one
|
||||||
for (i = 0; i < 0x100000; i++)
|
SwapData(romdata, romdata+((NumofBytes-0x400000)/4), 0x100000);
|
||||||
{
|
|
||||||
temp = loc1[i];
|
|
||||||
loc1[i] = loc2[i];
|
|
||||||
loc2[i] = temp;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Deinterleave the 4MB ROM first
|
//Deinterleave the 4MB ROM first
|
||||||
NumofBanks = 128;
|
NumofBanks = 128;
|
||||||
@@ -216,24 +220,8 @@ void intlv1()
|
|||||||
//This is a mess, I wish we didn't need this, but it kicks the old asm code
|
//This is a mess, I wish we didn't need this, but it kicks the old asm code
|
||||||
void IntlEHi()
|
void IntlEHi()
|
||||||
{
|
{
|
||||||
unsigned int temp, i,
|
SwapData(romdata, romdata + 0x100000, 0x80000);
|
||||||
*loc1 = romdata,
|
SwapData(romdata + 0x80000, romdata + 0x100000, 0x80000);
|
||||||
*loc2 = romdata + 0x100000;
|
|
||||||
|
|
||||||
for (i = 0; i < 0x80000; i++)
|
|
||||||
{
|
|
||||||
temp = loc1[i];
|
|
||||||
loc1[i] = loc2[i];
|
|
||||||
loc2[i] = temp;
|
|
||||||
}
|
|
||||||
loc1 = romdata + 0x80000;
|
|
||||||
loc2 = romdata + 0x100000;
|
|
||||||
for (i = 0; i < 0x80000; i++)
|
|
||||||
{
|
|
||||||
temp = loc1[i];
|
|
||||||
loc1[i] = loc2[i];
|
|
||||||
loc2[i] = temp;
|
|
||||||
}
|
|
||||||
|
|
||||||
NumofBanks = 64;
|
NumofBanks = 64;
|
||||||
intlv1();
|
intlv1();
|
||||||
@@ -1467,7 +1455,7 @@ void SPC7_Convert_Upper()
|
|||||||
char *i = SPC7110filep;
|
char *i = SPC7110filep;
|
||||||
while (*i)
|
while (*i)
|
||||||
{
|
{
|
||||||
if (islower(*i)) { *i = toupper(*i); } //To make extension Upper case
|
*i = toupper(*i); //To make extension Upper case
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1477,7 +1465,7 @@ void SPC7_Convert_Lower()
|
|||||||
char *i = SPC7110filep;
|
char *i = SPC7110filep;
|
||||||
while (*i)
|
while (*i)
|
||||||
{
|
{
|
||||||
if (isupper(*i)) { *i = tolower(*i); } //To make everything Lower case
|
*i = tolower(*i); //To make everything Lower case
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user