here is my code. it is based off the phoenix emu by denis.
:
#include "sgl.h"
#include "sgl_cd.h"
void LoadFile(char *name, Uint8 *location, Uint32 size);
Uint16 makecol8(Uint8 r, Uint8 g, Uint8 b);
void ClsFast(Uint8 *maplocation);
void Video_Decode(void);
void load_color_proms();
Z80_Regs regs;
int Z80_IRQ=-1;
int Z80_Iperiod = 12000;
int DipSwitchSYNC = 0;
unsigned int scroll_reg;
int main(int argc,char **argv)
{
slInitSystem(TV_320x480, NULL, 1);
slScrPosNbg0(toFIXED(-180) , toFIXED(0));
slTVOff();
//Generic memory initialization
color_palette = (Uint16 *) VDP2_COLRAM;//Set the start of the Color RAM
tile_data = (Uint8 *) VDP2_VRAM_A1;//Set the Video Ram location
tile_data2 = (Uint8 *) VDP2_VRAM_B1;
map_data = (Uint16 *) VDP2_VRAM_A0;//Set the Map Data location
gfx_data = (Uint16 *) VDP2_VRAM_A0 + 0x2000;//Set the Gfx Data location
slPrint("turbo saturn 32 ", slLocate(1,1));
slPrint("made by Supa Sonic ", slLocate(1,2));
slPrint("wang_fo@hotmail.com", slLocate(1,3));
slPrint("thanks to: Denis an TakaIsSilly",slLocate(1,4);
slPrint("code based ofF of Denis phoenix emu",slLocate(1,5)
slPrint("Controls:", slLocate(1,9));
slPrint("START - run", slLocate(1,10));
slPrint("C - 2", slLocate(1,11));
slPrint("B - 1", slLocate(1,12));
slPrint("D-pad - U/D/L/R", slLocate(1,13));
slPrint("A - LOAD ROM ", slLocate(1,14));
slPrint("PRESS A TO LOAD ROM", slLocate(1,16));
slTVOn();
while(TRUE) {
if(Per_Connect1) {
PerDigital* pad;
pad = Smpc_Peripheral + 0;
if(!(pad->data & PER_DGT_ST)) break;
}
slSynch();
}
END
:
#include "sgl.h"
#include "sgl_cd.h"
void LoadFile(char *name, Uint8 *location, Uint32 size);
Uint16 makecol8(Uint8 r, Uint8 g, Uint8 b);
void ClsFast(Uint8 *maplocation);
void Video_Decode(void);
void load_color_proms();
Z80_Regs regs;
int Z80_IRQ=-1;
int Z80_Iperiod = 12000;
int DipSwitchSYNC = 0;
unsigned int scroll_reg;
int main(int argc,char **argv)
{
slInitSystem(TV_320x480, NULL, 1);
slScrPosNbg0(toFIXED(-180) , toFIXED(0));
slTVOff();
//Generic memory initialization
color_palette = (Uint16 *) VDP2_COLRAM;//Set the start of the Color RAM
tile_data = (Uint8 *) VDP2_VRAM_A1;//Set the Video Ram location
tile_data2 = (Uint8 *) VDP2_VRAM_B1;
map_data = (Uint16 *) VDP2_VRAM_A0;//Set the Map Data location
gfx_data = (Uint16 *) VDP2_VRAM_A0 + 0x2000;//Set the Gfx Data location
slPrint("turbo saturn 32 ", slLocate(1,1));
slPrint("made by Supa Sonic ", slLocate(1,2));
slPrint("wang_fo@hotmail.com", slLocate(1,3));
slPrint("thanks to: Denis an TakaIsSilly",slLocate(1,4);
slPrint("code based ofF of Denis phoenix emu",slLocate(1,5)
slPrint("Controls:", slLocate(1,9));
slPrint("START - run", slLocate(1,10));
slPrint("C - 2", slLocate(1,11));
slPrint("B - 1", slLocate(1,12));
slPrint("D-pad - U/D/L/R", slLocate(1,13));
slPrint("A - LOAD ROM ", slLocate(1,14));
slPrint("PRESS A TO LOAD ROM", slLocate(1,16));
slTVOn();
while(TRUE) {
if(Per_Connect1) {
PerDigital* pad;
pad = Smpc_Peripheral + 0;
if(!(pad->data & PER_DGT_ST)) break;
}
slSynch();
}
END