2882b26a99
1) Adapt Rockboy to smaller screens (H10, X5, and iPod Nano). 2) Add the ability to use a preset palette on color targets. Choose 'Set Palette' from the main menu. 3) Clean up the code to remove any unused code and variables. 4) Changed tabs to spaces. 5) Disable reading and writing sound when sound is disabled. 6) Disbable writing to the RTC since it is not implemented yet. 7) Minor optimizations from WAC gnuboy CE and iBoy. 8) Massive clean up of code to make it appear consistent. 9) Change all C++ style comments to C style. 10) Completely reorganize dynarec. Add fixmes to all unimplemented opcodes. Add debug writes for all opcodes. Attempt to implement a few opcodes myself. 11) Silence some warnings when built using dynarec. 12) Minor reshuffling of IRAM, may or not offer a speed increase. 13) Include fixes found in the short-lived gnuboy CVS. All in all, there's about a 10% improvement on my test roms when sound is disabled and slight improvement with sound. Especially noticable when there are few sprites on screen and less action is occurring. See FS #6567. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12216 a1c6a512-1295-4272-9138-f99709370657
47 lines
791 B
C
47 lines
791 B
C
|
|
|
|
|
|
#ifndef __HW_H__
|
|
#define __HW_H__
|
|
|
|
|
|
#include "defs.h"
|
|
|
|
|
|
#define PAD_RIGHT 0x01
|
|
#define PAD_LEFT 0x02
|
|
#define PAD_UP 0x04
|
|
#define PAD_DOWN 0x08
|
|
#define PAD_A 0x10
|
|
#define PAD_B 0x20
|
|
#define PAD_SELECT 0x40
|
|
#define PAD_START 0x80
|
|
|
|
#define IF_VBLANK 0x01
|
|
#define IF_STAT 0x02
|
|
#define IF_TIMER 0x04
|
|
#define IF_SERIAL 0x08
|
|
#define IF_PAD 0x10
|
|
|
|
struct hw
|
|
{
|
|
byte ilines;
|
|
byte pad;
|
|
int hdma;
|
|
int cgb;
|
|
};
|
|
|
|
|
|
extern struct hw hw;
|
|
|
|
void hw_interrupt(byte i, byte mask) ICODE_ATTR;
|
|
void hw_dma(byte b) ICODE_ATTR;
|
|
void hw_hdma_cmd(byte c) ICODE_ATTR;
|
|
void hw_hdma(void) ICODE_ATTR;
|
|
void pad_refresh(void) ICODE_ATTR;
|
|
void pad_press(byte k) ICODE_ATTR;
|
|
void pad_release(byte k) ICODE_ATTR;
|
|
void pad_set(byte k, int st) ICODE_ATTR;
|
|
void hw_reset(void);
|
|
|
|
#endif
|