docs updated, gfx_cd works(?)
authornotaz <notasas@gmail.com>
Thu, 22 Mar 2007 19:22:55 +0000 (19:22 +0000)
committernotaz <notasas@gmail.com>
Thu, 22 Mar 2007 19:22:55 +0000 (19:22 +0000)
git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@74 be3aeb3a-fb24-0410-a615-afba39da0efa

gp2x/config.txt
gp2x/emu.c
linux/Makefile
linux/port_config.h

index 0874946..72239da 100644 (file)
@@ -1,6 +1,9 @@
 As PicoDrive is multiplatform emulator, this is GP2X specific part of readme\r
 about configuration.\r
 \r
+If you have questions, you can use GP32X to ask for help.\r
+http://www.gp32x.com/board/index.php?showforum=48\r
+\r
 \r
 Configuration\r
 -------------\r
@@ -16,9 +19,9 @@ Other two are accurate line-based renderers. The 8bit is faster but does not
 run well with some games like Street Racer.\r
 \r
 2. "Accurate timing"\r
-This adds some more emulation precision, but slows the emulation down. Whithout\r
+This adds some more emulation precision, but slows the emulation down. Without\r
 this option some games do not boot (Red Zone for example), others have sound\r
-problems.\r
+problems. This options has no effect for Sega/Mega CD emulation.\r
 \r
 3. "Accurate sprites"\r
 This option improves emulation of sprite priorities, it also enables emulation\r
@@ -52,29 +55,34 @@ go and reconfigure your keys, you will be able to bind X,Y,Z and mode actions.
 \r
 10. "Genesis Region"\r
 This option lets you force the game to think it is running on machine from the\r
-specified region.\r
+specified region, or just to set autodetection order. Also affects Sega/Mega CD.\r
 \r
-11. "Use SRAM savestates"\r
-This will automatically read/write SRAM savestates for games which are using them.\r
-SRAM is saved whenever you pause your game or exit the emulator.\r
+11. "Use SRAM/BRAM savestates"\r
+This will automatically read/write SRAM (or BRAM for Sega/Mega CD) savestates for\r
+games which are using them. SRAM is saved whenever you pause your game or exit the\r
+emulator.\r
 \r
 12. "GP2X CPU clocks"\r
 Here you can change clocks of both GP2X's CPUs. Larger values increase performance.\r
 There is no separate option for the second CPU because both CPUs use the same clock\r
 source. Setting this option to 200 will cause PicoDrive NOT to change GP2X's clocks\r
-at all.\r
+at all (this is if you use external program to set clock).\r
+\r
+13. "[Sega/Mega CD options]"\r
+Enters Sega/Mega CD options menu (see below).\r
 \r
-13. "[advanced options]"\r
+14. "[advanced options]"\r
 Enters advanced options menu (see below).\r
 \r
-14. "Save cfg as default"\r
+15. "Save cfg as default"\r
 If you save your config here it will be loaded on next ROM load, but only if there\r
 is no game specific config saved (which will be loaded in that case).\r
 \r
-15. "Save cfg for current game only"\r
+16. "Save cfg for current game only"\r
 Whenever you load current ROM again these settings will be loaded (squidgehack and\r
 RAM settings will not take effect until emulator is restarted).\r
 \r
+\r
 Advanced configuration\r
 ----------------------\r
 \r
@@ -108,25 +116,56 @@ startup, and this data is lost when sound chips are being enabled/disabled.
 This will always apply gzip compression on your savestates, allowing you to\r
 save some space and load/save time.\r
 \r
-7. "USB joy controls player X"\r
-If you are able to use USB joysticks with your GP2X, this options selects which\r
-player the joystick controls.\r
-\r
-8. "Don't save config on exit"\r
+7. "Don't save config on exit"\r
 This will disable config autowrite on exit (which might cause SD card corruption\r
 according to DaveC).\r
 \r
-9. "craigix's RAM timings"\r
+8. "craigix's RAM timings"\r
 This overclocks the GP2X RAM chips, but may cause instability. Recommended if you\r
 use the second core for sound. Needs emulator restart to take effect.\r
 See this thread:\r
 http://www.gp32x.com/board/index.php?showtopic=32319\r
 \r
-10. "squidgehack"\r
+9. "squidgehack"\r
 Well known way to improve the GP2X performance. You must restart the emulator\r
 for the change of this option to take effect.\r
 \r
 \r
