HomeForumsWhat's newResources 
 
 
New version of Phoenix emu + source code
Denis - Nov 20, 2001
 Denis Nov 20, 2001
http://phemusat.tripod.com/

ISO file http://phemusat.tripod.com/satphx021.zip...

source code http://phemusat.tripod.com/phemu021.zip...

original source code by Jim Skilskyj http://phemusat.tripod.com/emulate.zip...

documentation from "Arcde Emulation How-to" about writining Phoenix emulator

Phoenix ROMs http://phemusat.tripod.com/phxroms.zip


 Denis Nov 20, 2001
Current status.

what to do:

1. Find what makes those annoying garbage on screen.

(need to somehow reset/clear vram? or propertly init TV mode?)

2. Add controls.

 Denis Nov 20, 2001
little addition (if someone have problems with it)

seems that tripod not allowed to d/l binary (not txt) files directly via right click/save as.. at first time. You need firstly left click on file link and after it you get to tripod.com file download page (there you can save as..). Antileech system?

 TakaIsSilly Nov 21, 2001
Hu. let me have a look. Oh, i see... let's see what can I do to help.

You need to clear the tile memory every loop.

You need something like...

Code:
  
void ClsFast(){

 int i;

 uint8 *ASCITile;

 ASCITile = ???? #The ASCII tile data location is somewere in the SGL Tutorial...

 for(i=0;i<=0x2000;i++) *(ASCITile++) = 0x00;

}

(could be even more optimized...)

or this slower version, that works right out of the box:

Code:
  
void ClsSlo(){

 int x,y;

 for(x=0;x<=0x40;x++){

  for(y=0;y<=0x40;y++){

   slPrint(" ", slLocate(x,y));

  }

 }

}

Saturn also likes to synch the system. This means the system will run at 60fps, if possible. Add this code around here, i guess:

Code:
  
unsigned Z80_RDMEM(dword A)

{

if (A >= 0x7800 && A <=0x7bff)

    {

    if(DipSwitchSYNC == 1)

        {

        [b]ClsFast();[/b]

        VideoDraw();

        [b]slSynch()[/b]

        DipSwitchSYNC = 0;

        return 128;

        }

        else

        return 0;

    }

    else if (A < 0x8000)

    return RAM[A];

    slPrint("WARNING! Reading from", slLocate(1,16));

    return RAM[A];

}

Take this with a grain of salt, i just glanced into the code. If you need help with the controllers, I can also do something for you, but I belive you can figure it out

 Denis Nov 21, 2001
Wohoo! Thank you! Will try it right now.

About controllers. Yes already implemented it. Can't right now upload source. but here is the cut from it (if someone want to try it now):

unsigned Z80_RDMEM(dword A)

{

Uint16 data;

data = Smpc_Peripheral[0].data;

if (A >= 0x7800 && A <=0x7bff)

{

if(DipSwitchSYNC == 1)

{

VideoDraw();

DipSwitchSYNC = 0;

return 128;

}

else

return 0;

}

else if (A >= 0x7000 && A <= 0x73FF)

{

byte hexdata = 0xff;

if ((data & PER_DGT_TR) == 0)hexdata &= ~(1<<0); // Right shift = coin 1

if ((data & PER_DGT_ST) == 0)hexdata &= ~(1<<1); // START button = 1p start

if ((data & PER_DGT_TC) == 0)hexdata &= ~(1<<4); // C button = fire

if ((data & PER_DGT_KR) == 0)hexdata &= ~(1<<5); // D-Right = right

if ((data & PER_DGT_KL) == 0)hexdata &= ~(1<<6); // D-Left = left

if ((data & PER_DGT_TB) == 0)hexdata &= ~(1<<7); // B button = shield

return hexdata;

}

else if (A < 0x8000)

return RAM[A];

slPrint("WARNING! Reading from", slLocate(1,16));

return RAM[A];

}