mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
psp fixes, gamma
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@302 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
9dc0982919
commit
2445b7cb6d
13 changed files with 237 additions and 55 deletions
|
@ -628,6 +628,13 @@ Additional thanks
|
|||
|
||||
Changelog
|
||||
---------
|
||||
1.35b
|
||||
* PSP: mp3 code should no longer fail on 1.5 firmware.
|
||||
+ PSP: added gamma adjustment option.
|
||||
* Fixed a sram bug in memhandlers (fixes Shining in the Darkness saves).
|
||||
* PSP: fixed another bug in memhanlers, which crashed the emu for some games
|
||||
(like NBA Jam).
|
||||
|
||||
1.35a
|
||||
* PSP: fixed a bug which prevented to load any ROMs after testing the BIOS.
|
||||
* PSP: fixed incorrect CZ80 memory map setup, which caused Z80 crashes and
|
||||
|
|
|
@ -468,7 +468,11 @@ int emu_ReadConfig(int game, int no_defaults)
|
|||
//scaling_update();
|
||||
// some sanity checks
|
||||
if (currentConfig.CPUclock < 10 || currentConfig.CPUclock > 4096) currentConfig.CPUclock = 200;
|
||||
#ifdef PSP
|
||||
if (currentConfig.gamma < -4 || currentConfig.gamma > 16) currentConfig.gamma = 0;
|
||||
#else
|
||||
if (currentConfig.gamma < 10 || currentConfig.gamma > 300) currentConfig.gamma = 100;
|
||||
#endif
|
||||
if (currentConfig.volume < 0 || currentConfig.volume > 99) currentConfig.volume = 50;
|
||||
#ifdef __GP2X__
|
||||
// if volume keys are unbound, bind them to volume control
|
||||
|
|
|
@ -74,6 +74,7 @@ typedef enum
|
|||
MA_OPT3_PRES_FULLSCR,
|
||||
MA_OPT3_FILTERING,
|
||||
MA_OPT3_VSYNC,
|
||||
MA_OPT3_GAMMAA,
|
||||
MA_OPT3_DONE,
|
||||
MA_CDOPT_TESTBIOS_USA,
|
||||
MA_CDOPT_TESTBIOS_EUR,
|
||||
|
|
|
@ -27,58 +27,62 @@ COPT += `pkg-config --cflags gthread-2.0`
|
|||
LDFLAGS += `pkg-config --libs gthread-2.0`
|
||||
|
||||
# frontend
|
||||
OBJS += ../gp2x/main.o ../gp2x/menu.o ../gp2x/emu.o ../gp2x/usbjoy.o blit.o \
|
||||
OBJS += platform/gp2x/main.o platform/gp2x/menu.o platform/gp2x/emu.o platform/gp2x/usbjoy.o blit.o \
|
||||
gp2x.o 940ctl_ym2612.o log_io.o
|
||||
|
||||
# common
|
||||
OBJS += ../common/emu.o ../common/menu.o ../common/fonts.o ../common/readpng.o ../common/mp3_helix.o
|
||||
OBJS += platform/common/emu.o platform/common/menu.o platform/common/fonts.o \
|
||||
platform/common/readpng.o platform/common/mp3_helix.o
|
||||
|
||||
# Pico
|
||||
OBJS += ../../Pico/Area.o ../../Pico/Cart.o ../../Pico/Memory.o ../../Pico/Misc.o \
|
||||
../../Pico/Pico.o ../../Pico/Sek.o ../../Pico/VideoPort.o ../../Pico/Draw2.o ../../Pico/Draw.o \
|
||||
../../Pico/Patch.o
|
||||
OBJS += Pico/Area.o Pico/Cart.o Pico/Memory.o Pico/Misc.o Pico/Pico.o Pico/Sek.o \
|
||||
Pico/VideoPort.o Pico/Draw2.o Pico/Draw.o Pico/Patch.o
|
||||
# Pico - CD
|
||||
OBJS += ../../Pico/cd/Pico.o ../../Pico/cd/Memory.o ../../Pico/cd/Sek.o ../../Pico/cd/LC89510.o \
|
||||
../../Pico/cd/cd_sys.o ../../Pico/cd/cd_file.o ../../Pico/cd/gfx_cd.o \
|
||||
../../Pico/cd/Area.o ../../Pico/cd/Misc.o ../../Pico/cd/pcm.o ../../Pico/cd/buffering.o
|
||||
OBJS += Pico/cd/Pico.o Pico/cd/Memory.o Pico/cd/Sek.o Pico/cd/LC89510.o \
|
||||
Pico/cd/cd_sys.o Pico/cd/cd_file.o Pico/cd/gfx_cd.o \
|
||||
Pico/cd/Area.o Pico/cd/Misc.o Pico/cd/pcm.o Pico/cd/buffering.o
|
||||
# Pico - sound
|
||||
OBJS += ../../Pico/sound/sound.o ../../Pico/sound/sn76496.o ../../Pico/sound/ym2612.o ../../Pico/sound/mix.o
|
||||
OBJS += Pico/sound/sound.o Pico/sound/sn76496.o Pico/sound/ym2612.o Pico/sound/mix.o
|
||||
# zlib
|
||||
OBJS += ../../zlib/gzio.o ../../zlib/inffast.o ../../zlib/inflate.o ../../zlib/inftrees.o ../../zlib/trees.o \
|
||||
../../zlib/deflate.o ../../zlib/crc32.o ../../zlib/adler32.o ../../zlib/zutil.o ../../zlib/compress.o
|
||||
OBJS += zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o \
|
||||
zlib/deflate.o zlib/crc32.o zlib/adler32.o zlib/zutil.o zlib/compress.o
|
||||
# unzip
|
||||
OBJS += ../../unzip/unzip.o ../../unzip/unzip_stream.o
|
||||
OBJS += unzip/unzip.o unzip/unzip_stream.o
|
||||
# CPU cores
|
||||
ifeq "$(use_musashi)" "1"
|
||||
DEFINC += -DEMU_M68K
|
||||
OBJS += ../../cpu/musashi/m68kops.o ../../cpu/musashi/m68kcpu.o
|
||||
OBJS += cpu/musashi/m68kops.o cpu/musashi/m68kcpu.o
|
||||
endif
|
||||
ifeq "$(use_fame)" "1"
|
||||
DEFINC += -DEMU_F68K
|
||||
OBJS += ../../cpu/fame/famec.o
|
||||
OBJS += cpu/fame/famec.o
|
||||
endif
|
||||
# z80
|
||||
ifeq "$(use_mz80)" "1"
|
||||
DEFINC += -D_USE_MZ80
|
||||
OBJS += ../../cpu/mz80/mz80.o
|
||||
OBJS += cpu/mz80/mz80.o
|
||||
else
|
||||
DEFINC += -D_USE_CZ80
|
||||
OBJS += ../../cpu/cz80/cz80.o
|
||||
OBJS += cpu/cz80/cz80.o
|
||||
endif
|
||||
# misc
|
||||
ifeq "$(use_fame)" "1"
|
||||
ifeq "$(use_musashi)" "1"
|
||||
OBJS += ../../Pico/Debug.o
|
||||
OBJS += ../../cpu/musashi/m68kdasm.o
|
||||
OBJS += Pico/Debug.o
|
||||
OBJS += cpu/musashi/m68kdasm.o
|
||||
endif
|
||||
endif
|
||||
|
||||
vpath %.c = ../..
|
||||
DIRS = platform platform/gp2x platform/common Pico Pico/cd Pico/sound zlib unzip \
|
||||
cpu cpu/musashi cpu/fame cpu/mz80 cpu/cz80
|
||||
|
||||
all: PicoDrive
|
||||
all: mkdirs PicoDrive
|
||||
clean: tidy
|
||||
@$(RM) PicoDrive
|
||||
tidy:
|
||||
@$(RM) $(OBJS)
|
||||
$(RM) $(OBJS)
|
||||
rm -rf $(DIRS)
|
||||
@make -C ../../cpu/mz80/ clean
|
||||
@make -C ../common/helix/ X86=1 clean
|
||||
|
||||
|
@ -86,11 +90,13 @@ PicoDrive : $(OBJS) ../common/helix/helix_mp3_x86.a
|
|||
@echo ">>>" $@
|
||||
$(GCC) $(COPT) $^ $(LDFLAGS) -lm -lpng -Wl,-Map=PicoDrive.map -o $@
|
||||
|
||||
mkdirs:
|
||||
mkdir -p $(DIRS)
|
||||
|
||||
../../cpu/musashi/m68kops.c :
|
||||
@make -C ../../cpu/musashi
|
||||
|
||||
../../cpu/mz80/mz80.o : ../../cpu/mz80/mz80.asm
|
||||
cpu/mz80/mz80.o : ../../cpu/mz80/mz80.asm
|
||||
@echo $@
|
||||
@nasm -f elf $< -o $@
|
||||
|
||||
|
@ -108,11 +114,11 @@ PicoDrive : $(OBJS) ../common/helix/helix_mp3_x86.a
|
|||
$(GCC) $(COPT) $(DEFINC) -c $< -o $@
|
||||
|
||||
|
||||
../../Pico/sound/ym2612.o : ../../Pico/sound/ym2612.c
|
||||
Pico/sound/ym2612.o : ../../Pico/sound/ym2612.c
|
||||
@echo ">>>" $@
|
||||
$(GCC) $(COPT_COMMON) $(DEFINC) -c $< -o $@
|
||||
|
||||
../../cpu/fame/famec.o : ../../cpu/fame/famec.c ../../cpu/fame/famec_opcodes.h
|
||||
cpu/fame/famec.o : ../../cpu/fame/famec.c ../../cpu/fame/famec_opcodes.h
|
||||
@echo ">>>" $<
|
||||
$(GCC) $(COPT) $(DEFINC) -Wno-unused -c $< -o $@
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ PSPSDK = $(shell psp-config --pspsdk-path)
|
|||
#use_musashi = 1
|
||||
#use_mz80 = 1
|
||||
amalgamate = 0
|
||||
for_15fw = 1
|
||||
|
||||
|
||||
CFLAGS += -I../.. -I. -DNO_SYNC
|
||||
|
@ -17,10 +18,13 @@ CFLAGS += -O2 -ftracer -fstrength-reduce -ffast-math
|
|||
else
|
||||
CFLAGS += -ggdb
|
||||
endif
|
||||
ifeq "$(for_15fw)" "1"
|
||||
CFLAGS += -DFW15
|
||||
endif
|
||||
|
||||
|
||||
# frontend
|
||||
OBJS += main.o emu.o mp3.o menu.o psp.o
|
||||
# frontend and stuff
|
||||
OBJS += main.o emu.o mp3.o menu.o psp.o asm_utils.o
|
||||
|
||||
# common
|
||||
OBJS += ../common/emu.o ../common/menu.o ../common/fonts.o ../common/readpng.o
|
||||
|
@ -81,7 +85,9 @@ EXTRA_TARGETS = EBOOT.PBP
|
|||
PSP_EBOOT_TITLE = PicoDrive
|
||||
PSP_EBOOT_ICON = data/icon.png
|
||||
#PSP_EBOOT_PIC1 = .png
|
||||
ifneq "$(for_15fw)" "1"
|
||||
BUILD_PRX = 1
|
||||
endif
|
||||
|
||||
CUSTOM_CLEAN = myclean
|
||||
|
||||
|
|
2
platform/psp/asm_utils.h
Normal file
2
platform/psp/asm_utils.h
Normal file
|
@ -0,0 +1,2 @@
|
|||
// pointers must be word aligned
|
||||
void do_pal_convert(unsigned short *dest, unsigned short *src, int gammaa_val);
|
122
platform/psp/asm_utils.s
Normal file
122
platform/psp/asm_utils.s
Normal file
|
@ -0,0 +1,122 @@
|
|||
# vim:filetype=mips
|
||||
|
||||
# some asm utils
|
||||
# (c) Copyright 2007, Grazvydas "notaz" Ignotas
|
||||
# All Rights Reserved
|
||||
|
||||
.set noreorder
|
||||
.set noat
|
||||
|
||||
.data
|
||||
.align 4
|
||||
|
||||
.byte 0, 1, 6, 11, 16, 21, 26, 31 # -4
|
||||
.byte 0, 2, 7, 12, 16, 21, 26, 31 # -3
|
||||
.byte 0, 3, 7, 12, 17, 22, 26, 31 # -2
|
||||
.byte 0, 4, 8, 13, 17, 22, 26, 31 # -1
|
||||
gmtab:
|
||||
.byte 0, 5, 10, 15, 16, 21, 26, 31 # 0
|
||||
.byte 0, 6, 10, 15, 19, 23, 27, 31
|
||||
.byte 0, 7, 11, 15, 19, 23, 27, 31
|
||||
.byte 0, 8, 12, 16, 19, 23, 27, 31
|
||||
.byte 0, 9, 12, 16, 20, 24, 27, 31
|
||||
.byte 0, 10, 13, 17, 20, 24, 27, 31
|
||||
.byte 0, 10, 14, 17, 21, 24, 28, 31
|
||||
.byte 0, 11, 15, 18, 21, 24, 28, 31
|
||||
.byte 0, 12, 15, 18, 22, 25, 28, 31
|
||||
.byte 0, 13, 16, 19, 22, 25, 28, 31
|
||||
.byte 0, 14, 17, 20, 22, 25, 28, 31 # 10
|
||||
.byte 0, 15, 17, 20, 23, 26, 28, 31
|
||||
.byte 0, 16, 18, 21, 23, 26, 28, 31
|
||||
.byte 0, 16, 19, 21, 24, 26, 29, 31
|
||||
.byte 0, 17, 20, 22, 24, 26, 29, 31
|
||||
.byte 0, 18, 20, 22, 25, 27, 29, 31
|
||||
.byte 0, 19, 21, 23, 25, 27, 29, 31 # 16
|
||||
|
||||
.text
|
||||
.align 4
|
||||
|
||||
# bbbb bggg gggr rrrr
|
||||
|
||||
.global do_pal_convert # dest, src, gammaa_val
|
||||
|
||||
do_pal_convert:
|
||||
bnez $a2, dpc_gma
|
||||
li $t0, 64/2
|
||||
lui $t2, 0x00e
|
||||
ori $t2, 0x00e
|
||||
lui $t3, 0x006
|
||||
ori $t3, 0x006
|
||||
lui $t4, 0x0e0
|
||||
ori $t4, 0x0e0
|
||||
lui $t6, 0xe00
|
||||
ori $t6, 0xe00
|
||||
lui $t7, 0x600
|
||||
ori $t7, 0x600
|
||||
|
||||
dpc_loop:
|
||||
lw $v0, 0($a1)
|
||||
addiu $a1, 4
|
||||
and $v1, $v0, $t2 # r
|
||||
sll $v1, 1
|
||||
and $t9, $v0, $t3
|
||||
srl $t9, 1
|
||||
or $v1, $t9 # r
|
||||
and $t9, $v0, $t4 # g
|
||||
sll $t8, $t9, 3
|
||||
or $v1, $t8
|
||||
or $v1, $t9 # g
|
||||
and $t9, $v0, $t6 # b
|
||||
sll $t9, 4
|
||||
or $v1, $t9
|
||||
and $t9, $v0, $t7
|
||||
sll $t9, 2
|
||||
or $v1, $t9 # b
|
||||
sw $v1, 0($a0)
|
||||
addiu $t0, -1
|
||||
bnez $t0, dpc_loop
|
||||
addiu $a0, 4
|
||||
|
||||
jr $ra
|
||||
nop
|
||||
|
||||
dpc_gma:
|
||||
sll $a2, 3
|
||||
lui $t1, %hi(gmtab)
|
||||
addiu $t1, %lo(gmtab)
|
||||
addu $a2, $t1
|
||||
|
||||
dpc_gma_loop:
|
||||
lw $v0, 0($a1)
|
||||
addiu $a1, 4
|
||||
ext $v1, $v0, 1, 3
|
||||
addu $v1, $a2
|
||||
lb $v1, 0($v1)
|
||||
ext $t1, $v0, 5, 3
|
||||
addu $t1, $a2
|
||||
lb $t1, 0($t1)
|
||||
ext $t2, $v0, 9, 3
|
||||
addu $t2, $a2
|
||||
lb $t2, 0($t2)
|
||||
ext $t3, $v0, 17, 3
|
||||
addu $t3, $a2
|
||||
lb $t3, 0($t3)
|
||||
ext $t4, $v0, 21, 3
|
||||
addu $t4, $a2
|
||||
lb $t4, 0($t4)
|
||||
ext $t5, $v0, 25, 3
|
||||
addu $t5, $a2
|
||||
lb $t5, 0($t5)
|
||||
ins $v1, $t1, 6, 5
|
||||
ins $v1, $t2, 11, 5
|
||||
ins $v1, $t3, 16, 5
|
||||
ins $v1, $t4, 22, 5
|
||||
ins $v1, $t5, 27, 5
|
||||
sw $v1, 0($a0)
|
||||
addiu $t0, -1
|
||||
bnez $t0, dpc_gma_loop
|
||||
addiu $a0, 4
|
||||
|
||||
jr $ra
|
||||
nop
|
||||
|
|
@ -17,6 +17,7 @@
|
|||
#include "menu.h"
|
||||
#include "emu.h"
|
||||
#include "mp3.h"
|
||||
#include "asm_utils.h"
|
||||
#include "../common/emu.h"
|
||||
#include "../common/lprintf.h"
|
||||
#include "../../Pico/PicoInt.h"
|
||||
|
@ -239,25 +240,25 @@ static void set_scaling_params(void)
|
|||
|
||||
static void do_pal_update(int allow_sh)
|
||||
{
|
||||
unsigned int *spal=(void *)Pico.cram;
|
||||
unsigned int *dpal=(void *)localPal;
|
||||
int i;
|
||||
|
||||
for (i = 0x3f/2; i >= 0; i--)
|
||||
dpal[i] = ((spal[i]&0x000f000f)<< 1)|((spal[i]&0x00f000f0)<<3)|((spal[i]&0x0f000f00)<<4);
|
||||
//for (i = 0x3f/2; i >= 0; i--)
|
||||
// dpal[i] = ((spal[i]&0x000f000f)<< 1)|((spal[i]&0x00f000f0)<<3)|((spal[i]&0x0f000f00)<<4);
|
||||
do_pal_convert(localPal, Pico.cram, currentConfig.gamma);
|
||||
|
||||
if (allow_sh && (Pico.video.reg[0xC]&8)) // shadow/hilight?
|
||||
{
|
||||
// shadowed pixels
|
||||
for (i = 0x3f/2; i >= 0; i--)
|
||||
dpal[0x20|i] = dpal[0x60|i] = (dpal[i]>>1)&0x738e738e;
|
||||
dpal[0x20|i] = dpal[0x60|i] = (dpal[i]>>1)&0x7bcf7bcf;
|
||||
// hilighted pixels
|
||||
for (i = 0x3f; i >= 0; i--) {
|
||||
int t=localPal[i]&0xe71c;t+=0x4208;
|
||||
if (t&0x20) t|=0x1c;
|
||||
if (t&0x800) t|=0x700;
|
||||
if (t&0x10000) t|=0xe000;
|
||||
t&=0xe71c;
|
||||
int t=localPal[i]&0xf79e;t+=0x4208;
|
||||
if (t&0x20) t|=0x1e;
|
||||
if (t&0x800) t|=0x780;
|
||||
if (t&0x10000) t|=0xf000;
|
||||
t&=0xf79e;
|
||||
localPal[0x80|i]=(unsigned short)t;
|
||||
}
|
||||
localPal[0xe0] = 0;
|
||||
|
|
|
@ -13,14 +13,11 @@
|
|||
#include "../common/lprintf.h"
|
||||
#include "version.h"
|
||||
|
||||
#define GPROF 0
|
||||
#define GCOV 0
|
||||
|
||||
#if GPROF
|
||||
#ifdef GPROF
|
||||
#include <pspprof.h>
|
||||
#endif
|
||||
|
||||
#if GCOV
|
||||
#ifdef GCOV
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -32,7 +29,7 @@ void dummy(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
int main()
|
||||
int pico_main(void)
|
||||
{
|
||||
lprintf("\nPicoDrive v" VERSION " " __DATE__ " " __TIME__ "\n");
|
||||
psp_init();
|
||||
|
@ -49,7 +46,7 @@ int main()
|
|||
switch (engineState)
|
||||
{
|
||||
case PGS_Menu:
|
||||
#if !GPROF
|
||||
#ifndef GPROF
|
||||
menu_loop();
|
||||
#else
|
||||
strcpy(romFileName, currentConfig.lastRomFile);
|
||||
|
@ -73,7 +70,7 @@ int main()
|
|||
|
||||
case PGS_Running:
|
||||
emu_Loop();
|
||||
#if GPROF
|
||||
#ifdef GPROF
|
||||
goto endloop;
|
||||
#endif
|
||||
break;
|
||||
|
@ -91,10 +88,10 @@ int main()
|
|||
|
||||
mp3_deinit();
|
||||
emu_Deinit();
|
||||
#if GPROF
|
||||
#ifdef GPROF
|
||||
gprof_cleanup();
|
||||
#endif
|
||||
#if !GCOV
|
||||
#ifndef GCOV
|
||||
psp_finish();
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1006,6 +1006,7 @@ menu_entry opt3_entries[] =
|
|||
{ NULL, MB_NONE, MA_OPT3_HSCALE32, NULL, 0, 0, 0, 1 },
|
||||
{ NULL, MB_NONE, MA_OPT3_HSCALE40, NULL, 0, 0, 0, 1 },
|
||||
{ NULL, MB_ONOFF, MA_OPT3_FILTERING, ¤tConfig.scaling, 1, 0, 0, 1 },
|
||||
{ NULL, MB_RANGE, MA_OPT3_GAMMAA, ¤tConfig.gamma, 0, -4, 16, 1 },
|
||||
{ NULL, MB_NONE, MA_OPT3_VSYNC, NULL, 0, 0, 0, 1 },
|
||||
{ "Set to unscaled centered", MB_NONE, MA_OPT3_PRES_NOSCALE, NULL, 0, 0, 0, 1 },
|
||||
{ "Set to 4:3 scaled", MB_NONE, MA_OPT3_PRES_SCALE43, NULL, 0, 0, 0, 1 },
|
||||
|
@ -1032,6 +1033,9 @@ static void menu_opt3_cust_draw(const menu_entry *entry, int x, int y, void *par
|
|||
case MA_OPT3_FILTERING:
|
||||
text_out16(x, y, "Bilinear filtering %s", currentConfig.scaling?"ON":"OFF");
|
||||
break;
|
||||
case MA_OPT3_GAMMAA:
|
||||
text_out16(x, y, "Gamma adjustment %2i", currentConfig.gamma);
|
||||
break;
|
||||
case MA_OPT3_VSYNC: {
|
||||
char *val = " never";
|
||||
if (currentConfig.EmuOpt & 0x2000)
|
||||
|
@ -1115,7 +1119,8 @@ static void dispmenu_loop_options(void)
|
|||
case MA_OPT3_SCALE: setting = ¤tConfig.scale; break;
|
||||
case MA_OPT3_HSCALE40: setting = ¤tConfig.hscale40; is_32col = 0; break;
|
||||
case MA_OPT3_HSCALE32: setting = ¤tConfig.hscale32; is_32col = 1; break;
|
||||
case MA_OPT3_FILTERING:menu_opt3_preview(is_32col); break;
|
||||
case MA_OPT3_FILTERING:
|
||||
case MA_OPT3_GAMMAA: menu_opt3_preview(is_32col); break;
|
||||
case MA_OPT3_VSYNC: tmp = ((currentConfig.EmuOpt>>13)&1) | ((currentConfig.EmuOpt>>15)&2);
|
||||
tmp = (inp & BTN_LEFT) ? (tmp>>1) : ((tmp<<1)|1);
|
||||
if (tmp > 3) tmp = 3;
|
||||
|
|
|
@ -165,7 +165,8 @@ int mp3_init(void)
|
|||
mod = load_start_module("flash0:/kd/audiocodec.prx");
|
||||
else mod = load_start_module("flash0:/kd/avcodec.prx");
|
||||
if (mod < 0) {
|
||||
ret = mod = load_start_module("flash0:/kd/audiocodec_260.prx"); // last chance..
|
||||
ret = mod;
|
||||
mod = load_start_module("flash0:/kd/audiocodec_260.prx"); // last chance..
|
||||
if (mod < 0) goto fail;
|
||||
}
|
||||
|
||||
|
@ -204,8 +205,9 @@ int mp3_init(void)
|
|||
goto fail2;
|
||||
}
|
||||
|
||||
/* use slightly higher prio then main */
|
||||
thread_exit = 0;
|
||||
thid = sceKernelCreateThread("mp3decode_thread", decode_thread, 30, 0x2000, 0, 0); /* use slightly higher prio then main */
|
||||
thid = sceKernelCreateThread("mp3decode_thread", decode_thread, 30, 0x2000, 0, NULL);
|
||||
if (thid < 0) {
|
||||
lprintf("failed to create decode thread: %08x\n", thid);
|
||||
ret = thid;
|
||||
|
|
|
@ -14,14 +14,43 @@
|
|||
#include <psppower.h>
|
||||
#include <psprtc.h>
|
||||
#include <pspgu.h>
|
||||
#include <pspsdk.h>
|
||||
|
||||
#include "psp.h"
|
||||
#include "emu.h"
|
||||
#include "../common/lprintf.h"
|
||||
|
||||
PSP_MODULE_INFO("PicoDrive", 0, 1, 34);
|
||||
extern int pico_main(void);
|
||||
|
||||
#ifndef FW15
|
||||
|
||||
PSP_MODULE_INFO("PicoDrive", 0, 1, 35);
|
||||
PSP_HEAP_SIZE_MAX();
|
||||
|
||||
int main() { return pico_main(); } /* just a wrapper */
|
||||
|
||||
#else
|
||||
|
||||
PSP_MODULE_INFO("PicoDrive", 0x1000, 1, 35);
|
||||
PSP_MAIN_THREAD_ATTR(0);
|
||||
|
||||
int main()
|
||||
{
|
||||
SceUID thid;
|
||||
|
||||
/* this is the thing we need the kernel mode for */
|
||||
pspSdkInstallNoDeviceCheckPatch();
|
||||
|
||||
thid = sceKernelCreateThread("pico_main", (SceKernelThreadEntry) pico_main, 32, 0x2000, PSP_THREAD_ATTR_USER, NULL);
|
||||
if (thid >= 0)
|
||||
sceKernelStartThread(thid, 0, 0);
|
||||
sceKernelExitDeleteThread(0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
unsigned int __attribute__((aligned(16))) guCmdList[GU_CMDLIST_SIZE];
|
||||
|
||||
void *psp_screen = VRAM_FB0;
|
||||
|
@ -47,7 +76,7 @@ static int power_callback(int unknown, int pwrflags, void *common)
|
|||
lprintf("power_callback: flags: 0x%08X: suspending\n", pwrflags);
|
||||
engineState = PGS_Menu;
|
||||
}
|
||||
sceDisplayWaitVblankStart();
|
||||
//sceDisplayWaitVblankStart();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -79,7 +108,7 @@ void psp_init(void)
|
|||
lprintf("entered psp_init, threadId %08x, priority %i\n", main_thread_id,
|
||||
sceKernelGetThreadCurrentPriority());
|
||||
|
||||
thid = sceKernelCreateThread("update_thread", callback_thread, 0x11, 0xFA0, 0, 0);
|
||||
thid = sceKernelCreateThread("update_thread", callback_thread, 0x11, 0xFA0, 0, NULL);
|
||||
if (thid >= 0)
|
||||
{
|
||||
sceKernelStartThread(thid, 0, 0);
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#define VERSION "1.35a"
|
||||
#define VERSION "1.35b"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue