notaz.gp2x.de
/
picodrive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7669591
)
sms: improve sr a bit
author
notaz
<notasas@gmail.com>
Mon, 16 Oct 2017 21:53:35 +0000
(
00:53
+0300)
committer
notaz
<notasas@gmail.com>
Mon, 16 Oct 2017 21:53:35 +0000
(
00:53
+0300)
pico/mode4.c
patch
|
blob
|
blame
|
history
pico/sms.c
patch
|
blob
|
blame
|
history
diff --git
a/pico/mode4.c
b/pico/mode4.c
index
0f3d766
..
a13c38b
100644
(file)
--- a/
pico/mode4.c
+++ b/
pico/mode4.c
@@
-91,7
+91,7
@@
static void draw_sprites(int scanline)
}
sprite_base = (pv->reg[6] & 4) << (13-2-1);
}
sprite_base = (pv->reg[6] & 4) << (13-2-1);
- for (i = s = 0; i < 64
&& s < 8
; i++)
+ for (i = s = 0; i < 64; i++)
{
int y;
y = sat[i] + 1;
{
int y;
y = sat[i] + 1;
@@
-99,6
+99,10
@@
static void draw_sprites(int scanline)
break;
if (y + h <= scanline || scanline < y)
continue; // not on this line
break;
if (y + h <= scanline || scanline < y)
continue; // not on this line
+ if (s >= 8) {
+ pv->status |= SR_SOVR;
+ break;
+ }
sprites_x[s] = xoff + sat[0x80 + i*2];
sprites_addr[s] = sprite_base + ((sat[0x80 + i*2 + 1] & addr_mask) << (5-1)) +
sprites_x[s] = xoff + sat[0x80 + i*2];
sprites_addr[s] = sprite_base + ((sat[0x80 + i*2 + 1] & addr_mask) << (5-1)) +
@@
-106,6
+110,10
@@
static void draw_sprites(int scanline)
s++;
}
s++;
}
+ // really half-assed but better than nothing
+ if (s > 1)
+ pv->status |= SR_C;
+
// now draw all sprites backwards
for (--s; s >= 0; s--)
TileNormM4(sprites_x[s], sprites_addr[s], 0x10);
// now draw all sprites backwards
for (--s; s >= 0; s--)
TileNormM4(sprites_x[s], sprites_addr[s], 0x10);
@@
-300,3
+308,4
@@
void PicoDrawSetOutputMode4(pdso_t which)
}
}
}
}
+// vim:shiftwidth=2:ts=2:expandtab
diff --git
a/pico/sms.c
b/pico/sms.c
index
a2351b0
..
9e80c98
100644
(file)
--- a/
pico/sms.c
+++ b/
pico/sms.c
@@
-31,9
+31,12
@@
static unsigned char vdp_data_read(void)
static unsigned char vdp_ctl_read(void)
{
static unsigned char vdp_ctl_read(void)
{
- unsigned char d = Pico.video.pending_ints << 7;
- Pico.video.pending = 0;
- Pico.video.pending_ints = 0;
+ struct PicoVideo *pv = &Pico.video;
+ unsigned char d;
+
+ d = pv->status | (pv->pending_ints << 7);
+ pv->pending = pv->pending_ints = 0;
+ pv->status = 0;
elprintf(EL_SR, "VDP sr: %02x", d);
return d;
elprintf(EL_SR, "VDP sr: %02x", d);
return d;