Skip to content

Commit be97585

Browse files
committed
Working NES emulation
1 parent c8edd69 commit be97585

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

pc/src/pc_nes_fixnes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ extern bool ppuMapper5;
8484
extern uint8_t inValReads[8];
8585

8686
/* Audio output to game engine */
87-
extern void AIInitDMA(uint32_t addr, uint32_t size);
87+
extern void AIInitDMA(uintptr_t addr, uint32_t size);
8888

8989
/* ======================================================================
9090
* GL rendering state
@@ -201,7 +201,7 @@ static void fixnes_capture_audio(void) {
201201
}
202202

203203
if (fixnes_audio_pos > 0) {
204-
AIInitDMA((uint32_t)(uintptr_t)fixnes_audio_buf, fixnes_audio_pos * 4);
204+
AIInitDMA((uintptr_t)fixnes_audio_buf, fixnes_audio_pos * 4);
205205
}
206206
}
207207

pc/src/pc_stubs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void ksNesEmuFrame(void* wp, void* sp, u32 flags) { (void)wp; (void)sp; (void)fl
7979
int CARDGetAttributes(int chan, int fileNo, u8* attr) { (void)chan; (void)fileNo; (void)attr; return -1; }
8080
int CARDSetAttributes(int chan, int fileNo, u8 attr) { (void)chan; (void)fileNo; (void)attr; return -1; }
8181
int CARDFastOpen(int chan, int fileNo, void* fileInfo) { (void)chan; (void)fileNo; (void)fileInfo; return -1; }
82-
int bcmp(const void* a, const void* b, unsigned int n) { return memcmp(a, b, n); }
82+
int bcmp(const void* a, const void* b, size_t n) { return memcmp(a, b, n); }
8383

8484
/* nesinfo — now provided by famicom_nesinfo.cpp */
8585

src/static/Famicom/famicom.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ static int SetupResBanner(const ResTIMG*, u8*, size_t, size_t*, u8*);
637637
static int SetupResIcon(const ResTIMG*, u8*, size_t, size_t*, u16*, u16*);
638638

639639
static void SetupExternCommentImage(u8* embedded_save_comment_img, u8* dst, u8* rom_file_comment_img) {
640-
u32 size;
640+
size_t size;
641641

642642
switch (famicomCommon.memcard_game_header.flags0.comment_type) {
643643
case MEMCARD_COMMENT_TYPE_NONE:

0 commit comments

Comments
 (0)