[Fuse-for-macosx-commits] SF.net SVN: fuse-for-macosx:[601] trunk
Brought to you by:
fredm
From: <fr...@us...> - 2009-06-29 22:25:17
|
Revision: 601 http://fuse-for-macosx.svn.sourceforge.net/fuse-for-macosx/?rev=601&view=rev Author: fredm Date: 2009-06-29 22:23:59 +0000 (Mon, 29 Jun 2009) Log Message: ----------- Merge up to vendor revision 4041. Revision Links: -------------- http://fuse-for-macosx.svn.sourceforge.net/fuse-for-macosx/?rev=4041&view=rev Modified Paths: -------------- trunk/FuseGenerator/generate.pl trunk/FuseGenerator/libspectrum.h trunk/FuseImporter/generate.pl trunk/FuseImporter/libspectrum.h trunk/fuse/AUTHORS trunk/fuse/ChangeLog trunk/fuse/Makefile.am trunk/fuse/README trunk/fuse/TODO trunk/fuse/ay.c trunk/fuse/ay.h trunk/fuse/compat/Makefile.am trunk/fuse/compat/amiga/Makefile.am trunk/fuse/compat/amiga/paths.c trunk/fuse/compat/morphos/Makefile.am trunk/fuse/compat/morphos/osname.c trunk/fuse/compat/unix/Makefile.am trunk/fuse/compat/unix/file.c trunk/fuse/compat/unix/osname.c trunk/fuse/compat/unix/paths.c trunk/fuse/compat/wii/Makefile.am trunk/fuse/compat/win32/Makefile.am trunk/fuse/compat/win32/osname.c trunk/fuse/compat/win32/paths.c trunk/fuse/compat.h trunk/fuse/configure.in trunk/fuse/debugger/event.c trunk/fuse/debugger/variable.c trunk/fuse/disk/beta.c trunk/fuse/disk/beta.h trunk/fuse/disk/disk.c trunk/fuse/disk/disk.h trunk/fuse/disk/fdd.c trunk/fuse/disk/fdd.h trunk/fuse/disk/plusd.c trunk/fuse/disk/plusd.h trunk/fuse/disk/upd_fdc.c trunk/fuse/display.c trunk/fuse/display.h trunk/fuse/event.c trunk/fuse/event.h trunk/fuse/fuse.c trunk/fuse/fusepb/Fuse.xcodeproj/project.pbxproj trunk/fuse/fusepb/Makefile trunk/fuse/fusepb/controllers/FuseController.h trunk/fuse/fusepb/controllers/FuseController.m trunk/fuse/fusepb/controllers/PreferencesController.h trunk/fuse/fusepb/controllers/PreferencesController.m trunk/fuse/fusepb/models/Emulator.h trunk/fuse/fusepb/models/Emulator.m trunk/fuse/fusepb/nibs/MainMenu.nib/classes.nib trunk/fuse/fusepb/nibs/MainMenu.nib/info.nib trunk/fuse/fusepb/nibs/MainMenu.nib/keyedobjects.nib trunk/fuse/fusepb/nibs/Preferences.nib/designable.nib trunk/fuse/fusepb/nibs/Preferences.nib/keyedobjects.nib trunk/fuse/fusepb/timer/timer.c trunk/fuse/fusepb/views/DisplayOpenGLView.h trunk/fuse/fusepb/views/DisplayOpenGLView.m trunk/fuse/hacking/ChangeLog trunk/fuse/hacking/Makefile.am trunk/fuse/hacking/cvs-tags trunk/fuse/hacking/timer.txt trunk/fuse/input.c trunk/fuse/joystick.c trunk/fuse/joystick.h trunk/fuse/kempmouse.c trunk/fuse/keysyms.pl trunk/fuse/loader.c trunk/fuse/machine.c trunk/fuse/machines/pentagon.c trunk/fuse/machines/pentagon1024.c trunk/fuse/machines/pentagon512.c trunk/fuse/machines/scorpion.c trunk/fuse/machines/spec128.c trunk/fuse/machines/spec16.c trunk/fuse/machines/spec48.c trunk/fuse/machines/spec48.h trunk/fuse/machines/spec_se.c trunk/fuse/machines/specplus2.c trunk/fuse/machines/specplus2a.c trunk/fuse/machines/specplus3.c trunk/fuse/machines/specplus3.h trunk/fuse/machines/specplus3e.c trunk/fuse/machines/tc2048.c trunk/fuse/machines/tc2068.c trunk/fuse/machines/tc2068.h trunk/fuse/man/fuse.1 trunk/fuse/memory.c trunk/fuse/memory.h trunk/fuse/mempool.c trunk/fuse/mempool.h trunk/fuse/menu.c trunk/fuse/menu.h trunk/fuse/menu_data.dat trunk/fuse/menu_data.pl trunk/fuse/periph.c trunk/fuse/periph.h trunk/fuse/perl/cpp-perl.pl trunk/fuse/rzx.c trunk/fuse/scld.c trunk/fuse/settings.dat trunk/fuse/settings.pl trunk/fuse/snapshot.c trunk/fuse/sound/Makefile.am trunk/fuse/sound/alsasound.c trunk/fuse/sound/coreaudiosound.c trunk/fuse/sound/sdlsound.c trunk/fuse/sound.h trunk/fuse/spectrum.c trunk/fuse/tape.c trunk/fuse/timer/Makefile.am trunk/fuse/timer/sdl.c trunk/fuse/timer/timer.c trunk/fuse/timer/timer.h trunk/fuse/ui/Makefile.am trunk/fuse/ui/cocoa/cocoaui.m trunk/fuse/ui/fb/Makefile.am trunk/fuse/ui/fb/fbdisplay.c trunk/fuse/ui/gtk/Makefile.am trunk/fuse/ui/gtk/confirm.c trunk/fuse/ui/gtk/debugger.c trunk/fuse/ui/gtk/gtkdisplay.c trunk/fuse/ui/gtk/gtkinternals.h trunk/fuse/ui/gtk/gtkui.c trunk/fuse/ui/gtk/options-header.pl trunk/fuse/ui/gtk/options.pl trunk/fuse/ui/gtk/pokefinder.c trunk/fuse/ui/options.dat trunk/fuse/ui/scaler/scaler_hq2x.c trunk/fuse/ui/scaler/scaler_hq3x.c trunk/fuse/ui/svga/svgadisplay.c trunk/fuse/ui/svga/svgajoystick.c trunk/fuse/ui/svga/svgaui.c trunk/fuse/ui/ui.h trunk/fuse/ui/uijoystick.c trunk/fuse/ui/widget/Makefile.am trunk/fuse/ui/widget/debugger.c trunk/fuse/ui/widget/filesel.c trunk/fuse/ui/widget/menu.c trunk/fuse/ui/widget/options-header.pl trunk/fuse/ui/widget/options.pl trunk/fuse/ui/widget/query.c trunk/fuse/ui/widget/select.c trunk/fuse/ui/widget/text.c trunk/fuse/ui/widget/widget.c trunk/fuse/ui/widget/widget.h trunk/fuse/ui/widget/widget_internals.h trunk/fuse/ui/win32/Makefile.am trunk/fuse/ui/win32/confirm.c trunk/fuse/ui/win32/debugger.c trunk/fuse/ui/win32/fileselector.c trunk/fuse/ui/win32/icons/Makefile.am trunk/fuse/ui/win32/memorybrowser.c trunk/fuse/ui/win32/memorybrowser.h trunk/fuse/ui/win32/memorybrowser.rc trunk/fuse/ui/win32/options-header.pl trunk/fuse/ui/win32/options-resource.pl trunk/fuse/ui/win32/pokefinder.c trunk/fuse/ui/win32/rollback.c trunk/fuse/ui/win32/rollback.h trunk/fuse/ui/win32/rollback.rc trunk/fuse/ui/win32/roms.c trunk/fuse/ui/win32/roms.h trunk/fuse/ui/win32/roms.rc trunk/fuse/ui/win32/win32joystick.c trunk/fuse/ui/win32/win32ui.c trunk/fuse/ui.c trunk/fuse/ula.c trunk/fuse/utils.c trunk/fuse/utils.h trunk/fuse/z80/coretest.c trunk/fuse/z80/z80.c trunk/fuse/z80/z80_ops.c trunk/libspectrum/generate.pl trunk/libspectrum/libspectrum/AUTHORS trunk/libspectrum/libspectrum/ChangeLog trunk/libspectrum/libspectrum/Makefile.am trunk/libspectrum/libspectrum/README trunk/libspectrum/libspectrum/accessor.pl trunk/libspectrum/libspectrum/configure.in trunk/libspectrum/libspectrum/doc/cvs-tags trunk/libspectrum/libspectrum/doc/libspectrum.txt trunk/libspectrum/libspectrum/hacking/ChangeLog trunk/libspectrum/libspectrum/libspectrum.c trunk/libspectrum/libspectrum/libspectrum.h.in trunk/libspectrum/libspectrum/make-perl.c trunk/libspectrum/libspectrum/myglib/gslist.c trunk/libspectrum/libspectrum/sna.c trunk/libspectrum/libspectrum/snap_accessors.txt trunk/libspectrum/libspectrum/snapshot.c trunk/libspectrum/libspectrum/szx.c trunk/libspectrum/libspectrum/tape.c trunk/libspectrum/libspectrum/tape_block.c trunk/libspectrum/libspectrum/test/Makefile.am trunk/libspectrum/libspectrum/timings.c trunk/libspectrum/libspectrum/tzx_write.c trunk/libspectrum/libspectrum/warajevo_read.c trunk/libspectrum/libspectrum/z80.c trunk/libspectrum/libspectrum.h Added Paths: ----------- trunk/fuse/compat/unix/dir.c trunk/fuse/compat/unix/timer.c trunk/fuse/compat/wii/dir.c trunk/fuse/compat/wii/osname.c trunk/fuse/compat/wii/paths.c trunk/fuse/compat/wii/timer.c trunk/fuse/compat/win32/timer.c trunk/fuse/fuller.c trunk/fuse/fuller.h trunk/fuse/fusepb/main.mm trunk/fuse/ide/ trunk/fuse/ide/Makefile.am trunk/fuse/ide/divide.c trunk/fuse/ide/divide.h trunk/fuse/ide/ide.c trunk/fuse/ide/ide.h trunk/fuse/ide/simpleide.c trunk/fuse/ide/simpleide.h trunk/fuse/ide/zxatasp.c trunk/fuse/ide/zxatasp.h trunk/fuse/ide/zxcf.c trunk/fuse/ide/zxcf.h trunk/fuse/melodik.c trunk/fuse/melodik.h trunk/fuse/sound/Blip_Buffer.cpp trunk/fuse/sound/Blip_Buffer.h trunk/fuse/sound/wiisound.c trunk/fuse/sound.cpp trunk/fuse/timer/native.c trunk/fuse/ui/cocoa/options-cocoa-header.pl trunk/fuse/ui/cocoa/options-header.pl trunk/fuse/ui/cocoa/options.pl trunk/fuse/ui/wii/ trunk/fuse/ui/wii/Makefile.am trunk/fuse/ui/wii/wiidisplay.c trunk/fuse/ui/wii/wiidisplay.h trunk/fuse/ui/wii/wiijoystick.c trunk/fuse/ui/wii/wiikeyboard.c trunk/fuse/ui/wii/wiikeyboard.h trunk/fuse/ui/wii/wiikeysyms.h trunk/fuse/ui/wii/wiimouse.c trunk/fuse/ui/wii/wiimouse.h trunk/fuse/ui/wii/wiiui.c trunk/fuse/ui/win32/installer/ trunk/fuse/ui/win32/installer/Makefile.am trunk/fuse/ui/win32/installer/fuse.nsi Removed Paths: ------------- trunk/fuse/compat/wii/file.c trunk/fuse/divide.c trunk/fuse/divide.h trunk/fuse/fuse.cpp trunk/fuse/fusepb/main.m trunk/fuse/ide/Makefile.am trunk/fuse/ide/divide.c trunk/fuse/ide/divide.h trunk/fuse/ide/ide.c trunk/fuse/ide/ide.h trunk/fuse/ide/simpleide.c trunk/fuse/ide/simpleide.h trunk/fuse/ide/zxatasp.c trunk/fuse/ide/zxatasp.h trunk/fuse/ide/zxcf.c trunk/fuse/ide/zxcf.h trunk/fuse/ide.c trunk/fuse/ide.h trunk/fuse/simpleide.c trunk/fuse/simpleide.h trunk/fuse/sound.c trunk/fuse/timer/unix.c trunk/fuse/timer/win32.c trunk/fuse/ui/wii/Makefile.am trunk/fuse/ui/wii/wiidisplay.c trunk/fuse/ui/wii/wiidisplay.h trunk/fuse/ui/wii/wiijoystick.c trunk/fuse/ui/wii/wiikeyboard.c trunk/fuse/ui/wii/wiikeyboard.h trunk/fuse/ui/wii/wiikeysyms.h trunk/fuse/ui/wii/wiimouse.c trunk/fuse/ui/wii/wiimouse.h trunk/fuse/ui/wii/wiiui.c trunk/fuse/ui/win32/installer/Makefile.am trunk/fuse/ui/win32/installer/fuse.nsi trunk/fuse/zxatasp.c trunk/fuse/zxatasp.h trunk/fuse/zxcf.c trunk/fuse/zxcf.h Property Changed: ---------------- trunk/fuse/ trunk/fuse/fusepb/ trunk/libspectrum/libspectrum/ trunk/libspectrum/libspectrum.h Modified: trunk/FuseGenerator/generate.pl =================================================================== --- trunk/FuseGenerator/generate.pl 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/FuseGenerator/generate.pl 2009-06-29 22:23:59 UTC (rev 601) @@ -75,6 +75,10 @@ void WIN32_DLL g_slist_free (GSList *list); +GSList WIN32_DLL *g_slist_last (GSList *list); + +GSList WIN32_DLL *g_slist_reverse (GSList *list); + GSList WIN32_DLL *g_slist_nth (GSList *list, guint n); Modified: trunk/FuseGenerator/libspectrum.h =================================================================== --- trunk/FuseGenerator/libspectrum.h 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/FuseGenerator/libspectrum.h 2009-06-29 22:23:59 UTC (rev 601) @@ -1,7 +1,7 @@ /* libspectrum.h: the library for dealing with ZX Spectrum emulator files Copyright (c) 2001-2007 Philip Kendall, Darren Salt, Fredrick Meunier - $Id: libspectrum.h.in 3806 2008-11-08 10:42:38Z pak21 $ + $Id: libspectrum.h.in 4039 2009-06-27 06:04:44Z fredm $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -134,6 +134,10 @@ void WIN32_DLL g_slist_free (GSList *list); +GSList WIN32_DLL *g_slist_last (GSList *list); + +GSList WIN32_DLL *g_slist_reverse (GSList *list); + GSList WIN32_DLL *g_slist_nth (GSList *list, guint n); @@ -801,6 +805,11 @@ void WIN32_DLL libspectrum_snap_set_divide_eprom( libspectrum_snap *snap, int idx, libspectrum_byte* divide_eprom ); libspectrum_byte WIN32_DLL * libspectrum_snap_divide_ram( libspectrum_snap *snap, int idx ); void WIN32_DLL libspectrum_snap_set_divide_ram( libspectrum_snap *snap, int idx, libspectrum_byte* divide_ram ); +int WIN32_DLL libspectrum_snap_fuller_box_active( libspectrum_snap *snap ); +void WIN32_DLL libspectrum_snap_set_fuller_box_active( libspectrum_snap *snap, int fuller_box_active ); +int WIN32_DLL libspectrum_snap_melodik_active( libspectrum_snap *snap ); +void WIN32_DLL libspectrum_snap_set_melodik_active( libspectrum_snap *snap, int + melodik_active ); /* * Tape handling routines @@ -862,6 +871,7 @@ extern const int WIN32_DLL LIBSPECTRUM_TAPE_FLAGS_LEVEL_HIGH; /* Set level high */ extern const int WIN32_DLL LIBSPECTRUM_TAPE_FLAGS_LENGTH_SHORT; extern const int WIN32_DLL LIBSPECTRUM_TAPE_FLAGS_LENGTH_LONG; +extern const int WIN32_DLL LIBSPECTRUM_TAPE_FLAGS_TAPE; /* Tape has finished */ /* The states which a block can be in */ typedef enum libspectrum_tape_state_type { @@ -1000,6 +1010,10 @@ libspectrum_tape_block WIN32_DLL * libspectrum_tape_peek_next_block( libspectrum_tape *tape ); +/* Peek at the last block on the tape */ +libspectrum_tape_block WIN32_DLL * +libspectrum_tape_peek_last_block( libspectrum_tape *tape ); + /* Cause the next block on the tape to be active, initialise it and return it */ libspectrum_tape_block WIN32_DLL * Modified: trunk/FuseImporter/generate.pl =================================================================== --- trunk/FuseImporter/generate.pl 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/FuseImporter/generate.pl 2009-06-29 22:23:59 UTC (rev 601) @@ -75,6 +75,10 @@ void WIN32_DLL g_slist_free (GSList *list); +GSList WIN32_DLL *g_slist_last (GSList *list); + +GSList WIN32_DLL *g_slist_reverse (GSList *list); + GSList WIN32_DLL *g_slist_nth (GSList *list, guint n); Modified: trunk/FuseImporter/libspectrum.h =================================================================== --- trunk/FuseImporter/libspectrum.h 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/FuseImporter/libspectrum.h 2009-06-29 22:23:59 UTC (rev 601) @@ -1,7 +1,7 @@ /* libspectrum.h: the library for dealing with ZX Spectrum emulator files Copyright (c) 2001-2007 Philip Kendall, Darren Salt, Fredrick Meunier - $Id: libspectrum.h.in 3806 2008-11-08 10:42:38Z pak21 $ + $Id: libspectrum.h.in 4039 2009-06-27 06:04:44Z fredm $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -134,6 +134,10 @@ void WIN32_DLL g_slist_free (GSList *list); +GSList WIN32_DLL *g_slist_last (GSList *list); + +GSList WIN32_DLL *g_slist_reverse (GSList *list); + GSList WIN32_DLL *g_slist_nth (GSList *list, guint n); @@ -801,6 +805,11 @@ void WIN32_DLL libspectrum_snap_set_divide_eprom( libspectrum_snap *snap, int idx, libspectrum_byte* divide_eprom ); libspectrum_byte WIN32_DLL * libspectrum_snap_divide_ram( libspectrum_snap *snap, int idx ); void WIN32_DLL libspectrum_snap_set_divide_ram( libspectrum_snap *snap, int idx, libspectrum_byte* divide_ram ); +int WIN32_DLL libspectrum_snap_fuller_box_active( libspectrum_snap *snap ); +void WIN32_DLL libspectrum_snap_set_fuller_box_active( libspectrum_snap *snap, int fuller_box_active ); +int WIN32_DLL libspectrum_snap_melodik_active( libspectrum_snap *snap ); +void WIN32_DLL libspectrum_snap_set_melodik_active( libspectrum_snap *snap, int + melodik_active ); /* * Tape handling routines @@ -862,6 +871,7 @@ extern const int WIN32_DLL LIBSPECTRUM_TAPE_FLAGS_LEVEL_HIGH; /* Set level high */ extern const int WIN32_DLL LIBSPECTRUM_TAPE_FLAGS_LENGTH_SHORT; extern const int WIN32_DLL LIBSPECTRUM_TAPE_FLAGS_LENGTH_LONG; +extern const int WIN32_DLL LIBSPECTRUM_TAPE_FLAGS_TAPE; /* Tape has finished */ /* The states which a block can be in */ typedef enum libspectrum_tape_state_type { @@ -1000,6 +1010,10 @@ libspectrum_tape_block WIN32_DLL * libspectrum_tape_peek_next_block( libspectrum_tape *tape ); +/* Peek at the last block on the tape */ +libspectrum_tape_block WIN32_DLL * +libspectrum_tape_peek_last_block( libspectrum_tape *tape ); + /* Cause the next block on the tape to be active, initialise it and return it */ libspectrum_tape_block WIN32_DLL * Property changes on: trunk/fuse ___________________________________________________________________ Modified: svn:mergeinfo - /vendor/fuse-emulator/0.10.0/fuse:556-557 /vendor/fuse-emulator/0.10.0-pre1/fuse:545-546 /vendor/fuse-emulator/current/fuse:530-538 + /vendor/fuse-emulator/0.10.0/fuse:556-557 /vendor/fuse-emulator/0.10.0-pre1/fuse:545-546 /vendor/fuse-emulator/current/fuse:530-600 Modified: trunk/fuse/AUTHORS =================================================================== --- trunk/fuse/AUTHORS 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/AUTHORS 2009-06-29 22:23:59 UTC (rev 601) @@ -41,6 +41,8 @@ * Gergely Szasz: Interface I/microdrive emulation, the 'movie' code and the ao sound driver. +* Bjoern Giesler: the original Wii port. + * Philip Kendall: everything else. -$Id: AUTHORS 2433 2004-11-28 21:58:44Z pak21 $ +$Id: AUTHORS 3944 2009-01-10 18:17:04Z pak21 $ Modified: trunk/fuse/ChangeLog =================================================================== --- trunk/fuse/ChangeLog 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/ChangeLog 2009-06-29 22:23:59 UTC (rev 601) @@ -1,5 +1,15 @@ -2008-11-?? Philip Kendall <phi...@sh...> +2008-12-10 Philip Kendall <phi...@sh...> + * Fuse 0.10.0.1 released + + * Writing files would not truncate the file at the correct point, + leading to corrupt files when overwriting an existing file + (Philip Kendall; thanks, Matthew Westcott). + + * Distribute ui/fb/fbmouse.h (Fredrick Meunier; thanks, rkd77). + +2008-12-03 Philip Kendall <phi...@sh...> + * Fuse 0.10.0 released * New upd765 FDC emulation; all known +3 DSK images now work (Gergely @@ -931,4 +941,4 @@ * Version 0.1.0 released. -$Id: ChangeLog 3823 2008-11-16 17:32:18Z pak21 $ +$Id: ChangeLog 3900 2008-12-10 19:31:31Z pak21 $ Modified: trunk/fuse/Makefile.am =================================================================== --- trunk/fuse/Makefile.am 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/Makefile.am 2009-06-29 22:23:59 UTC (rev 601) @@ -1,7 +1,7 @@ # Process this file with automake to produce Makefile.in -## Copyright (c) 1999-2008 Philip Kendall +## Copyright (c) 1999-2009 Philip Kendall -## $Id: Makefile.am 3818 2008-11-15 13:28:08Z pak21 $ +## $Id: Makefile.am 4032 2009-06-10 11:09:44Z fredm $ ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -29,6 +29,7 @@ debugger \ disk \ hacking \ + ide \ lib \ machines \ man \ @@ -44,6 +45,7 @@ DIST_SUBDIRS = debugger \ disk \ hacking \ + ide \ lib \ machines \ man \ @@ -59,10 +61,9 @@ fuse_SOURCES = ay.c \ dck.c \ display.c \ - divide.c \ event.c \ - fuse.cpp \ - ide.c \ + fuller.c \ + fuse.c \ if1.c \ if2.c \ input.c \ @@ -71,6 +72,7 @@ keyboard.c \ loader.c \ machine.c \ + melodik.c \ memory.c \ mempool.c \ menu.c \ @@ -83,19 +85,16 @@ scld.c \ screenshot.c \ settings.c \ - simpleide.c \ slt.c \ snapshot.c \ - sound.c \ + sound.cpp \ spectrum.c \ tape.c \ ui.c \ uidisplay.c \ ula.c \ utils.c \ - windres.rc \ - zxatasp.c \ - zxcf.c + windres.rc if COMPAT_DIRNAME fuse_SOURCES += compat/dirname.c @@ -113,36 +112,42 @@ fuse_LDADD = debugger/libdebugger.a \ @UI_LIBS@ \ +debugger/libdebugger.a \ +disk/libdisk.a \ +ide/libide.a \ machines/libmachines.a \ -disk/libdisk.a \ pokefinder/libpokefinder.a \ sound/libsound.a \ +timer/libtimer.a \ ui/scaler/libscaler.a \ unittests/libunittests.a \ -debugger/libdebugger.a \ -timer/libtimer.a \ z80/libz80.a \ @LIBSPEC_LIBS@ \ @GLIB_LIBS@ \ @PNG_LIBS@ \ @SOUND_LIBS@ \ -@SAMPLERATE_LIBS@ \ @SDL_LIBS@ \ @X_LIBS@ \ @XML_LIBS@ \ compat/@COMPAT_OSNAME@/libcompatos.a \ @WINDRES_OBJ@ -fuse_DEPENDENCIES = @UI_LIBS@ \ - disk/libdisk.a \ - debugger/libdebugger.a \ - machines/libmachines.a \ - sound/libsound.a \ - unittests/libunittests.a\ - z80/libz80.a \ - @WINDRES_OBJ@ +fuse_DEPENDENCIES = debugger/libdebugger.a \ +@UI_LIBS@ \ +debugger/libdebugger.a \ +disk/libdisk.a \ +ide/libide.a \ +machines/libmachines.a \ +pokefinder/libpokefinder.a \ +sound/libsound.a \ +timer/libtimer.a \ +ui/scaler/libscaler.a \ +unittests/libunittests.a \ +z80/libz80.a \ +compat/@COMPAT_OSNAME@/libcompatos.a \ +@WINDRES_OBJ@ -BUILT_SOURCES = settings.c settings.h +BUILT_SOURCES = options.h settings.c settings.h windres.o: windres.rc winfuse.ico @WINDRES@ -I$(srcdir) -I. $(srcdir)/windres.rc windres.o @@ -153,18 +158,25 @@ settings.h: settings-header.pl settings.dat @PERL@ -I$(srcdir)/perl $(srcdir)/settings-header.pl $(srcdir)/settings.dat > $@.tmp && mv $@.tmp $@ +if WIDGET +options.h: $(srcdir)/perl/cpp-perl.pl config.h $(srcdir)/ui/@WIDGET@/options-header.pl $(srcdir)/ui/options.dat $(srcdir)/perl/Fuse.pm $(srcdir)/perl/Fuse/Dialog.pm + @PERL@ $(srcdir)/perl/cpp-perl.pl config.h $(srcdir)/ui/options.dat | @PERL@ -I$(srcdir)/perl $(srcdir)/ui/@WIDGET@/options-header.pl - public > $@.tmp && mv $@.tmp $@ +else +options.h: $(srcdir)/perl/cpp-perl.pl config.h $(srcdir)/ui/@UI@/options-header.pl $(srcdir)/ui/options.dat $(srcdir)/perl/Fuse.pm $(srcdir)/perl/Fuse/Dialog.pm + @PERL@ $(srcdir)/perl/cpp-perl.pl config.h $(srcdir)/ui/options.dat | @PERL@ -I$(srcdir)/perl $(srcdir)/ui/@UI@/options-header.pl - public > $@.tmp && mv $@.tmp $@ +endif + INCLUDES = @GLIB_CFLAGS@ @GTK_CFLAGS@ @LIBSPEC_CFLAGS@ \ -@XML_CFLAGS@ @SAMPLERATE_CFLAGS@ -DFUSEDATADIR="\"${pkgdatadir}\"" @SDL_CFLAGS@ +@XML_CFLAGS@ -DFUSEDATADIR="\"${pkgdatadir}\"" @SDL_CFLAGS@ noinst_HEADERS = ay.h \ bitmap.h \ compat.h \ dck.h \ display.h \ - divide.h \ event.h \ + fuller.h \ fuse.h \ - ide.h \ if1.h \ if2.h \ input.h \ @@ -172,6 +184,7 @@ kempmouse.h \ loader.h \ machine.h \ + melodik.h \ memory.h \ mempool.h \ menu.h \ @@ -181,7 +194,6 @@ rzx.h \ screenshot.h \ settings.h \ - simpleide.h \ slt.h \ snapshot.h \ sound.h \ @@ -189,12 +201,11 @@ tape.h \ utils.h \ joystick.h \ + options.h \ printer.h \ profile.h \ scld.h \ - ula.h \ - zxatasp.h \ - zxcf.h + ula.h EXTRA_DIST = AUTHORS \ README \ @@ -208,7 +219,8 @@ settings.dat \ winfuse.ico -CLEANFILES = settings.c \ +CLEANFILES = options.h \ + settings.c \ settings.h AM_CPPFLAGS = Modified: trunk/fuse/README =================================================================== --- trunk/fuse/README 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/README 2009-06-29 22:23:59 UTC (rev 601) @@ -1,5 +1,5 @@ -The Free Unix Spectrum Emulator (Fuse) 0.10.0 -============================================= +The Free Unix Spectrum Emulator (Fuse) 0.10.0.1 +=============================================== Fuse (the Free Unix Spectrum Emulator) was originally, and somewhat unsurprisingly, an emulator of the ZX Spectrum (a popular 1980s home @@ -55,8 +55,6 @@ * libpng: the ability to save screenshots * libxml2: the ability to load and save Fuse's current configuration * zlib: support for compressed RZX files - * samplerate: support for better beeper sound quality; get it from - http://www.mega-nerd.com/SRC/ If you've used Fuse prior to version 0.5.0, note that the external utilities (tzxlist, etc) are now available separately from Fuse @@ -123,6 +121,36 @@ The native Cocoa port by Fredrick Meunier <fr...@sp...> comes as a set of Xcode projects for libgcrypt, libspectrum and Fuse itself. +Building the Wii version of Fuse +-------------------------------- + +You'll need to have the standard Wii homebrew toolchain installed; see +eg <http://wiibrew.org/wiki/DevkitPro> for some information on setting +this up. + +After that, make sure the dev tools are in your path (export +PATH=$PATH:$DEVKITPPC/bin) and that a Wii version of libspectrum has been +built and installed. + +Then, use this configure line: + +./configure --target=powerpc-gekko --host=powerpc-gekko \ + --with-wii \ + --without-libxml2 --without-libiconv --without-gpm \ + --without-x --without-glib \ + CFLAGS="-g -I$DEVKITPPC/include -I$DEVKITPRO/libogc/include" \ + LDFLAGS="-g -mrvl -mcpu=750 -meabi -mhard-float \ + -Wl,-Map,fuse.elf.map -L$DEVKITPPC/lib \ + -L$DEVKITPRO/libogc/lib/wii" \ + LIBS="-lfat -lwiiuse -lbte -logc -lm" + +Finally, to build, use this line: + +EXEEXT=".elf" make -e + +This should build fuse.elf, which you can run on your Wii via the usual +methods. + Closing comments ---------------- @@ -150,6 +178,6 @@ ( http://www.worldofspectrum.org/faq/index.html ) first! Philip Kendall <phi...@sh...> -3 December 2008 +10 December 2008 -$Id: README 3866 2008-11-29 17:05:40Z pak21 $ +$Id: README 4021 2009-05-29 13:39:51Z fredm $ Modified: trunk/fuse/TODO =================================================================== --- trunk/fuse/TODO 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/TODO 2009-06-29 22:23:59 UTC (rev 601) @@ -1,16 +1,12 @@ TODO * Pentagon port #ff returning floating bus issues - it does it because the RusFAQ says so? -* Timex 2068 fusetests -* Console mode GUI -* Add "proper" preferences window +* Collapse Media hierarchy, just have Tape, Disk A, Disk B, Master, Slave, Microdrive 1..4 etc. * Add TITLE tags to help files? * SZX ZX Printer block? * PAL Compsite emulation * Separate out sound buffer interleaving code to allow for the use of hardware etc. sound mixing -* Add volume option to standard fuse + a sound API method to set volume (or a - parameter to sound_lowlevel_init) * Randomise FRAMES sys var after autoload snapshot loaded in order to try and get less deterministic program behaviour after load is complete * Use sheets rather than modal dialogs (for Save As) @@ -18,7 +14,6 @@ * Make border display optional * Make activity icons transparent * SZX +3 block - seems to be redundant? -* Add pause function * Add QuickLook HTML view showing Title, etc. like QuickLook on MP3s $Id: TODO 2026 2004-03-02 13:38:08Z pak21 $ Modified: trunk/fuse/ay.c =================================================================== --- trunk/fuse/ay.c 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/ay.c 2009-06-29 22:23:59 UTC (rev 601) @@ -1,7 +1,7 @@ /* ay.c: AY-8-3912 routines - Copyright (c) 1999-2004 Philip Kendall + Copyright (c) 1999-2009 Philip Kendall - $Id: ay.c 3494 2008-01-15 16:37:50Z pak21 $ + $Id: ay.c 4030 2009-06-07 14:38:38Z fredm $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -131,22 +131,26 @@ if( current == 14 ) printer_serial_write( b ); } -static void -ay_from_snapshot( libspectrum_snap *snap ) +void +ay_state_from_snapshot( libspectrum_snap *snap ) { size_t i; - if( machine_current->capabilities & LIBSPECTRUM_MACHINE_CAPABILITY_AY ) { + ay_registerport_write( 0xfffd, + libspectrum_snap_out_ay_registerport( snap ) ); - ay_registerport_write( 0xfffd, - libspectrum_snap_out_ay_registerport( snap ) ); + for( i = 0; i < AY_REGISTERS; i++ ) { + machine_current->ay.registers[i] = + libspectrum_snap_ay_registers( snap, i ); + sound_ay_write( i, machine_current->ay.registers[i], 0 ); + } +} - for( i = 0; i < AY_REGISTERS; i++ ) { - machine_current->ay.registers[i] = - libspectrum_snap_ay_registers( snap, i ); - sound_ay_write( i, machine_current->ay.registers[i], 0 ); - } - +static void +ay_from_snapshot( libspectrum_snap *snap ) +{ + if( machine_current->capabilities & LIBSPECTRUM_MACHINE_CAPABILITY_AY ) { + ay_state_from_snapshot( snap ); } } Modified: trunk/fuse/ay.h =================================================================== --- trunk/fuse/ay.h 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/ay.h 2009-06-29 22:23:59 UTC (rev 601) @@ -1,7 +1,7 @@ /* ay.h: AY-8-3912 routines - Copyright (c) 1999-2004 Philip Kendall + Copyright (c) 1999-2009 Philip Kendall - $Id: ay.h 2993 2007-06-17 13:54:49Z pak21 $ + $Id: ay.h 4030 2009-06-07 14:38:38Z fredm $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -42,4 +42,6 @@ void ay_dataport_write( libspectrum_word port, libspectrum_byte b ); +void ay_state_from_snapshot( libspectrum_snap *snap ); + #endif /* #ifndef FUSE_AY_H */ Modified: trunk/fuse/compat/Makefile.am =================================================================== --- trunk/fuse/compat/Makefile.am 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/compat/Makefile.am 2009-06-29 22:23:59 UTC (rev 601) @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in ## Copyright (c) 2003-2007 Philip Kendall -## $Id: Makefile.am 3283 2007-11-09 12:21:06Z fredm $ +## $Id: Makefile.am 3944 2009-01-10 18:17:04Z pak21 $ ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -26,6 +26,7 @@ DIST_SUBDIRS += compat/amiga \ compat/morphos \ compat/unix \ + compat/wii \ compat/win32 EXTRA_fuse_SOURCES += compat/dirname.c \ Modified: trunk/fuse/compat/amiga/Makefile.am =================================================================== --- trunk/fuse/compat/amiga/Makefile.am 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/compat/amiga/Makefile.am 2009-06-29 22:23:59 UTC (rev 601) @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in ## Copyright (c) 2007-2008 Philip Kendall -## $Id: Makefile.am 3687 2008-06-23 11:55:23Z pak21 $ +## $Id: Makefile.am 3935 2009-01-07 12:55:13Z pak21 $ ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -27,8 +27,10 @@ noinst_LIBRARIES = libcompatos.a -libcompatos_a_SOURCES = ../unix/file.c \ +libcompatos_a_SOURCES = ../unix/dir.c \ + ../unix/file.c \ osname.c \ - paths.c + paths.c \ + ../unix/timer.c INCLUDES = @GLIB_CFLAGS@ @GTK_CFLAGS@ @LIBSPEC_CFLAGS@ Modified: trunk/fuse/compat/amiga/paths.c =================================================================== --- trunk/fuse/compat/amiga/paths.c 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/compat/amiga/paths.c 2009-06-29 22:23:59 UTC (rev 601) @@ -1,7 +1,7 @@ /* paths.c: Path-related compatibility routines Copyright (c) 1999-2007 Philip Kendall - $Id: paths.c 3844 2008-11-19 21:31:07Z fredm $ + $Id: paths.c 3843 2008-11-19 21:27:03Z fredm $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/fuse/compat/morphos/Makefile.am =================================================================== --- trunk/fuse/compat/morphos/Makefile.am 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/compat/morphos/Makefile.am 2009-06-29 22:23:59 UTC (rev 601) @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in ## Copyright (c) 2007-2008 Philip Kendall -## $Id: Makefile.am 3687 2008-06-23 11:55:23Z pak21 $ +## $Id: Makefile.am 3935 2009-01-07 12:55:13Z pak21 $ ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -27,8 +27,10 @@ noinst_LIBRARIES = libcompatos.a -libcompatos_a_SOURCES = ../unix/file.c \ +libcompatos_a_SOURCES = ../unix/dir.c \ + ../unix/file.c \ osname.c \ - ../amiga/paths.c + ../amiga/paths.c \ + ../unix/timer.c INCLUDES = @GLIB_CFLAGS@ @GTK_CFLAGS@ @LIBSPEC_CFLAGS@ Modified: trunk/fuse/compat/morphos/osname.c =================================================================== --- trunk/fuse/compat/morphos/osname.c 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/compat/morphos/osname.c 2009-06-29 22:23:59 UTC (rev 601) @@ -1,7 +1,7 @@ /* osname.c: Get a representation of the OS we're running on Copyright (c) 1999-2007 Philip Kendall - $Id: osname.c 3139 2007-09-03 10:27:57Z fredm $ + $Id: osname.c 3922 2008-12-31 19:01:31Z zubzero $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/fuse/compat/unix/Makefile.am =================================================================== --- trunk/fuse/compat/unix/Makefile.am 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/compat/unix/Makefile.am 2009-06-29 22:23:59 UTC (rev 601) @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in ## Copyright (c) 2007-2008 Philip Kendall -## $Id: Makefile.am 3687 2008-06-23 11:55:23Z pak21 $ +## $Id: Makefile.am 3935 2009-01-07 12:55:13Z pak21 $ ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -27,8 +27,10 @@ noinst_LIBRARIES = libcompatos.a -libcompatos_a_SOURCES = file.c \ +libcompatos_a_SOURCES = dir.c \ + file.c \ osname.c \ - paths.c + paths.c \ + timer.c INCLUDES = @GLIB_CFLAGS@ @GTK_CFLAGS@ @LIBSPEC_CFLAGS@ Copied: trunk/fuse/compat/unix/dir.c (from rev 600, vendor/fuse-emulator/current/fuse/compat/unix/dir.c) =================================================================== --- trunk/fuse/compat/unix/dir.c (rev 0) +++ trunk/fuse/compat/unix/dir.c 2009-06-29 22:23:59 UTC (rev 601) @@ -0,0 +1,63 @@ +/* dir.c: Directory-related compatibility routines + Copyright (c) 2009 Philip Kendall + + $Id: dir.c 3945 2009-01-10 18:44:42Z zubzero $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + Author contact information: + + E-mail: phi...@sh... + +*/ + +#include <config.h> + +#include <errno.h> +#include <string.h> + +#include "compat.h" + +compat_dir +compat_opendir( const char *path ) +{ + return opendir( path ); +} + +compat_dir_result_t +compat_readdir( compat_dir directory, char *name, size_t length ) +{ + compat_dir_result_t r; + struct dirent *dirent; + + errno = 0; + dirent = readdir( directory ); + + if( dirent ) { + r = COMPAT_DIR_RESULT_OK; + strncpy( name, dirent->d_name, length ); + name[ length - 1 ] = 0; + } else { + r = ( errno == 0 ? COMPAT_DIR_RESULT_END : COMPAT_DIR_RESULT_ERROR ); + } + + return r; +} + +int +compat_closedir( compat_dir directory ) +{ + return closedir( directory ); +} Modified: trunk/fuse/compat/unix/file.c =================================================================== --- trunk/fuse/compat/unix/file.c 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/compat/unix/file.c 2009-06-29 22:23:59 UTC (rev 601) @@ -1,7 +1,7 @@ /* file.c: File-related compatibility routines Copyright (c) 2008 Philip Kendall - $Id: file.c 3776 2008-10-06 00:49:45Z fredm $ + $Id: file.c 4040 2009-06-27 09:32:42Z fredm $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -33,22 +33,15 @@ #include <unistd.h> #include "compat.h" +#include "utils.h" #include "ui/ui.h" -/* Certain brain damaged operating systems (DOS/Windows) treat text - and binary files different in open(2) and need to be given the - O_BINARY flag to tell them it's a binary file */ -#ifndef O_BINARY -#define O_BINARY 0 -#endif /* #ifndef O_BINARY */ +const compat_fd COMPAT_FILE_OPEN_FAILED = NULL; -const compat_fd COMPAT_FILE_OPEN_FAILED = -1; - compat_fd compat_file_open( const char *path, int write ) { - int flags = write ? O_WRONLY | O_CREAT | O_BINARY : O_RDONLY | O_BINARY; - return open( path, flags, 0666 ); + return fopen( path, write ? "w" : "r" ); } off_t @@ -56,7 +49,7 @@ { struct stat file_info; - if( fstat( fd, &file_info ) ) { + if( fstat( fileno( fd ), &file_info ) ) { ui_error( UI_ERROR_ERROR, "couldn't stat file: %s", strerror( errno ) ); return -1; } @@ -67,15 +60,11 @@ int compat_file_read( compat_fd fd, utils_file *file ) { - ssize_t bytes = read( fd, file->buffer, file->length ); + size_t bytes = fread( file->buffer, 1, file->length, fd ); if( bytes != file->length ) { - if( bytes == -1 ) { - ui_error( UI_ERROR_ERROR, "error reading file: %s", strerror( errno ) ); - } else { - ui_error( UI_ERROR_ERROR, - "error reading file: expected %ld bytes, but read only %ld", - (unsigned long)file->length, (unsigned long)bytes ); - } + ui_error( UI_ERROR_ERROR, + "error reading file: expected %lu bytes, but read only %lu", + file->length, bytes ); return 1; } @@ -85,15 +74,11 @@ int compat_file_write( compat_fd fd, const unsigned char *buffer, size_t length ) { - ssize_t bytes = write( fd, buffer, length ); + size_t bytes = fwrite( buffer, 1, length, fd ); if( bytes != length ) { - if( bytes == -1 ) { - ui_error( UI_ERROR_ERROR, "error writing file: %s", strerror( errno ) ); - } else { - ui_error( UI_ERROR_ERROR, - "error writing file: expected %ld bytes, but wrote only %ld", - (unsigned long)length, (unsigned long)bytes ); - } + ui_error( UI_ERROR_ERROR, + "error writing file: expected %lu bytes, but wrote only %lu", + length, bytes ); return 1; } @@ -103,5 +88,5 @@ int compat_file_close( compat_fd fd ) { - return close( fd ); + return fclose( fd ); } Modified: trunk/fuse/compat/unix/osname.c =================================================================== --- trunk/fuse/compat/unix/osname.c 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/compat/unix/osname.c 2009-06-29 22:23:59 UTC (rev 601) @@ -1,7 +1,7 @@ /* osname.c: Get a representation of the OS we're running on Copyright (c) 1999-2007 Philip Kendall - $Id: osname.c 3626 2008-05-23 10:30:30Z pak21 $ + $Id: osname.c 3922 2008-12-31 19:01:31Z zubzero $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/fuse/compat/unix/paths.c =================================================================== --- trunk/fuse/compat/unix/paths.c 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/compat/unix/paths.c 2009-06-29 22:23:59 UTC (rev 601) @@ -1,7 +1,7 @@ /* paths.c: Path-related compatibility routines Copyright (c) 1999-2007 Philip Kendall - $Id: paths.c 3253 2007-10-26 02:02:17Z zubzero $ + $Id: paths.c 3922 2008-12-31 19:01:31Z zubzero $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Copied: trunk/fuse/compat/unix/timer.c (from rev 600, vendor/fuse-emulator/current/fuse/compat/unix/timer.c) =================================================================== --- trunk/fuse/compat/unix/timer.c (rev 0) +++ trunk/fuse/compat/unix/timer.c 2009-06-29 22:23:59 UTC (rev 601) @@ -0,0 +1,55 @@ +/* timer.c: UNIX speed routines for Fuse + Copyright (c) 1999-2008 Philip Kendall, Marek Januszewski, Fredrick Meunier + + $Id: timer.c 3982 2009-02-11 12:00:22Z fredm $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + Author contact information: + + E-mail: phi...@sh... + +*/ + +#include <config.h> + +#include <errno.h> +#include <string.h> +#include <sys/time.h> +#include <unistd.h> + +#include "compat.h" +#include "ui/ui.h" + +double +compat_timer_get_time( void ) +{ + struct timeval tv; + int error; + + error = gettimeofday( &tv, NULL ); + if( error ) { + ui_error( UI_ERROR_ERROR, "%s: error getting time: %s", __func__, strerror( errno ) ); + return -1; + } + + return tv.tv_sec + tv.tv_usec / 1000000.0; +} + +void +compat_timer_sleep( int ms ) +{ + usleep( ms * 1000 ); +} Modified: trunk/fuse/compat/wii/Makefile.am =================================================================== --- trunk/fuse/compat/wii/Makefile.am 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/compat/wii/Makefile.am 2009-06-29 22:23:59 UTC (rev 601) @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in ## Copyright (c) 2007-2008 Philip Kendall -## $Id: Makefile.am 3687 2008-06-23 11:55:23Z pak21 $ +## $Id: Makefile.am 4040 2009-06-27 09:32:42Z fredm $ ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -27,8 +27,10 @@ noinst_LIBRARIES = libcompatos.a -libcompatos_a_SOURCES = file.c \ +libcompatos_a_SOURCES = dir.c \ + ../unix/file.c \ osname.c \ - paths.c + paths.c \ + timer.c INCLUDES = @GLIB_CFLAGS@ @GTK_CFLAGS@ @LIBSPEC_CFLAGS@ Copied: trunk/fuse/compat/wii/dir.c (from rev 600, vendor/fuse-emulator/current/fuse/compat/wii/dir.c) =================================================================== --- trunk/fuse/compat/wii/dir.c (rev 0) +++ trunk/fuse/compat/wii/dir.c 2009-06-29 22:23:59 UTC (rev 601) @@ -0,0 +1,50 @@ +/* dir.c: Directory-related compatibility routines + Copyright (c) 2009 Philip Kendall + + $Id: dir.c 3945 2009-01-10 18:44:42Z zubzero $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + Author contact information: + + E-mail: phi...@sh... + +*/ + +#include <config.h> + +#include "compat.h" + +compat_dir +compat_opendir( const char *path ) +{ + return diropen( path ); +} + +compat_dir_result_t +compat_readdir( compat_dir directory, char *path, size_t length ) +{ + struct stat fstat; + + int done = dirnext( directory, path, &fstat ); + + return done ? COMPAT_DIR_RESULT_END : COMPAT_DIR_RESULT_OK; +} + +int +compat_closedir( compat_dir directory ) +{ + return dirclose( directory ); +} Deleted: trunk/fuse/compat/wii/file.c =================================================================== --- trunk/fuse/compat/wii/file.c 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/compat/wii/file.c 2009-06-29 22:23:59 UTC (rev 601) @@ -1,90 +0,0 @@ -/* file.c: File-related compatibility routines - Copyright (c) 2008 Philip Kendall - - $Id: file.c 3688 2008-06-23 18:17:56Z pak21 $ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - Author contact information: - - E-mail: phi...@sh... - -*/ - -#include <config.h> - -#include <errno.h> -#include <fcntl.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <unistd.h> - -#include "compat.h" -#include "ui/ui.h" - -const compat_fd COMPAT_FILE_OPEN_FAILED = NULL; - -compat_fd -compat_file_open( const char *path, int write ) -{ - return fopen( path, write ? "w" : "r" ); -} - -off_t -compat_file_get_length( compat_fd fd ) -{ - struct stat file_info; - - if( fstat( fileno( fd ), &file_info ) ) { - ui_error( UI_ERROR_ERROR, "couldn't stat file: %s", strerror( errno ) ); - return -1; - } - - return file_info.st_size; -} - -int -compat_file_read( compat_fd fd, utils_file *file ) -{ - size_t bytes = fread( file->buffer, 1, file->length, fd ); - if( bytes != file->length ) { - ui_error( UI_ERROR_ERROR, - "error reading file: expected %d bytes, but read only %d", - file->length, bytes ); - return 1; - } - - return 0; -} - -int -compat_file_write( compat_fd fd, const unsigned char *buffer, size_t length ) -{ - size_t bytes = fwrite( buffer, 1, length, fd ); - if( bytes != length ) { - ui_error( UI_ERROR_ERROR, - "error writing file: expected %d bytes, but wrote only %d", - length, bytes ); - return 1; - } - - return 0; -} - -int -compat_file_close( compat_fd fd ) -{ - return fclose( fd ); -} Copied: trunk/fuse/compat/wii/osname.c (from rev 600, vendor/fuse-emulator/current/fuse/compat/wii/osname.c) =================================================================== --- trunk/fuse/compat/wii/osname.c (rev 0) +++ trunk/fuse/compat/wii/osname.c 2009-06-29 22:23:59 UTC (rev 601) @@ -0,0 +1,39 @@ +/* osname.c: Get a representation of the OS we're running on + Copyright (c) 1999-2009 Philip Kendall, Bjoern Giesler + + $Id: osname.c 3945 2009-01-10 18:44:42Z zubzero $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + Author contact information: + + E-mail: phi...@sh... + +*/ + +#include <config.h> + +#include <errno.h> +#include <stdlib.h> +#include <string.h> + +#include "ui/ui.h" + +int +compat_osname( char *buffer, size_t length ) +{ + snprintf(buffer, length, "Wii"); + return 0; +} Copied: trunk/fuse/compat/wii/paths.c (from rev 600, vendor/fuse-emulator/current/fuse/compat/wii/paths.c) =================================================================== --- trunk/fuse/compat/wii/paths.c (rev 0) +++ trunk/fuse/compat/wii/paths.c 2009-06-29 22:23:59 UTC (rev 601) @@ -0,0 +1,54 @@ +/* paths.c: Path-related compatibility routines + Copyright (c) 1999-2009 Philip Kendall, Bjoern Giesler + + $Id: paths.c 3970 2009-01-19 03:47:02Z specu $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + Author contact information: + + E-mail: phi...@sh... + +*/ + +#include <config.h> + +#include <stdlib.h> +#include <string.h> + +#include "compat.h" + +const char* +compat_get_temp_path( void ) +{ + return "/tmp"; +} + +const char* +compat_get_home_path( void ) +{ + return "sd:/apps/fuse"; +} + +int +compat_is_absolute_path( const char *path ) +{ + if(strlen(path) >= 1 && path[0] == '/') + return 1; + if(strlen(path) >= strlen("fat:/") && + strncmp(path, "fat:/", strlen("fat:/")) == 0) + return 1; + return 0; +} Copied: trunk/fuse/compat/wii/timer.c (from rev 600, vendor/fuse-emulator/current/fuse/compat/wii/timer.c) =================================================================== --- trunk/fuse/compat/wii/timer.c (rev 0) +++ trunk/fuse/compat/wii/timer.c 2009-06-29 22:23:59 UTC (rev 601) @@ -0,0 +1,57 @@ +/* unix.c: UNIX speed routines for Fuse + Copyright (c) 1999-2007 Philip Kendall, Marek Januszewski, Fredrick Meunier + + $Id: timer.c 3944 2009-01-10 18:17:04Z pak21 $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + Author contact information: + + E-mail: phi...@sh... + +*/ + +#include <config.h> + +#include <errno.h> +#include <string.h> +#include <unistd.h> + +#include "compat.h" +#include "ui/ui.h" + +/* FIXME: where should we get this prototype from? */ +extern int clock_gettime(struct timespec *tp); + +double +compat_timer_get_time( void ) +{ + int error; + struct timespec tp; + + error = clock_gettime(&tp); + if( error ) { + ui_error( UI_ERROR_ERROR, "%s: error getting time: %s", __func__, strerror( errno ) ); + return -1; + } + + return tp.tv_sec + tp.tv_nsec / 1000000000.0; +} + +void +compat_timer_sleep( int ms ) +{ + usleep( ms * 1000 ); +} Modified: trunk/fuse/compat/win32/Makefile.am =================================================================== --- trunk/fuse/compat/win32/Makefile.am 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/compat/win32/Makefile.am 2009-06-29 22:23:59 UTC (rev 601) @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in ## Copyright (c) 2007-2008 Philip Kendall -## $Id: Makefile.am 3687 2008-06-23 11:55:23Z pak21 $ +## $Id: Makefile.am 3935 2009-01-07 12:55:13Z pak21 $ ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -27,8 +27,10 @@ noinst_LIBRARIES = libcompatos.a -libcompatos_a_SOURCES = ../unix/file.c \ +libcompatos_a_SOURCES = ../unix/dir.c \ + ../unix/file.c \ osname.c \ - paths.c + paths.c \ + timer.c INCLUDES = @GLIB_CFLAGS@ @GTK_CFLAGS@ @LIBSPEC_CFLAGS@ Modified: trunk/fuse/compat/win32/osname.c =================================================================== --- trunk/fuse/compat/win32/osname.c 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/compat/win32/osname.c 2009-06-29 22:23:59 UTC (rev 601) @@ -1,7 +1,7 @@ /* osname.c: Get a representation of the OS we're running on Copyright (c) 1999-2007 Philip Kendall - $Id: osname.c 3315 2007-11-20 03:01:59Z zubzero $ + $Id: osname.c 3922 2008-12-31 19:01:31Z zubzero $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/fuse/compat/win32/paths.c =================================================================== --- trunk/fuse/compat/win32/paths.c 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/compat/win32/paths.c 2009-06-29 22:23:59 UTC (rev 601) @@ -1,7 +1,7 @@ /* paths.c: Path-related compatibility routines Copyright (c) 1999-2007 Philip Kendall - $Id: paths.c 3253 2007-10-26 02:02:17Z zubzero $ + $Id: paths.c 3922 2008-12-31 19:01:31Z zubzero $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Copied: trunk/fuse/compat/win32/timer.c (from rev 600, vendor/fuse-emulator/current/fuse/compat/win32/timer.c) =================================================================== --- trunk/fuse/compat/win32/timer.c (rev 0) +++ trunk/fuse/compat/win32/timer.c 2009-06-29 22:23:59 UTC (rev 601) @@ -0,0 +1,42 @@ +/* timer.c: Win32 speed routines for Fuse + Copyright (c) 1999-2008 Philip Kendall, Marek Januszewski, Fredrick Meunier + + $Id: timer.c 3951 2009-01-12 18:09:42Z specu $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + Author contact information: + + E-mail: phi...@sh... + +*/ + +#include <config.h> + +#include <windows.h> + +#include "compat.h" + +double +compat_timer_get_time( void ) +{ + return GetTickCount() / 1000.0; +} + +void +compat_timer_sleep( int ms ) +{ + Sleep( ms ); +} Modified: trunk/fuse/compat.h =================================================================== --- trunk/fuse/compat.h 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/compat.h 2009-06-29 22:23:59 UTC (rev 601) @@ -1,7 +1,7 @@ /* compat.h: various compatibility bits Copyright (c) 2003-2008 Philip Kendall - $Id: compat.h 3687 2008-06-23 11:55:23Z pak21 $ + $Id: compat.h 4040 2009-06-27 09:32:42Z fredm $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,10 +26,11 @@ #ifndef FUSE_COMPAT_H #define FUSE_COMPAT_H +#include <stdio.h> +#include <dirent.h> #include <stdlib.h> +#include <sys/types.h> -#include <utils.h> - /* Remove the gcc-specific incantations if we're not using gcc */ #ifdef __GNUC__ @@ -49,12 +50,12 @@ char *dirname( char *path ); #endif /* #ifndef HAVE_DIRNAME */ -#if !defined HAVE_GETOPT_LONG && !defined AMIGA && !defined __MORPHOS__ +#if !defined HAVE_GETOPT_LONG && !defined AMIGA && !defined __MORPHOS__ && !defined __APPLE__ #include "compat/getopt.h" #endif /* #ifndef HAVE_GETOPT_LONG */ #ifndef HAVE_MKSTEMP -int mkstemp( char *tmpl ); +int mkstemp( char *templ ); #endif /* #ifndef HAVE_MKSTEMP */ /* That which separates components in a path name */ @@ -66,24 +67,52 @@ #define FUSE_DIR_SEP_STR "/" #endif +#ifndef PATH_MAX +#define PATH_MAX 1024 +#endif + int compat_osname( char *buffer, size_t length ); const char* compat_get_temp_path( void ); const char* compat_get_home_path( void ); int compat_is_absolute_path( const char *path ); +typedef FILE* compat_fd; + #ifndef UI_WII -typedef int compat_fd; +typedef DIR* compat_dir; #else /* #ifndef UI_WII */ -typedef FILE* compat_fd; +typedef DIR_ITER* compat_dir; #endif /* #ifndef UI_WII */ extern const compat_fd COMPAT_FILE_OPEN_FAILED; +/* File handling */ + +struct utils_file; + compat_fd compat_file_open( const char *path, int write ); off_t compat_file_get_length( compat_fd fd ); -int compat_file_read( compat_fd fd, utils_file *file ); +int compat_file_read( compat_fd fd, struct utils_file *file ); int compat_file_write( compat_fd fd, const unsigned char *buffer, size_t length ); int compat_file_close( compat_fd fd ); +/* Directory handling */ + +typedef enum compat_dir_result_t { + COMPAT_DIR_RESULT_OK, + COMPAT_DIR_RESULT_END, + COMPAT_DIR_RESULT_ERROR, +} compat_dir_result_t; + +compat_dir compat_opendir( const char *path ); +compat_dir_result_t compat_readdir( compat_dir directory, char *name, + size_t length ); +int compat_closedir( compat_dir directory ); + +/* Timing routines */ + +double compat_timer_get_time( void ); +void compat_timer_sleep( int ms ); + #endif /* #ifndef FUSE_COMPAT_H */ Modified: trunk/fuse/configure.in =================================================================== --- trunk/fuse/configure.in 2009-06-27 12:48:09 UTC (rev 600) +++ trunk/fuse/configure.in 2009-06-29 22:23:59 UTC (rev 601) @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -dnl $Id: configure.in 3866 2008-11-29 17:05:40Z pak21 $ +dnl $Id: configure.in 4028 2009-05-31 13:15:52Z fredm $ dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by @@ -24,7 +24,7 @@ AC_CANONICAL_SYSTEM dnl Use automake to produce `Makefile.in' -AM_INIT_AUTOMAKE(fuse, 0.10.0) +AM_INIT_AUTOMAKE(fuse, 0.10.0.1) dnl Checks for programs. AC_PROG_CC @@ -93,7 +93,7 @@ AC_MSG_RESULT($win32) if test "$win32" = yes; then AC_CHECK_HEADER(windows.h, - LIBS="$LIBS -mwindows -lcomctl32"; + LIBS="$LIBS -mwindows -lcomctl32 -lwinmm"; AC_DEFINE([UI_WIN32], 1, [Defined if Win32 UI in use]) AC_DEFINE([WINVER], 0x0400, [Minimal supported version of Windows is 95 or NT4]) AC_DEFINE([_WIN32_IE], 0x400, [Internet Explorer is 4.0 or higher is required]) @@ -149,6 +149,38 @@ fi fi +dnl Look for Wii interface (default = 0) +if test -z "$UI"; then + AC_MSG_CHECKING(whether Wii UI requested) + AC_ARG_WITH(wii, + [ --with-wii use Wii FB for user interface], + if test "$withval" = no; then wii=no; else wii=yes; fi, + wii=no) + AC_MSG_RESULT($wii) + if test "$wii" = yes; then + AC_DEFINE([UI_WII], 1, [Defined if Wii UI in use]) + AC_DEFINE([USE_WIDGET], 1, [Defined if we're using a widget-based UI]) + AC_DEFINE([USE_JOYSTICK], 1, [Defined if we're using hardware joysticks]) + UI=wii; WIDGET=widget; + UI_LIBS="ui/wii/libuiwii.a ui/widget/libwidget.a" + target_os=wii + dnl Look for libgpm (default=yes) + AC_MSG_CHECKING(whether gpm requested) + AC_ARG_WITH(gpm, + [ --without-gpm don't use libgp... [truncated message content] |