mirror of
https://github.com/libretro/beetle-wswan-libretro.git
synced 2024-11-23 07:59:40 +00:00
Random cleanups
This commit is contained in:
parent
2c1fb778f1
commit
6b30607360
23
libretro.c
23
libretro.c
@ -28,8 +28,8 @@ void linearFree(void* mem);
|
|||||||
#define MEDNAFEN_CORE_VERSION "v0.9.35.1"
|
#define MEDNAFEN_CORE_VERSION "v0.9.35.1"
|
||||||
#define MEDNAFEN_CORE_EXTENSIONS "ws|wsc|pc2"
|
#define MEDNAFEN_CORE_EXTENSIONS "ws|wsc|pc2"
|
||||||
#define MEDNAFEN_CORE_TIMING_FPS (3072000.0 / (159.0 * 256.0))
|
#define MEDNAFEN_CORE_TIMING_FPS (3072000.0 / (159.0 * 256.0))
|
||||||
#define MEDNAFEN_CORE_GEOMETRY_BASE_W (EmulatedWSwan.nominal_width)
|
#define MEDNAFEN_CORE_GEOMETRY_BASE_W 224
|
||||||
#define MEDNAFEN_CORE_GEOMETRY_BASE_H (EmulatedWSwan.nominal_height)
|
#define MEDNAFEN_CORE_GEOMETRY_BASE_H 144
|
||||||
#define MEDNAFEN_CORE_GEOMETRY_MAX_W 224
|
#define MEDNAFEN_CORE_GEOMETRY_MAX_W 224
|
||||||
#define MEDNAFEN_CORE_GEOMETRY_MAX_H 144
|
#define MEDNAFEN_CORE_GEOMETRY_MAX_H 144
|
||||||
#define MEDNAFEN_CORE_GEOMETRY_ASPECT_RATIO (14.0 / 9.0)
|
#define MEDNAFEN_CORE_GEOMETRY_ASPECT_RATIO (14.0 / 9.0)
|
||||||
@ -384,21 +384,6 @@ uint16 WSButtonStatus;
|
|||||||
|
|
||||||
static uint8 WSRCurrentSong;
|
static uint8 WSRCurrentSong;
|
||||||
|
|
||||||
MDFNGI EmulatedWSwan =
|
|
||||||
{
|
|
||||||
224, /* lcm_width */
|
|
||||||
144, /* lcm_height */
|
|
||||||
|
|
||||||
224, /* Nominal width */
|
|
||||||
144, /* Nominal height */
|
|
||||||
|
|
||||||
224, /* Framebuffer width */
|
|
||||||
144, /* Framebuffer height */
|
|
||||||
|
|
||||||
2, /* Number of output sound channels */
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static void Reset(void)
|
static void Reset(void)
|
||||||
{
|
{
|
||||||
int u0;
|
int u0;
|
||||||
@ -429,8 +414,6 @@ static void Emulate(EmulateSpecStruct *espec,
|
|||||||
uint16 butt_data;
|
uint16 butt_data;
|
||||||
|
|
||||||
espec->surface = surf;
|
espec->surface = surf;
|
||||||
espec->DisplayRect.x = 0;
|
|
||||||
espec->DisplayRect.y = 0;
|
|
||||||
espec->DisplayRect.w = 224;
|
espec->DisplayRect.w = 224;
|
||||||
espec->DisplayRect.h = 144;
|
espec->DisplayRect.h = 144;
|
||||||
espec->skip = skip_frame;
|
espec->skip = skip_frame;
|
||||||
@ -562,8 +545,10 @@ static int Load(const uint8_t *data, size_t size)
|
|||||||
wsCartROM[0xfffec]=0x20;
|
wsCartROM[0xfffec]=0x20;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
if(header[6] & 0x1)
|
if(header[6] & 0x1)
|
||||||
EmulatedWSwan.rotated = MDFN_ROTATE90;
|
EmulatedWSwan.rotated = MDFN_ROTATE90;
|
||||||
|
#endif
|
||||||
|
|
||||||
MDFNMP_Init(16384, (1 << 20) / 1024);
|
MDFNMP_Init(16384, (1 << 20) / 1024);
|
||||||
|
|
||||||
|
@ -114,22 +114,6 @@ typedef struct
|
|||||||
int32 SoundBufSize;
|
int32 SoundBufSize;
|
||||||
} EmulateSpecStruct;
|
} EmulateSpecStruct;
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
int lcm_width;
|
|
||||||
int lcm_height;
|
|
||||||
|
|
||||||
int nominal_width;
|
|
||||||
int nominal_height;
|
|
||||||
|
|
||||||
int fb_width; // Width of the framebuffer(not necessarily width of the image). MDFN_Surface width should be >= this.
|
|
||||||
int fb_height; // Height of the framebuffer passed to the Emulate() function(not necessarily height of the image)
|
|
||||||
|
|
||||||
int soundchan; // Number of output sound channels.
|
|
||||||
|
|
||||||
int rotated;
|
|
||||||
} MDFNGI;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -43,7 +43,7 @@ extern "C" {
|
|||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int32_t x, y, w, h;
|
int32_t w, h;
|
||||||
} MDFN_Rect;
|
} MDFN_Rect;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -31,11 +31,6 @@ static void RecalcInterrupt(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WSwan_InterruptDebugForce(unsigned int level)
|
|
||||||
{
|
|
||||||
v30mz_int((IVectorBase + level) * 4, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void WSwan_Interrupt(int which)
|
void WSwan_Interrupt(int which)
|
||||||
{
|
{
|
||||||
if(IEnable & (1 << which))
|
if(IEnable & (1 << which))
|
||||||
|
@ -26,7 +26,6 @@ uint8 WSwan_InterruptRead(uint32 A);
|
|||||||
void WSwan_InterruptCheck(void);
|
void WSwan_InterruptCheck(void);
|
||||||
int WSwan_InterruptStateAction(StateMem *sm, int load, int data_only);
|
int WSwan_InterruptStateAction(StateMem *sm, int load, int data_only);
|
||||||
void WSwan_InterruptReset(void);
|
void WSwan_InterruptReset(void);
|
||||||
void WSwan_InterruptDebugForce(unsigned int level);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -117,7 +117,6 @@ typedef enum
|
|||||||
|
|
||||||
#define _REAL_CLK(cycles) { v30mz_ICount -= cycles; v30mz_timestamp += cycles; }
|
#define _REAL_CLK(cycles) { v30mz_ICount -= cycles; v30mz_timestamp += cycles; }
|
||||||
#define CLK _REAL_CLK
|
#define CLK _REAL_CLK
|
||||||
//#define CLK(cycles) { _REAL_CLK(cycles); if(ws_CheckDMA(cycles)) _REAL_CLK(1); }
|
|
||||||
|
|
||||||
#define CLKM(mcount, ccount) { if(ModRM >=0xc0 ) { CLK(ccount);} else {CLK(mcount);} }
|
#define CLKM(mcount, ccount) { if(ModRM >=0xc0 ) { CLK(ccount);} else {CLK(mcount);} }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user