New scaling code, plus minor fixes.

This commit is contained in:
gameblabla 2020-02-29 21:11:21 +01:00
parent 78aa087be1
commit fe09dd504d
No known key found for this signature in database
GPG Key ID: B24EFBB23B5F76CB
6 changed files with 9 additions and 5 deletions

View File

@ -445,7 +445,7 @@ uint32_t load_rom (char *filename)
/* Seek to end of file, and get size */
fseek(fd, 0, SEEK_END);
cart.size = ftell(fd);
cart.size = (uint32_t)ftell(fd);
fseek(fd, 0, SEEK_SET);
if (cart.size < 0x4000) cart.size = 0x4000;

View File

@ -46,7 +46,7 @@ uint8_t z80_read_unmapped(void)
}
/* Port $3E (Memory Control Port) */
void memctrl_w(uint8_t data)
static void memctrl_w (uint8_t data)
{
/* detect CARTRIDGE/BIOS enabled/disabled */
if (IS_SMS)

View File

@ -11,6 +11,8 @@
#define GMASK 0b0000011111100000
#define BMASK 0b0000000000011111
/* upscale_160x144_to_212x144 and upscale_160x144_to_212x160 by rowsnug95 */
void upscale_160x144_to_212x144(uint16_t* restrict src, uint16_t* restrict dst)
{
uint16_t* __restrict__ buffer_mem;

View File

@ -116,10 +116,10 @@ typedef struct
uint8_t memctrl;
uint8_t ioctrl;
uint8_t irq;
uint8_t device[2];
uint8_t gun_offset;
uint32_t fm_detect;
int32_t use_fm;
uint8_t device[2];
} sms_t;
/* BIOS ROM */

View File

@ -54,8 +54,8 @@ enum
/* User input structure */
typedef struct
{
uint8_t pad[2];
int32_t analog[2][2];
uint8_t pad[2];
uint8_t system;
} input_t;

View File

@ -47,6 +47,8 @@
bg_name_dirty[name] |= (1 << ((addr >> 2) & 7));\
}
/*** Vertical Counter Tables ***/
extern uint8_t *vc_table[2][3];
/* VDP context */
vdp_t vdp;
@ -212,7 +214,7 @@ void viewport_check(void)
}
void vdp_reg_w(uint8_t r, uint8_t d)
static void vdp_reg_w(uint8_t r, uint8_t d)
{
/* Store register data */
vdp.reg[r] = d;