SMS emulator running on SATURN

by the way. It's the port of SMS Plus. And basically those screenshots is the result of about 1 hour work.

I.e. it's a very very buggy port (and in part of gfx it's even more hack then port :)) ). For now it's already supports controls. But the 2 main problems is:

1) GFX (colors are far far away from propertly)

2) only 131072 sms roms supported (possibly same size gg roms too - but i dont have such to test). Anything bigger then 131072 crash Saturn.

Current to do:

1) Implement off-screen buffer (really this emulator draws every pixel of the frame - but with "off_screen" buffer it will draw only changed pixels). It's already uses frameskips.

2) SMS uses fixed pallette?
 
news.

Now 262144 bytes size roms works! no matter SMS or GG (i.e. i want to say gg works too :) )

Bigger then 262144 still crash saturn :(

check for new screenshots at http://phemusat.tripod.com

implemented off-screen buffer, but it have some problems with frameskipping (i.e. need update off screen buffer more then actual frames displayed - or there will be some glitches with no removing of old sprites).

Still dont know what to do with propertly colors decoding. Need here a serious help with it :((
 
Nice! I knew someone would pull tru.

Now, some help. This program has a 16-bit renderer you could use, but I guess adding this pallete renderer is a simpler choice.

Code:
/* Update VGA palette hardware */

void update_palette(void)

{

  color_palette = (Uint16 *) VDP2_COLRAM;

  int index;

  if(bitmap.pal.update == 0) return;

  for(index = 0; index < PALETTE_SIZE; index += 1)

  {

  color_palette[index]=makecol8(bitmap.pal.color[index][0],bitmap.pal.color[index][1],bitmap.pal.color[index][2]);

    }

  }

  bitmap.pal.update = 0;

}

(EDIT : ups, not i, index. And i forgot the correct place for pallete... ARG!)

use the makecol8 function I created for the Phoenix emu... Don't worry about the "hack" graphics, here is no need for making all emulators run under the tile-based system of Saturn (altough they will run faster that way)

Now, for the file loading problem...

You'll need to use the Work RAM space :

cart.rom = (Uint8 *) 0x00200000;

This is the place where I load Chibi Maruko Chan on Stardust, and it's a free, fast 1MByte of space... Don't forget to increase the number of sectors (the last number) LoadROM uses!

(Edited by TakaIsSilly at 7:43 am on Dec. 19, 2001)

(Edited by TakaIsSilly at 7:47 am on Dec. 19, 2001)

(Edited by TakaIsSilly at 7:51 am on Dec. 19, 2001)
 
Hi!

By the way for "hack" i mean not the tile system - i use saturn bitmap functions :) i.e. the slBMPset works ok.

For hack i mean that bitmaps must have palette loaded into corresponding nbg color ram - and there i used... color roms from phoenix. So why it's all so bad with colors.

Will try your method now.

(the thing with cart.rom looks cool - maybe because of it all roms bigger then 256kb crashs)
 
Geez, that's a bit extreme... Here's a thingie that creates a all diferent colors pallete :

void quick_pal(void) {

color_palette = (Uint16 *) VDP2_COLRAM;

int index;

for(index = 0; index <= 0x1F; index += 1){

color_palette[index]=makecol8(index,index,index); //Grayscale

color_palette[index+32]=makecol8(index,0,0); //Red

color_palette[index+64]=makecol8(0,index,0); //Green

color_palette[index+96]=makecol8(0,0,index); //Blue

}

}

(again, use makecol8 from the Phoenix emu)

This covers the first 128 colors (SMS uses only 64), and it's way faster and nicer looking that the poor looking Phoenix palletes.
 
Just to add. Never trust malloc() on Saturn. It's a fiend of the devil, since it basicly alocates memory without really checking if he's overwriting other static data other than what the original program creates (ie. libraries and the SGL enviorment could be overwritten)
 
TakaIsSilly!

I send you via email my current sources for SMS emu port. Hope you find something in it (maybe correct colors decoding)?
 
Really cool! An SMS emulator for Saturn! That is amazing! I am sad that i can´t help with anything, but i have just started to learn Saturn C. :) But i really hope this will work! Great work!
 
TakaIsSilly!

Color decoding works now ok!! Used firts variant of palette setting (as in your first message - lightly modified variant of dos.c "update_palette()", the "extreme" variant not work)

Also using new memory assigment (pointer) for base_rom (as you mentioned) - gives working 512kb roms!! Phantasy star works!

new screenshots

http://phemusat.tripod.com
 
since I'm really low on blanks right now.. how's the speed, and most importantly (for PS), is savegame support implemented already?
 
Didnt check it yet on real saturn. But possibly it will be (very|little) slow :(

About savestate - currently not implemented, but saturn backup library functions well documented (sorta from samples), so here is no problem to do it.
 
What speed does the emu run at on the Saturn? Does it support save states and about how many games does it support? Thanks.
 
Back
Top