forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Fullscreen SMS using SDL

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
rinco



Joined: 21 Jan 2005
Posts: 255
Location: Canberra, Australia

PostPosted: Sun Aug 21, 2005 12:36 pm    Post subject: Fullscreen SMS using SDL Reply with quote

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/sms_sdl-0.9.4a-r7.1-src.zip

2. Create Makefile.psp

Code:

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:

#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.
Back to top
View user's profile Send private message
rinco



Joined: 21 Jan 2005
Posts: 255
Location: Canberra, Australia

PostPosted: Tue Aug 23, 2005 9:02 pm    Post subject: Reply with quote

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

Code:

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

#ifndef PSP
  SDL_LockAudio();
#endif
  p = (short*)sdl_sound.current_pos;
  for(i = 0; i < snd.bufsize; ++i) {
      *p = snd.buffer[0][i];
      ++p;
      *p = snd.buffer[1][i];
      ++p;
  }
  sdl_sound.current_pos = (char*)p;
  sdl_sound.current_emulated_samples += snd.bufsize * 2 * sizeof(short);
#ifndef PSP
  SDL_UnlockAudio();
#endif
}
Back to top
View user's profile Send private message
Thanhda



Joined: 09 Apr 2005
Posts: 331
Location: Canada

PostPosted: Wed Aug 24, 2005 6:42 am    Post subject: Reply with quote

link doesnt work
_________________
There are 10 types of people in the world: Those who understand binary, and those who don't...
Back to top
View user's profile Send private message Visit poster's website
rinco



Joined: 21 Jan 2005
Posts: 255
Location: Canberra, Australia

PostPosted: Wed Aug 24, 2005 7:47 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Wraggster



Joined: 26 Aug 2005
Posts: 121

PostPosted: Wed Aug 31, 2005 12:19 pm    Post subject: Reply with quote

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

DCEMU The Worlds Only Homebrew & Gaming Network of Sites.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group