mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
sms, minor fixes
This commit is contained in:
parent
02d250c709
commit
d0cb6cfa57
2 changed files with 13 additions and 7 deletions
|
@ -56,8 +56,8 @@ static void TileBGM4(u16 sx, int pal)
|
|||
pd[0] = pd[1] = pal * 0x01010101;
|
||||
}
|
||||
|
||||
// 8 pixels are arranged are arranged in 4 bitplanes in a 32 bit word. To pull
|
||||
// the 4 bitplanes together multiply with each bit distance (multiples of 1<<7)
|
||||
// 8 pixels are arranged in 4 bitplane bytes in a 32 bit word. To pull the
|
||||
// 4 bitplanes together multiply with each bit distance (multiples of 1<<7)
|
||||
#define PLANAR_PIXELBG(x,p) \
|
||||
t = (pack>>(7-p)) & 0x01010101; \
|
||||
t = (t*0x10204080) >> 28; \
|
||||
|
@ -142,7 +142,7 @@ static void TileDoubleSprM4(int sx, unsigned int pack, int pal)
|
|||
static void DrawSpritesM4(int scanline)
|
||||
{
|
||||
struct PicoVideo *pv = &Pico.video;
|
||||
unsigned char mb[256/8+2] = {0};
|
||||
unsigned char mb[1+256/8+2] = {0}; // zoomed
|
||||
unsigned int sprites_addr[8];
|
||||
unsigned int sprites_x[8];
|
||||
unsigned int pack;
|
||||
|
@ -375,7 +375,7 @@ static void TileDoubleSprTMS(u16 sx, unsigned int pack, int pal)
|
|||
static void DrawSpritesTMS(int scanline)
|
||||
{
|
||||
struct PicoVideo *pv = &Pico.video;
|
||||
unsigned char mb[256/8+2] = {0};
|
||||
unsigned char mb[1+256/8+4] = {0}; // zoomed+doublesize
|
||||
unsigned int sprites_addr[4];
|
||||
unsigned int sprites_x[4];
|
||||
unsigned int pack;
|
||||
|
|
10
pico/sms.c
10
pico/sms.c
|
@ -295,6 +295,7 @@ static void write_bank_sega(unsigned short a, unsigned char d)
|
|||
// 8KB ROM mapping for MSX mapper
|
||||
static void write_bank_msx(unsigned short a, unsigned char d)
|
||||
{
|
||||
if (Pico.ms.mapper != 2 && (a|d) == 0) return;
|
||||
elprintf(EL_Z80BNK, "bank 8k %04x %02x @ %04x", a, d, z80_pc());
|
||||
Pico.ms.mapper = 2; // TODO define (more) mapper types
|
||||
Pico.ms.carthw[a] = d;
|
||||
|
@ -325,7 +326,7 @@ static void xwrite(unsigned int a, unsigned char d)
|
|||
if (a == 0xa000 && Pico.ms.mapper != 2)
|
||||
write_bank_sega(0xffff, d);
|
||||
// MSX. 4 selectable 8KB banks at the top
|
||||
if (a <= 0x0003 && Pico.ms.mapper != 1 && (a|d))
|
||||
if (a <= 0x0003 && Pico.ms.mapper != 1)
|
||||
write_bank_msx(a, d);
|
||||
}
|
||||
|
||||
|
@ -477,14 +478,19 @@ void PicoFrameMS(void)
|
|||
elprintf(EL_INTS, "hint");
|
||||
z80_int_assert(1);
|
||||
}
|
||||
} else if (pv->pending_ints & 2) {
|
||||
pv->pending_ints &= ~2;
|
||||
z80_int_assert(0);
|
||||
}
|
||||
}
|
||||
else if (y == lines_vis + 1) {
|
||||
pv->pending_ints &= ~2;
|
||||
pv->pending_ints |= 1;
|
||||
if (pv->reg[1] & 0x20) {
|
||||
elprintf(EL_INTS, "vint");
|
||||
z80_int_assert(1);
|
||||
}
|
||||
} else
|
||||
z80_int_assert(0);
|
||||
}
|
||||
|
||||
cycles_aim += cycles_line;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue