diff --git a/zsnes/src/chips/c4emu.c b/zsnes/src/chips/c4emu.c index 239d2cb8..36aeb48a 100644 --- a/zsnes/src/chips/c4emu.c +++ b/zsnes/src/chips/c4emu.c @@ -236,14 +236,14 @@ void C4CalcWireFrame() C4WFYVal=C4WFY2Val-C4WFYVal; if (abs(C4WFXVal)>abs(C4WFYVal)){ C4WFDist=abs(C4WFXVal)+1; - C4WFYVal=(256*(long)C4WFYVal)/abs(C4WFXVal); + C4WFYVal=(short)((256*(long)C4WFYVal)/abs(C4WFXVal)); if (C4WFXVal<0) C4WFXVal=-256; else C4WFXVal=256; } else if (C4WFYVal!=0) { C4WFDist=abs(C4WFYVal)+1; - C4WFXVal=(256*(long)C4WFXVal)/abs(C4WFYVal); + C4WFXVal=(short)((256*(long)C4WFXVal)/abs(C4WFYVal)); if (C4WFYVal<0) C4WFYVal=-256; else C4WFYVal=256; } diff --git a/zsnes/src/chips/seta10.c b/zsnes/src/chips/seta10.c index f5b51564..30ca8afc 100755 --- a/zsnes/src/chips/seta10.c +++ b/zsnes/src/chips/seta10.c @@ -39,7 +39,7 @@ void ST010DoCommand(void); typedef signed char int8; typedef unsigned char uint8; -typedef signed short int16; +typedef short int16; typedef unsigned short uint16; typedef int int32; typedef unsigned int uint32; diff --git a/zsnes/src/cpu/memory.asm b/zsnes/src/cpu/memory.asm index 1727900b..cec96858 100644 --- a/zsnes/src/cpu/memory.asm +++ b/zsnes/src/cpu/memory.asm @@ -26,19 +26,17 @@ EXTSYM C41FXVal,C41FYVal,C41FAngleRes,C41FDist,C4Op1F,C4Op15 EXTSYM C41FDistVal,C4Op0D,C4Op22,SinTable,CosTable EXTSYM SFXEnable,regptra,sfxramdata,snesmmap,wramdataa,C4Ram,C4Enable EXTSYM C4RamR,C4RamW,snesmap2,SPC7110Enable -EXTSYM DSP1Read16b -EXTSYM DSP1Write8b,regptwa,writeon +EXTSYM DSP1Write8b,regptwa,writeon,DSP1Read16b EXTSYM Bank0datr8,Bank0datw8,Bank0datr16,Bank0datw16,xd,SA1xd -EXTSYM DSP1Read8b,DSP1Type,SA1Enable -EXTSYM DSP1Write16b +EXTSYM DSP1Read8b,DSP1Type,SA1Enable,DSP1Write16b EXTSYM CurDecompPtr,PrevDecompPtr,CurDecompSize EXTSYM SPCDecmPtr,SPCCompPtr,SPCCompCounter -EXTSYM ramsize,ramsizeand,sram -EXTSYM ram7fa -EXTSYM DosExit,invalid,invopcd,previdmode,printhex8 +EXTSYM ramsize,ramsizeand,sram,ram7fa EXTSYM SA1Status,IRAM,CurBWPtr,SA1RAMArea EXTSYM SA1Overflow,OBCEnable EXTSYM Sdd1Mode,Sdd1Bank,Sdd1Addr,Sdd1NewAddr,memtabler8,AddrNoIncr,SDD1BankA +EXTSYM SDD1_init,SDD1_get_byte,BWShift,SA1BWPtr + ; C4SprScale @@ -2855,8 +2853,6 @@ NEWSYM regaccessbankr8mp ; enter : BL = bank number, CX = address location ; leave : AL = value read -EXTSYM BWShift,SA1BWPtr - %macro BWCheck 0 cmp byte[BWShift],0 jne near .shift @@ -4219,36 +4215,6 @@ NEWSYM eramaccessbankw16 mov [ram7fa+ecx],ax ret -;******************************************************* -; Invalid Access Bank (710000h-7DFFFFh) -;******************************************************* -NEWSYM invaccessbank - xor eax,eax - mov byte[invalid],1 - mov [invopcd],bl - mov al,[previdmode] - mov ah,0 - int 10h - mov ah,9 - mov edx,.invalidbank - int 21h - xor eax,eax - mov al,[invopcd] - call printhex8 - mov ah,2 - mov dl,13 - int 21h - mov ah,2 - mov dl,10 - int 21h - jmp DosExit - -SECTION .data -.invalidbank db 'Invalid Bank Access : $' -SECTION .text - ret - - ;******************************************************* ; SA-1 Bank Accesses ;******************************************************* @@ -4687,9 +4653,6 @@ SECTION .data NEWSYM LatestBank, dd 0FFFFh SECTION .text -EXTSYM SDD1_init -EXTSYM SDD1_get_byte - ; Software decompression version NEWSYM memaccessbankr8sdd1 cmp byte[AddrNoIncr],0 diff --git a/zsnes/src/gblvars.h b/zsnes/src/gblvars.h index e9268677..60acee40 100644 --- a/zsnes/src/gblvars.h +++ b/zsnes/src/gblvars.h @@ -42,5 +42,4 @@ extern bool SRAMState; extern short C4WFXVal, C41FXVal, Op00Multiplicand, Op04Angle, Op08X, Op18X; extern short Op28X, Op0CA, Op02FX, Op0AVS, Op06X, Op01m, Op0DX, Op03F, Op14Zr; -extern short Op0EH; -extern signed short Op10Coefficient; +extern short Op0EH, Op10Coefficient; diff --git a/zsnes/src/gui/guimouse.inc b/zsnes/src/gui/guimouse.inc index 46b9027a..595d64f9 100644 --- a/zsnes/src/gui/guimouse.inc +++ b/zsnes/src/gui/guimouse.inc @@ -1985,9 +1985,11 @@ DisplayGUIConfirmClick: GUIWinControl 5,27,144,26+15*7,GUIcurrentfilewin,GUIcurrentviewloc,GUIfileentries,27,7,GUIcurrentcursloc,0,1,30 GUIWinControl 160,27,228,26+15*7,GUIcurrentfilewin,GUIcurrentdirviewloc,GUIdirentries,27,7,GUIcurrentdircursloc,1,1,30 GUIPHoldbutton 186,165,228,176,1 +%ifdef __MSDOS__ GUIPButtonHoleLoad 9,163,byte[GUIloadfntype],0 GUIPButtonHoleLoad 9,171,byte[GUIloadfntype],1 GUIPButtonHoleLoad 9,179,byte[GUIloadfntype],2 +%endif GUIClickCButton5 144,177,byte[ForceROMTiming],1 GUIClickCButton5 144,187,byte[ForceROMTiming],2 GUIClickCButton5 184,177,byte[ForceHiLoROM],1 diff --git a/zsnes/src/init.asm b/zsnes/src/init.asm index bddf2969..ec56add3 100644 --- a/zsnes/src/init.asm +++ b/zsnes/src/init.asm @@ -55,7 +55,7 @@ EXTSYM GetCurDir,SRAMChdir,cfgloadsdir,fnamest,statefileloc,InitDir,InitDrive EXTSYM curromspace,infoloc,patchfile,romispal,initregr,initregw,memtabler16 EXTSYM memtabler8,memtablew16,memtablew8,sfxramdata,wramreadptr EXTSYM wramwriteptr,loadstate2,CMovieExt,MoviePlay,MovieDumpRaw,AllowUDLR -EXTSYM device1,device2,processmouse1,processmouse2 +EXTSYM device1,device2,processmouse1,processmouse2,cpalval ;initc.c EXTSYM clearmem,clearSPCRAM,PatchUsingIPS,ZOpenFileName,loadROM,SPC7110IndexSize @@ -89,7 +89,6 @@ NEWSYM EndMessage SECTION .text -EXTSYM cpalval NEWSYM init ; prevents a crash if cpalval gets accessed before initializing mov eax,cpalval diff --git a/zsnes/src/ui.asm b/zsnes/src/ui.asm index c60618c0..c5627cfa 100644 --- a/zsnes/src/ui.asm +++ b/zsnes/src/ui.asm @@ -65,23 +65,6 @@ NEWSYM YesMMX, db 'MMX support found and enabled.',13,10,13,10,0 SECTION .text -;******************************************************* -; Allocate Memory, ebx = size,eax returned = LFB pointer -;******************************************************* - -NEWSYM AllocMem -%ifndef __UNIXSDL__ - mov ax,0501h - mov cx,bx - shr ebx,16 - int 31h - jc near outofmemory - mov ax,bx - shl eax,16 - mov ax,cx -%endif - ret - ;******************************************************* ; Get Command Line Locates SET CMDLINE environment ;*******************************************************