• Rise from your gwave!


Discussion in 'Saturn Dev' started by Supa sonic, Feb 12, 2002.

  1. Supa sonic

    Supa sonic New Member

    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));


    //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));


    while(TRUE) {

    if(Per_Connect1) {

    PerDigital* pad;

    pad = Smpc_Peripheral + 0;

    if(!(pad->data & PER_DGT_ST)) break;




  2. Artemio Urbina

    Artemio Urbina New Member

    What is the problem you have?
  3. TakaIsSilly

    TakaIsSilly New Member

    Well, you lack a bracket for the main cycle, and i'm not sure if the VRAM defines are in the sgl.h or if i added them on another .h file. Also, you might need to add -cd to the compiler makefiles (if you're not using the one Denis uses). But you really need to be more explicit.

    (Edited by TakaIsSilly at 9:31 pm on Feb. 12, 2002)
  4. RadSil

    RadSil New Member

    It's good that you acknowledge the people that you use code from, but what is that little snippet even supposed to do? What exactly are you writing?

Share This Page