From: notaz Date: Sat, 24 Nov 2007 15:04:47 +0000 (+0000) Subject: psp fixes, gamma X-Git-Tag: v1.85~616 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2445b7cb6d5a0f0aa8697fdaa8af8ca52780f5b7;p=picodrive.git psp fixes, gamma git-svn-id: file:///home/notaz/opt/svn/PicoDrive@302 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/platform/base_readme.txt b/platform/base_readme.txt index 471b3b68..3c004259 100644 --- a/platform/base_readme.txt +++ b/platform/base_readme.txt @@ -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 diff --git a/platform/common/emu.c b/platform/common/emu.c index 644a5027..71f6716a 100644 --- a/platform/common/emu.c +++ b/platform/common/emu.c @@ -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 diff --git a/platform/common/menu.h b/platform/common/menu.h index 529d78df..2921c145 100644 --- a/platform/common/menu.h +++ b/platform/common/menu.h @@ -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, diff --git a/platform/linux/Makefile b/platform/linux/Makefile index 0af279c7..c9a281e4 100644 --- a/platform/linux/Makefile +++ b/platform/linux/Makefile @@ -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 $@ diff --git a/platform/psp/Makefile b/platform/psp/Makefile index 9161ea62..d2e0ac20 100644 --- a/platform/psp/Makefile +++ b/platform/psp/Makefile @@ -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 diff --git a/platform/psp/asm_utils.h b/platform/psp/asm_utils.h new file mode 100644 index 00000000..ead5064d --- /dev/null +++ b/platform/psp/asm_utils.h @@ -0,0 +1,2 @@ +// pointers must be word aligned +void do_pal_convert(unsigned short *dest, unsigned short *src, int gammaa_val); diff --git a/platform/psp/asm_utils.s b/platform/psp/asm_utils.s new file mode 100644 index 00000000..11e3a17b --- /dev/null +++ b/platform/psp/asm_utils.s @@ -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 + diff --git a/platform/psp/emu.c b/platform/psp/emu.c index 4006d9ff..4292615b 100644 --- a/platform/psp/emu.c +++ b/platform/psp/emu.c @@ -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; diff --git a/platform/psp/main.c b/platform/psp/main.c index bad56a9a..befc427f 100644 --- a/platform/psp/main.c +++ b/platform/psp/main.c @@ -13,14 +13,11 @@ #include "../common/lprintf.h" #include "version.h" -#define GPROF 0 -#define GCOV 0 - -#if GPROF +#ifdef GPROF #include #endif -#if GCOV +#ifdef GCOV #include #include @@ -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 diff --git a/platform/psp/menu.c b/platform/psp/menu.c index e1daabfb..5fb2d04d 100644 --- a/platform/psp/menu.c +++ b/platform/psp/menu.c @@ -1005,7 +1005,8 @@ menu_entry opt3_entries[] = { NULL, MB_NONE, MA_OPT3_SCALE, NULL, 0, 0, 0, 1 }, { 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_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) @@ -1112,10 +1116,11 @@ static void dispmenu_loop_options(void) int tmp; me_process(opt3_entries, OPT3_ENTRY_COUNT, selected_id, (inp&BTN_RIGHT) ? 1 : 0); switch (selected_id) { - 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_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: + 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; diff --git a/platform/psp/mp3.c b/platform/psp/mp3.c index 456b72b9..db3e39db 100644 --- a/platform/psp/mp3.c +++ b/platform/psp/mp3.c @@ -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; diff --git a/platform/psp/psp.c b/platform/psp/psp.c index 51b44711..c507e5da 100644 --- a/platform/psp/psp.c +++ b/platform/psp/psp.c @@ -14,14 +14,43 @@ #include #include #include +#include #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); diff --git a/platform/psp/version.h b/platform/psp/version.h index 62a58a74..54692214 100644 --- a/platform/psp/version.h +++ b/platform/psp/version.h @@ -1,2 +1,2 @@ -#define VERSION "1.35a" +#define VERSION "1.35b"