SMS emulator running on SATURN

GO TO ADMIN PANEL > ADD-ONS AND INSTALL VERTIFORO SIDEBAR TO SEE FORUMS AND SIDEBAR

Denis

New Member
Joined
Nov 16, 2001
Messages
91
Points
6
Website
Visit site
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?
 

Artemio Urbina

New Member
Joined
Apr 16, 2001
Messages
237
Points
16
Website
junkerhq.net
WOW! Great news man =)

Congratulations.. Hope I had some real time to help you out in those proyects...

Ahhh.. *sigh*

Someday
 

Denis

New Member
Joined
Nov 16, 2001
Messages
91
Points
6
Website
Visit site
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 :((
 

TakaIsSilly

New Member
Joined
Aug 1, 2001
Messages
364
Points
16
Website
www.emuhq.com
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)
 

Denis

New Member
Joined
Nov 16, 2001
Messages
91
Points
6
Website
Visit site
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)
 

TakaIsSilly

New Member
Joined
Aug 1, 2001
Messages
364
Points
16
Website
www.emuhq.com
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.
 

TakaIsSilly

New Member
Joined
Aug 1, 2001
Messages
364
Points
16
Website
www.emuhq.com
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)
 

Denis

New Member
Joined
Nov 16, 2001
Messages
91
Points
6
Website
Visit site
TakaIsSilly!

I send you via email my current sources for SMS emu port. Hope you find something in it (maybe correct colors decoding)?
 

TakaIsSilly

New Member
Joined
Aug 1, 2001
Messages
364
Points
16
Website
www.emuhq.com
Your video access is trying to do 16-bit coloring (like the PSX). That's quite odd considering you seem to be in a 256 color mode.
 

Daniel Eriksson

New Member
Joined
May 5, 2001
Messages
602
Points
16
Website
server3002.freeyellow.com
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!
 

Denis

New Member
Joined
Nov 16, 2001
Messages
91
Points
6
Website
Visit site
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
 

IceDigger

Founder
Staff member
Joined
Apr 16, 2001
Messages
5,516
Points
38
Age
39
Location
USA
Website
www.segaxtreme.net
since I'm really low on blanks right now.. how's the speed, and most importantly (for PS), is savegame support implemented already?
 

Denis

New Member
Joined
Nov 16, 2001
Messages
91
Points
6
Website
Visit site
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.
 
Top