Discuss the development of new homebrew software, tools and libraries.
Moderators: cheriff, TyRaNiD
-
rinco
- Posts: 255
- Joined: Fri Jan 21, 2005 2:12 pm
- Location: Canberra, Australia
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(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
}
-
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...
-
Wraggster
- Posts: 121
- Joined: Fri Aug 26, 2005 7:40 am
-
Contact:
Post
by Wraggster »
ive let Yoshi know your after the Sources :)