+Sega/Mega CD options \r
+--------------------\r
+\r
+1,2,3. "USA/EUR/JAP BIOS"\r
+These options just shows if your BIOS files were correctly detected be the\r
+emulator (it shows the filename it is using). If so, you can press Start to test\r
+your BIOS.\r
+\r
+4. "CD LEDs"\r
+The Sega/Mega CD unit had two blinking LEDs (red and green) on it. This option\r
+will display them on left-top corner of the screen.\r
+\r
+5. "CDDA audio (using mp3s)"\r
+This option enables CD audio playback.\r
+\r
+6. "PCM audio"\r
+This enables 8 channel PCM sound source. It is required for some games to run,\r
+because they monitor state of the audio chip.\r
+\r
+7. "ReadAhead buffer"\r
+This option is for dealing with slow SD card access in GP2X, which makes FMV\r
+games unplayable. It will allow emulator not to access SD card for longer periods\r
+of time, but it will take more time to fill the buffer.\r
+\r
+8. "Scale/Rot. fx"\r
+The Sega/Mega CD had scaling/rotation chip, which allows effects similar to\r
+"Mode 7" effects in SNES. Unfortunately emulating it is slow, and very few games\r
+used it, so it's better to disable this option.\r
+\r
+9. "Better sync"\r
+This option is similar to "Perfect synchro" in Gens. Some games require it to run,\r
+for example most (all?) Wolfteam games, and some other ones. Don't use it for\r
+games which don't need it, it will just slow them down.\r
+\r
+\r
 Key configuration\r
 -----------------\r
 \r
index ce056b3..7c63cdb 100644 (file)
@@ -969,13 +969,15 @@ static void updateSound(int len)
 {\r
        if (PicoOpt&8) len<<=1;\r
 \r
-       gp2x_sound_write(PsndOut, len<<1);\r
+       /* avoid writing audio when lagging behind to prevent audio lag */\r
+       if (PicoSkipFrame != 2)\r
+               gp2x_sound_write(PsndOut, len<<1);\r
 }\r
 \r
 \r
-static void SkipFrame(void)\r
+static void SkipFrame(int do_audio)\r
 {\r
-       PicoSkipFrame=1;\r
+       PicoSkipFrame=do_audio ? 1 : 2;\r
        PicoFrame();\r
        PicoSkipFrame=0;\r
 }\r
@@ -1157,7 +1159,7 @@ void emu_Loop(void)
                                // when second changes, but we don't want buffer to starve.\r
                                if(PsndOut && frames_done < target_fps && frames_done > target_fps-5) {\r
                                        updateKeys();\r
-                                       SkipFrame(); frames_done++;\r
+                                       SkipFrame(1); frames_done++;\r
                                }\r
 \r
                                frames_done  -= target_fps; if (frames_done  < 0) frames_done  = 0;\r
@@ -1170,7 +1172,7 @@ void emu_Loop(void)
                if(currentConfig.Frameskip >= 0) { // frameskip enabled\r
                        for(i = 0; i < currentConfig.Frameskip; i++) {\r
                                updateKeys();\r
-                               SkipFrame(); frames_done++;\r
+                               SkipFrame(1); frames_done++;\r
                                if (PsndOut) { // do framelimitting if sound is enabled\r
                                        gettimeofday(&tval, 0);\r
                                        if(thissec != tval.tv_sec) tval.tv_usec+=1000000;\r
@@ -1189,7 +1191,7 @@ void emu_Loop(void)
                                continue;\r
                        }\r
                        updateKeys();\r
-                       SkipFrame(/*tval.tv_usec < lim_time+target_frametime*/); frames_done++;\r
+                       SkipFrame(tval.tv_usec < lim_time+target_frametime); frames_done++;\r
                        continue;\r
                }\r
 \r
index 0b8c37b..9a8f3df 100644 (file)
@@ -63,10 +63,11 @@ clean: tidy
 tidy:
        @$(RM) $(OBJS)
        @make -C ../../cpu/mz80/ clean
+       @make -C ../gp2x/helix/ X86=1 clean
 
-PicoDrive : $(OBJS)
+PicoDrive : $(OBJS) ../gp2x/helix/helix_mp3_x86.a
        @echo $@
-       @$(GCC) $(COPT) $(OBJS) ../gp2x/helix/helix_mp3_x86.a $(LDFLAGS) -lm -Wl,-Map=PicoDrive.map -o $@
+       @$(GCC) $(COPT) $^ $(LDFLAGS) -lm -Wl,-Map=PicoDrive.map -o $@
 
 
 ../../cpu/mz80/mz80.o : ../../cpu/mz80/mz80.asm
@@ -76,6 +77,9 @@ PicoDrive : $(OBJS)
 ../../cpu/mz80/mz80.asm :
        @make -C ../../cpu/mz80/
 
+../gp2x/helix/helix_mp3_x86.a:
+       @make -C ../gp2x/helix/ X86=1 clean all
+
 .c.o:
        @echo $<
        @$(GCC) $(COPT) $(DEFINC) -c $< -o $@
index a0a855a..e5c88bb 100644 (file)
@@ -12,8 +12,8 @@
 // pico.c
 #define CAN_HANDLE_240_LINES   1
 
-//#define dprintf(f,...) printf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__)
-#define dprintf(x...)
+#define dprintf(f,...) printf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__)
+//#define dprintf(x...)
 
 #endif //PORT_CONFIG_H