Fullscreen SMS using SDL

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Fullscreen SMS using SDL

Post by rinco »

I can't seem to find the sources for Yoshi's port of SMS.

So I started from scratch.

1. Download http://membres.lycos.fr/cyxdown/smssdl/ ... .1-src.zip

2. Create Makefile.psp

Code: Select all

TARGET = sms
PSPSDK=$(shell psp-config --pspsdk-path)
PSPBIN = $(PSPSDK)/../bin
SDL_CONFIG = $(PSPBIN)/sdl-config

OBJS   = main.o saves.o sdlsms.o filters.o \
            ../render.o ../sms.o ../system.o ../vdp.o \
            ../cpu/z80.o ../sound/emu2413.o ../sound/sn76496.o

INCDIR = 
CFLAGS = -O2 -G0 -Wall $(shell $(SDL_CONFIG) --cflags) \
        -I. -I.. -I../cpu -I../sound -DLSB_FIRST -DALIGN_DWORD
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti -Wpointer-arith 
ASFLAGS = $(CFLAGS)

LIBDIR =
LDFLAGS = 
LIBS = $(shell $(SDL_CONFIG) --libs) 

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = SMS/SDL

include $(PSPSDK)/lib/build.mak
3. Overcome command line arguments and main=>SDL_main

Code: Select all

#ifndef PSP
int main(int argc, char **argv)
{
#else
int SDL_main(int argc, char **dummy_argv)
{
  const char *argv[] = { "EBOOT.PBP", "rinco.gg", "--joystick", "--fullscreen", NULL };
  argc = 4;
#endif
4. build and install (and rename rom to rinco.gg)

So if someone can provide the Yoshi filebrowser, or make SDL_romselector.c... then that would be great.
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

to fix the sound, in sdlsms.c ...

Code: Select all

static void sdlsms_sound_update()
{
  int i;
  short* p;

#ifndef PSP
  SDL_LockAudio();
#endif
  p = (short*)sdl_sound.current_pos;
  for&#40;i = 0; i < snd.bufsize; ++i&#41; &#123;
      *p = snd.buffer&#91;0&#93;&#91;i&#93;;
      ++p;
      *p = snd.buffer&#91;1&#93;&#91;i&#93;;
      ++p;
  &#125;
  sdl_sound.current_pos = &#40;char*&#41;p;
  sdl_sound.current_emulated_samples += snd.bufsize * 2 * sizeof&#40;short&#41;;
#ifndef PSP
  SDL_UnlockAudio&#40;&#41;;
#endif
&#125;
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

link doesnt work
There are 10 types of people in the world: Those who understand binary, and those who don't...
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

looks like you have to hit the site twice to download, or go to http://membres.lycos.fr/cyxdown/smssdl/ and click on the latest src download.
Wraggster
Posts: 121
Joined: Fri Aug 26, 2005 7:40 am
Contact:

Post by Wraggster »

ive let Yoshi know your after the Sources :)
Webmaster of http://www.dcemu.co.uk

DCEMU The Worlds Only Homebrew & Gaming Network of Sites.
Post Reply