notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minor game_def.cfg update
[picodrive.git]
/
platform
/
gizmondo
/
emu.c
diff --git
a/platform/gizmondo/emu.c
b/platform/gizmondo/emu.c
index
82c3ddd
..
97fd079
100644
(file)
--- a/
platform/gizmondo/emu.c
+++ b/
platform/gizmondo/emu.c
@@
-140,13
+140,14
@@
void emu_setDefaultConfig(void)
currentConfig.KeyBinds[11] = 1<<30; // vol down
currentConfig.PicoCDBuffers = 0;
currentConfig.scaling = 0;
currentConfig.KeyBinds[11] = 1<<30; // vol down
currentConfig.PicoCDBuffers = 0;
currentConfig.scaling = 0;
+ defaultConfig.turbo_rate = 15;
}
}
-static int EmuScan
16(unsigned int num, void *sdata
)
+static int EmuScan
Begin16(unsigned int num
)
{
if (!(Pico.video.reg[1]&8)) num += 8;
{
if (!(Pico.video.reg[1]&8)) num += 8;
- DrawLineDest = (unsigned short *) giz_screen + 321
*(num+1)
;
+ DrawLineDest = (unsigned short *) giz_screen + 321
* num
;
if ((currentConfig.EmuOpt&0x4000) && (num&1) == 0) // (Pico.m.frame_count&1))
return 1; // skip next line
if ((currentConfig.EmuOpt&0x4000) && (num&1) == 0) // (Pico.m.frame_count&1))
return 1; // skip next line
@@
-154,11
+155,11
@@
static int EmuScan16(unsigned int num, void *sdata)
return 0;
}
return 0;
}
-static int EmuScan
8(unsigned int num, void *sdata
)
+static int EmuScan
Begin8(unsigned int num
)
{
// draw like the fast renderer
if (!(Pico.video.reg[1]&8)) num += 8;
{
// draw like the fast renderer
if (!(Pico.video.reg[1]&8)) num += 8;
- HighCol = gfx_buffer + 328
*(num+1)
;
+ HighCol = gfx_buffer + 328
* num
;
return 0;
}
return 0;
}
@@
-253,7
+254,7
@@
static void blit(const char *fps, const char *notice)
if (emu_opt & 2) osd_text(OSD_FPS_X, h, fps);
}
if (emu_opt & 2) osd_text(OSD_FPS_X, h, fps);
}
- if ((emu_opt & 0x400) && (Pico
MCD & 1
))
+ if ((emu_opt & 0x400) && (Pico
AHW & PAHW_MCD
))
cd_leds();
}
cd_leds();
}
@@
-280,10
+281,10
@@
static void vidResetMode(void)
if (PicoOpt&0x10) {
} else if (currentConfig.EmuOpt&0x80) {
PicoDrawSetColorFormat(1);
if (PicoOpt&0x10) {
} else if (currentConfig.EmuOpt&0x80) {
PicoDrawSetColorFormat(1);
- PicoScan
= EmuSca
n16;
+ PicoScan
Begin = EmuScanBegi
n16;
} else {
PicoDrawSetColorFormat(-1);
} else {
PicoDrawSetColorFormat(-1);
- PicoScan
= EmuSca
n8;
+ PicoScan
Begin = EmuScanBegi
n8;
}
if ((PicoOpt&0x10) || !(currentConfig.EmuOpt&0x80)) {
// setup pal for 8-bit modes
}
if ((PicoOpt&0x10) || !(currentConfig.EmuOpt&0x80)) {
// setup pal for 8-bit modes
@@
-343,21
+344,20
@@
static void SkipFrame(void)
}
/* forced frame to front buffer */
}
/* forced frame to front buffer */
-void emu_forcedFrame(
void
)
+void emu_forcedFrame(
int opts
)
{
int po_old = PicoOpt;
int eo_old = currentConfig.EmuOpt;
{
int po_old = PicoOpt;
int eo_old = currentConfig.EmuOpt;
- PicoOpt &= ~0x
00
10;
- PicoOpt |=
0x4080; // soft_scale | acc_sprites
+ PicoOpt &= ~0x10;
+ PicoOpt |=
opts|POPT_ACC_SPRITES;
currentConfig.EmuOpt |= 0x80;
if (giz_screen == NULL)
giz_screen = Framework2D_LockBuffer(1);
PicoDrawSetColorFormat(1);
currentConfig.EmuOpt |= 0x80;
if (giz_screen == NULL)
giz_screen = Framework2D_LockBuffer(1);
PicoDrawSetColorFormat(1);
- PicoScan = EmuScan16;
- PicoScan((unsigned) -1, NULL);
+ PicoScanBegin = EmuScanBegin16;
Pico.m.dirtyPal = 1;
PicoFrameDrawOnly();
Pico.m.dirtyPal = 1;
PicoFrameDrawOnly();
@@
-458,10
+458,10
@@
static void updateKeys(void)
pl = (acts >> 16) & 1;
if (kb_combo_keys & (1 << i))
{
pl = (acts >> 16) & 1;
if (kb_combo_keys & (1 << i))
{
- int u, acts_c = acts & kb_combo_acts;
+ int u
= i+1
, acts_c = acts & kb_combo_acts;
// let's try to find the other one
if (acts_c) {
// let's try to find the other one
if (acts_c) {
- for (
u = i + 1
; u < 32; u++)
+ for (; u < 32; u++)
if ( (keys & (1 << u)) && (currentConfig.KeyBinds[u] & acts_c) ) {
allActions[pl] |= acts_c & currentConfig.KeyBinds[u];
keys &= ~((1 << i) | (1 << u));
if ( (keys & (1 << u)) && (currentConfig.KeyBinds[u] & acts_c) ) {
allActions[pl] |= acts_c & currentConfig.KeyBinds[u];
keys &= ~((1 << i) | (1 << u));
@@
-477,8
+477,11
@@
static void updateKeys(void)
}
}
}
}
- PicoPad[0] = (unsigned short) allActions[0];
- PicoPad[1] = (unsigned short) allActions[1];
+ PicoPad[0] = allActions[0] & 0xfff;
+ PicoPad[1] = allActions[1] & 0xfff;
+
+ if (allActions[0] & 0x7000) emu_DoTurbo(&PicoPad[0], allActions[0]);
+ if (allActions[1] & 0x7000) emu_DoTurbo(&PicoPad[1], allActions[1]);
events = (allActions[0] | allActions[1]) >> 16;
events = (allActions[0] | allActions[1]) >> 16;
@@
-546,7
+549,7
@@
void emu_Loop(void)
reset_timing = 1;
// prepare CD buffer
reset_timing = 1;
// prepare CD buffer
- if (Pico
MCD & 1
) PicoCDBufferInit();
+ if (Pico
AHW & PAHW_MCD
) PicoCDBufferInit();
// prepare sound stuff
PsndOut = NULL;
// prepare sound stuff
PsndOut = NULL;
@@
-716,9
+719,6
@@
void emu_Loop(void)
/* be sure correct framebuffer is locked */
giz_screen = Framework2D_LockBuffer((currentConfig.EmuOpt&0x8000) ? 0 : 1);
/* be sure correct framebuffer is locked */
giz_screen = Framework2D_LockBuffer((currentConfig.EmuOpt&0x8000) ? 0 : 1);
- if (!(PicoOpt&0x10))
- PicoScan((unsigned) -1, NULL);
-
PicoFrame();
if (giz_screen == NULL)
PicoFrame();
if (giz_screen == NULL)
@@
-757,7
+757,7
@@
void emu_Loop(void)
}
}
- if (Pico
MCD & 1
) PicoCDBufferFree();
+ if (Pico
AHW & PAHW_MCD
) PicoCDBufferFree();
if (PsndOut != NULL) {
PsndOut = snd_cbuff = NULL;
if (PsndOut != NULL) {
PsndOut = snd_cbuff = NULL;
@@
-775,7
+775,7
@@
void emu_Loop(void)
void emu_ResetGame(void)
{
void emu_ResetGame(void)
{
- PicoReset(
0
);
+ PicoReset();
reset_timing = 1;
}
reset_timing = 1;
}