Turns out RGB16 actualy puts blue first, title palette fixed

Libretro port builds again too.
This commit is contained in:
meepingsnesroms
2018-06-17 12:51:02 -07:00
parent 5dcef71579
commit f8cf37cb32
5 changed files with 11 additions and 8 deletions

View File

@@ -377,7 +377,7 @@ var listRomInfo(){
if(getButtonPressed(buttonSelect)){
//ROM must be attached to CSA(chip select a) on Dragonball VZ as it controls the boot up process
//the only 2 restrictions to use this dumper are, you need a Dragonball VZ Palm and internal RAM must be bigger than ROM / 128k rounded up to the nearest power of 2 * 128k
//the only 3 restrictions to use this dumper are, you need a Dragonball VZ Palm, an SD card must be inserted and the SD card must be bigger than ROM / 128k rounded up to the nearest power of 2 * 128k
uint16_t csa = readArbitraryMemory16(HW_REG_ADDR(CSA));
uint16_t csgba = readArbitraryMemory16(HW_REG_ADDR(CSGBA));
uint16_t csugba = readArbitraryMemory16(HW_REG_ADDR(CSUGBA));

View File

@@ -243,7 +243,7 @@ void retro_run(void)
palmInput.buttonSelect = input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_R);
//app buttons
palmInput.buttonCalender = input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_Y);
palmInput.buttonCalendar = input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_Y);
palmInput.buttonAddress = input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_X);
palmInput.buttonTodo = input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_B);
palmInput.buttonNotes = input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_A);

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.6.1, 2018-06-17T11:03:02. -->
<!-- Written by QtCreator 4.6.1, 2018-06-17T11:54:56. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

View File

@@ -330,10 +330,10 @@ void sed1376Render(){
//rotation
//later, unemulated
//software display inversion
//display inversion
if((sed1376Registers[DISP_MODE] & 0x30) == 0x10)
MULTITHREAD_LOOP for(uint32_t count = 0; count < 160 * 160; count++)
palmFramebuffer[count] ^= 0xFFFF;
palmFramebuffer[count] = ~palmFramebuffer[count];
//backlight off, half color intensity
if(!palmMisc.backlightOn)

View File

@@ -10,10 +10,13 @@ static inline uint32_t handlePanelDataSwaps(uint32_t address){
}
//color conversion
static inline uint16_t swapRedBlue(uint16_t color){
return color << 11 | (color & 0x07E0) | color >> 11;
}
static inline uint16_t makeRgb16FromSed666(uint8_t r, uint8_t g, uint8_t b){
uint16_t color = r >> 2 << 10 & 0xF800;
uint16_t color = b >> 2 << 10 & 0xF800;
color |= g >> 2 << 5 & 0x07E0;
color |= b >> 2 >> 1 & 0x001F;
color |= r >> 2 >> 1 & 0x001F;
return color;
}
static inline uint16_t makeRgb16FromGreenComponent(uint16_t g){
@@ -58,7 +61,7 @@ static uint16_t get8BppColor(uint16_t x, uint16_t y){
return sed1376OutputLut[sed1376Framebuffer[handlePanelDataSwaps(screenStartAddress + y * lineSize + x)]];
}
static uint16_t get16BppColor(uint16_t x, uint16_t y){
return sed1376Framebuffer[handlePanelDataSwaps(screenStartAddress + (y * lineSize + x) * 2)] << 8 | sed1376Framebuffer[handlePanelDataSwaps(screenStartAddress + (y * lineSize + x) * 2 + 1)];
return swapRedBlue(sed1376Framebuffer[handlePanelDataSwaps(screenStartAddress + (y * lineSize + x) * 2)] << 8 | sed1376Framebuffer[handlePanelDataSwaps(screenStartAddress + (y * lineSize + x) * 2 + 1)]);
}
static inline void selectRenderer(bool color, uint8_t bpp){