mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
sms, cleanup, add missing tms palette to gp2x
This commit is contained in:
parent
39194ef19e
commit
e5a1d4c5f1
3 changed files with 25 additions and 19 deletions
18
pico/mode4.c
18
pico/mode4.c
|
@ -742,21 +742,22 @@ void PicoFrameStartSMS(void)
|
|||
|
||||
// Copy LCD enable flag for easier handling
|
||||
Pico.m.hardware &= ~PMS_HW_LCD;
|
||||
if ((PicoIn.opt & POPT_EN_GG_LCD) && (PicoIn.AHW & PAHW_GG))
|
||||
if ((PicoIn.opt & POPT_EN_GG_LCD) && (PicoIn.AHW & PAHW_GG)) {
|
||||
Pico.m.hardware |= PMS_HW_LCD;
|
||||
|
||||
if (!(Pico.m.hardware & PMS_HW_LCD) && (mode & 4) && (Pico.video.reg[0] & 0x20)) {
|
||||
// SMS mode 4 with 1st column blanked
|
||||
columns = 248;
|
||||
Pico.est.rendstatus |= PDRAW_SMS_BLANK_1;
|
||||
}
|
||||
if (Pico.m.hardware & PMS_HW_LCD) {
|
||||
// GG LCD always has 160x144 regardless of settings
|
||||
screen_offset = 24; // nonetheless the vdp timing has 224 lines
|
||||
loffs = 48;
|
||||
lines = 144;
|
||||
columns = 160;
|
||||
} else switch (mode) {
|
||||
} else {
|
||||
if ((mode & 4) && (Pico.video.reg[0] & 0x20)) {
|
||||
// SMS mode 4 with 1st column blanked
|
||||
columns = 248;
|
||||
Pico.est.rendstatus |= PDRAW_SMS_BLANK_1;
|
||||
}
|
||||
|
||||
switch (mode) {
|
||||
// SMS2 only 224/240 line modes, e.g. Micro Machines
|
||||
case 0x06|0x08:
|
||||
loffs = screen_offset = 0;
|
||||
|
@ -767,6 +768,7 @@ void PicoFrameStartSMS(void)
|
|||
lines = 224;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
line_offset = 8; // FinalizeLine requires HighCol+8
|
||||
// ugh... nonetheless has offset in 8-bit fast mode if 1st col blanked!
|
||||
|
|
|
@ -574,7 +574,7 @@ static int menu_loop_32x_options(int id, int keys)
|
|||
|
||||
static const char *sms_hardwares[] = { "auto", "Game Gear", "Master System", "SG-1000", "SC-3000", NULL };
|
||||
static const char *gg_ghosting_opts[] = { "OFF", "weak", "normal", NULL };
|
||||
static const char *sms_mappers[] = { "auto", "Sega", "Codemasters", "Korea", "Korea MSX", "Korea X-in-1", "Korea 4-Pak", "Korea Janggun", "Korea Nemesis", "Taiwan 8K RAM", "Korea XOR", NULL };
|
||||
static const char *sms_mappers[] = { "auto", "Sega", "Codemasters", "Korea", "Korea MSX", "Korea X-in-1", "Korea 4-Pak", "Korea Janggun", "Korea Nemesis", "Taiwan 8K RAM", "Korea XOR", "Sega 32K RAM", NULL };
|
||||
static const char h_smsfm[] = "FM sound is only supported by few games\nOther games may crash with FM enabled";
|
||||
static const char h_ghost[] = "simulates the inertia of the GG LCD display";
|
||||
|
||||
|
|
|
@ -361,12 +361,16 @@ static int make_local_pal_sms(int fast_mode)
|
|||
// SMS palette for TMS modes
|
||||
0x0000, 0x0000, 0x00a0, 0x00f0, 0x0500, 0x0f00, 0x0005, 0x0ff0,
|
||||
0x000a, 0x000f, 0x0055, 0x00ff, 0x0050, 0x0f0f, 0x0555, 0x0fff,
|
||||
// TMS palette
|
||||
0x0000, 0x0000, 0x04c2, 0x07d6, 0x0e55, 0x0f77, 0x055c, 0x0ee4,
|
||||
0x055f, 0x077f, 0x05bc, 0x08ce, 0x03a2, 0x0b5c, 0x0ccc, 0x0fff,
|
||||
};
|
||||
int i;
|
||||
|
||||
if (!(Pico.video.reg[0] & 0x4)) {
|
||||
for (i = Pico.est.SonicPalCount; i >= 0; i--) {
|
||||
bgr444_to_rgb32(localPal+i*0x40, tmspal, 32);
|
||||
int sg = !!(PicoIn.AHW & (PAHW_SG|PAHW_SC));
|
||||
bgr444_to_rgb32(localPal+i*0x40, tmspal+sg*0x10, 32);
|
||||
memcpy(localPal+i*0x40+0x20, localPal+i*0x40, 0x20*4);
|
||||
}
|
||||
} else if (fast_mode) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue