mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
sms vdp, support 224/240 line mode
This commit is contained in:
parent
3bfee02717
commit
4b3e9d92e3
2 changed files with 9 additions and 5 deletions
10
pico/mode4.c
10
pico/mode4.c
|
@ -232,14 +232,18 @@ static void DrawDisplayM4(int scanline)
|
|||
|
||||
// Find the line in the name table
|
||||
line = pv->reg[9] + scanline; // vscroll + scanline
|
||||
line &= 0xff;
|
||||
|
||||
// Find name table:
|
||||
nametab = PicoMem.vram;
|
||||
if ((Pico.video.reg[0] & 6) == 6 && (Pico.video.reg[1] & 0x18))
|
||||
if ((pv->reg[0] & 6) == 6 && (pv->reg[1] & 0x18)) {
|
||||
line &= 0xff;
|
||||
nametab += ((pv->reg[2] & 0x0c) << (10-1)) + (0x700 >> 1);
|
||||
else
|
||||
} else {
|
||||
while (line >= 224) line -= 224;
|
||||
nametab += (pv->reg[2] & 0x0e) << (10-1);
|
||||
// old SMS only, masks line:7 with reg[2]:0 for address calculation
|
||||
//if ((pv->reg[2] & 0x01) == 0) line &= 0x7f;
|
||||
}
|
||||
nametab += (line>>3) << (6-1);
|
||||
|
||||
dx = pv->reg[8]; // hscroll
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue