Better separate GBA and NDS

This commit is contained in:
Lorenzooone 2023-09-14 23:38:13 +02:00
parent f3499c1803
commit 97bb4f0d26
2 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
#ifndef BASE_INCLUDE__
#define BASE_INCLUDE__
#ifndef __NDS__
#ifdef __GBA__
// GBA defines and all
#include <gba.h>
@ -15,10 +15,6 @@ ALWAYS_INLINE MAX_OPTIMIZE int __get_next_vcount_interrupt(void) {
u16 reg_val = REG_DISPSTAT;
return reg_val >> 8;
}
ALWAYS_INLINE MAX_OPTIMIZE void __reset_vcount(void) {
// Does not work on GBA
return;
}
#define __set_next_vcount_interrupt(x) __set_next_vcount_interrupt_gba(x)
#define SCANLINE_IRQ_BIT LCDC_VCNT
#define REG_WAITCNT *(vu16*)(REG_BASE + 0x204) // Wait state Control
@ -40,7 +36,9 @@ ALWAYS_INLINE MAX_OPTIMIZE void __reset_vcount(void) {
#endif
#define CONSOLE_LETTER 'G'
#else
#endif
#ifdef __NDS__
// NDS defines and all
#include <nds.h>

View File

@ -129,8 +129,10 @@ IWRAM_CODE void vblank_update_function() {
// Handle trading animation
if(curr_state == TRADING_ANIMATION)
advance_trade_animation();
#ifdef __NDS__
// Increase FPS on NDS
//__reset_vcount();
#endif
#ifdef HAS_SIO
// Handle slave communications
if((REG_SIOCNT & SIO_IRQ) && (!(REG_SIOCNT & SIO_START)))