void DrawLayer(int plane_sh, int *hcache, int cellskip, int maxcells);\r
void FinalizeLineBGR444(int sh);\r
void FinalizeLineRGB555(int sh);\r
+void *blockcpy(void *dst, const void *src, size_t n);\r
void blockcpy_or(void *dst, void *src, size_t n, int pat);\r
#else\r
// utility\r
for (; n; n--)\r
*pd++ = (unsigned char) (*ps++ | pat);\r
}\r
+#define blockcpy memcpy\r
#endif\r
\r
\r
.DrawStrip_vsscroll:\r
rsb r8, r3, #0\r
mov r8, r8, lsr #3 @ r8=tilex=(-ts->hscroll)>>3\r
- bic r8, r8, #0xff000000\r
- orr r8, r8, r5, lsl #25 @ r8=(xmask[31:25]|had_output[24]|tilex[23:0])\r
+ bic r8, r8, #0x3fc00000\r
+ orr r8, r8, r5, lsl #25 @ r8=(xmask[31:25]|had_output[24]|tilex[21:0])\r
\r
ldr r4, =Scanline\r
orr r5, r1, r10, lsl #24\r
ldrh r7, [r7] @ r7=vscroll\r
\r
bic r10,r10,#0xff @ clear old ty\r
- and r4, r5, #0xff0000\r
- add r4, r4, r7, lsl #16\r
- and r4, r4, r5, lsl #16 @ r4=line<<16\r
+ and r4, r5, #0xff0000 @ scanline\r
+ add r4, r4, r7, lsl #16 @ ... += vscroll\r
+ and r4, r4, r5, lsl #16 @ ... &= ymask\r
and r7, r4, #0x70000\r
orr r10,r10,r7, lsr #15 @ new ty\r
\r
beq .DrawStrip_vs_samecode @ we know stuff about this tile already\r
\r
mov r9, r7 @ remember code\r
- orr r8, r8, #1<<24 @ seen non hi-prio tile\r
+ orr r8, r8, #(1<<24)@ seen non hi-prio tile\r
\r
movs r2, r9, lsl #20 @ if (code&0x1000)\r
mov r2, r2, lsl #1\r
b .dsloop_vs\r
\r
.dsloop_vs_exit:\r
- tst r8, #1<<24 @ seen non hi-prio tile\r
+ tst r8, #(1<<24) @ seen non hi-prio tile\r
ldreq r1, =rendstatus\r
mov r0, #0\r
ldreq r2, [r1]\r
extern int rendstatus;\r
// utility\r
#ifdef _ASM_DRAW_C\r
-void *blockcpy(void *dst, const void *src, size_t n);\r
void vidConvCpyRGB565(void *to, void *from, int pixels);\r
-#else\r
-#define blockcpy memcpy\r
#endif\r
\r
// Draw2.c\r
static menu_entry *cfg_opts[] = { opt_entries, opt2_entries, cdopt_entries };
static const int *cfg_opt_counts[] = { &opt_entry_count, &opt2_entry_count, &cdopt_entry_count };
-#define NL "\n"
+#define NL "\r\n"
static char *mystrip(char *str)
keys_write(fn, "bind_joy2", currentConfig.JoyBinds[2], defaultConfig.JoyBinds[2], joyKeyNames, 1);
keys_write(fn, "bind_joy3", currentConfig.JoyBinds[3], defaultConfig.JoyBinds[3], joyKeyNames, 1);
+ if (section == NULL)
+ fprintf(fn, "Sound Volume = %i" NL, currentConfig.volume);
+
fprintf(fn, NL);
if (fo != NULL)
if (strcasecmp(var, "LastUsedROM") == 0)
return; /* handled elsewhere */
+ if (strcasecmp(var, "Sound Volume") == 0) {
+ currentConfig.volume = atoi(val);
+ return;
+ }
+
// key binds
if (strncasecmp(var, "bind ", 5) == 0) {
keys_parse(var + 5, val, currentConfig.KeyBinds, keyNames);
\r
ret = -1;\r
if (config_havesect(cfg, sect)) {\r
+ int vol = currentConfig.volume;\r
emu_setDefaultConfig();\r
ret = config_readsect(cfg, sect);\r
+ currentConfig.volume = vol; // make vol global (bah)\r
}\r
\r
if (ret != 0)\r
vidConvCpyRGB32(localPal, Pico.cram, 0x40);\r
vidConvCpyRGB32sh(localPal+0x40, Pico.cram, 0x40);\r
vidConvCpyRGB32hi(localPal+0x80, Pico.cram, 0x40);\r
- blockcpy(localPal+0xc0, localPal+0x40, 0x40*4);\r
+ memcpy32(localPal+0xc0, localPal+0x40, 0x40);\r
localPal[0xc0] = 0x0000c000;\r
localPal[0xd0] = 0x00c00000;\r
localPal[0xe0] = 0x00000000; // reserved pixels for OSD\r