diff options
author | wiz <wiz@pkgsrc.org> | 2006-04-17 14:50:47 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2006-04-17 14:50:47 +0000 |
commit | 8f295b0577cc5a7a2fdd6936a9e994c5f41f6257 (patch) | |
tree | 439502d237acfb8d22dcab3dfd75dca45583eb4f /emulators/vba | |
parent | e823f1820e8f2cfb30dd3adb6c6aaa4a3659985b (diff) | |
download | pkgsrc-8f295b0577cc5a7a2fdd6936a9e994c5f41f6257.tar.gz |
Update to 1.7.2, from dillo@.
SDL code majorly hacked so it works (by dillo@).
I had this lying around for ages, so I'll just commit it now.
Version 1.7.2:
Core changes:
- fixed bugs on ELF clean up
- improved CodeBreaker 0xDxxxxxxx code support
- updated Scale2x filter to version 2.0
- improved memory timing
- added support for z2 (delete break on write) so that gdb can use break on write
Windows:
- added search for base language dll
- fixed GDI problems with selected bitmap being deleted
- added JPEG and PNG support for skins
- changed import/export battery file to default to battery directory
- fixed the translation bug with viewers
- fixed the GB map view flickering
- fixed skin bugs
SDL versions:
- now it exits when closing the window
Other:
- added a new interface using GTK+, which implements a first part of the Windows version
Version 1.7.1:
Core changes:
- added SWI call (0xf9 in thumb mode) to exit emulator in SDL version
- avoid crash when loading an invalid ELF file
- avoid turning sound on if soundOffFlag is true
- disabled remove intros option
- fixed memory leak in ELF support code
- fixed memory corruption if loading a bigger file than the memory to hold it
- fixed some compile warnings in the profiling code
- merged some big endian fixes into the code
- update battery files more often (a bit after the save memory is last updated)
Gameboy:
- fixed bug with window support introduced in version 1.7
- fixed HALT bug when no matching bits for interrupt
Windows:
- added cartridge save strings to bug report
- changed default button on disassembly views to Go instead of Close
- changed power management/screen saver disabling code again to avoid problems
- fixed compilation problems on VC 7
- fixed multi-monitor support
- fixed bug loading memory dumps
- fixed crash onb map/oam/tile viewers
- fixed problem 320x240 mode open/save dialogs
- fixed bug where user selected Gameboy colors were reset and not stored
- fixed bug rendering the translator URL
- fixed memory leak in OpenGL code which caused nasty problems
- store throttle value between restarts of the emulator
- updated FAQ and URL links to the new site
Version 1.7:
Core changes:
- added fixes to video filters done by Flea for Mac OS X
- added/fixed ArcTan/ArcTan2 emulation
- added sound volume .25 and.50
- added hq2x/lq2x filters
- aded global cheat disable
- some code clean up
- fixed some CBA cheat support
- fixed ARM/Thumb instruction timing, including memory access
- fixed minor bugs in STMDx ARM instructions
- fixed ARM LDRx instructions when base equals dest
Gameboy:
- added support for 8M roms
- (re)added support for 2-4 playes in SGB mode
- added sprite limit emulation (thanks Ricky of KiGB)
- cancel pending EI when imediately followed by DI
- implemented DI/HALT bug
- implemented STAT write bug during VBLANK or HBLANK when in GB mode
- implemented GDMA delay in GBC mode (thanks TM of GEST)
- fixed priority between OBJ and Window
- fixed some SGB border problems
- fixed window rendering problems in some cases
- fixed CGB initial background palette to white
- fixed initial save memory value to 0xFF instead of 0x00 (thanks TM of GEST)
- fixed LCD interrupts to only occur once per line
- fixed incorrect display when BG is off
- modified interrut delay to 6 clock ticks instead of 2
- moved scanline update to beginning of HBLANK
Windows:
- added predefined Gameboy palettes (thanks Kojote)
- added GBA IO Viewer to view/modify GBA hardware registers
- added menu entry to load most recent save state
- added menu entry to save state into oldest slot
- added option to auto load the most recent save state upon loading
- added fullscreen max scale option
- chnaged the bug report option to be a little more friendly
- enhanced save state submenus to show date/time of when save was made
- enhanced logging window to capture data even if not being displayed
- fixed Direct3D/OpenGL "green" bug with Motion Blur Interframe Blending
- fixed Direct3D full screen with Gameboy roms
- fixed minor bugs when saving images in the different viewers
- fixed power management disabling: should avoid monitor turning off now
- improved cheat input to be more flexible and easy to enter
- migrated whole GUI code to MFC
Diffstat (limited to 'emulators/vba')
-rw-r--r-- | emulators/vba/Makefile | 3 | ||||
-rw-r--r-- | emulators/vba/distinfo | 12 | ||||
-rw-r--r-- | emulators/vba/patches/patch-aa | 4 | ||||
-rw-r--r-- | emulators/vba/patches/patch-ab | 15 | ||||
-rw-r--r-- | emulators/vba/patches/patch-ac | 271 |
5 files changed, 296 insertions, 9 deletions
diff --git a/emulators/vba/Makefile b/emulators/vba/Makefile index cd62174d64e..24dfa5af839 100644 --- a/emulators/vba/Makefile +++ b/emulators/vba/Makefile @@ -1,8 +1,7 @@ -# $NetBSD: Makefile,v 1.17 2006/04/17 13:46:23 wiz Exp $ +# $NetBSD: Makefile,v 1.18 2006/04/17 14:50:47 wiz Exp $ DISTNAME= VisualBoyAdvance-src-1.7.2 PKGNAME= vba-1.7.2 -PKGREVISION= 1 CATEGORIES= emulators MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=vba/} diff --git a/emulators/vba/distinfo b/emulators/vba/distinfo index 34e39657c3e..bb97ebee3b0 100644 --- a/emulators/vba/distinfo +++ b/emulators/vba/distinfo @@ -1,6 +1,8 @@ -$NetBSD: distinfo,v 1.2 2005/02/23 18:49:21 agc Exp $ +$NetBSD: distinfo,v 1.3 2006/04/17 14:50:47 wiz Exp $ -SHA1 (VisualBoyAdvance-src-1.6a.zip) = 81e6763d0a7f9cadfedfb8053fea5f5a9028916a -RMD160 (VisualBoyAdvance-src-1.6a.zip) = 5d47f194b8df5a5f4f84785283ba449277d7188d -Size (VisualBoyAdvance-src-1.6a.zip) = 1206080 bytes -SHA1 (patch-aa) = 75a970fb59926a299830c2823c5094ff56523ee7 +SHA1 (VisualBoyAdvance-src-1.7.2.tar.gz) = 04d82406079563fd17cda07f72488185e9152f51 +RMD160 (VisualBoyAdvance-src-1.7.2.tar.gz) = 44f94a4f270f2cda25879681c52892f6978caf99 +Size (VisualBoyAdvance-src-1.7.2.tar.gz) = 1410762 bytes +SHA1 (patch-aa) = 2871ea4cf2451d489d1afe72af4abb86f1a58ca0 +SHA1 (patch-ab) = 55e1084d1cc48cff28b98a7fa68213d97f1f3d7e +SHA1 (patch-ac) = 33158335dc12f335471d10962b4552082b589d25 diff --git a/emulators/vba/patches/patch-aa b/emulators/vba/patches/patch-aa index 83037172ec7..a1df988ea8f 100644 --- a/emulators/vba/patches/patch-aa +++ b/emulators/vba/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.1.1.1 2003/12/03 23:34:46 xtraeme Exp $ +$NetBSD: patch-aa,v 1.2 2006/04/17 14:50:47 wiz Exp $ --- src/unzip.h.orig Sun Oct 20 06:03:12 2002 +++ src/unzip.h Mon Jun 30 23:45:30 2003 -@@ -67,6 +67,15 @@ +@@ -68,6 +68,15 @@ #include "zlib.h" #endif diff --git a/emulators/vba/patches/patch-ab b/emulators/vba/patches/patch-ab new file mode 100644 index 00000000000..0459bba5bc9 --- /dev/null +++ b/emulators/vba/patches/patch-ab @@ -0,0 +1,15 @@ +$NetBSD: patch-ab,v 1.1 2006/04/17 14:50:47 wiz Exp $ + +--- win32/include/zlib/zutil.h.orig 2004-01-18 00:07:32.000000000 +0100 ++++ win32/include/zlib/zutil.h +@@ -26,6 +26,10 @@ + # include <errno.h> + #endif + ++#ifndef OF ++#define OF(X) X ++#endif ++ + #ifndef local + # define local static + #endif diff --git a/emulators/vba/patches/patch-ac b/emulators/vba/patches/patch-ac new file mode 100644 index 00000000000..b40d1c28bd5 --- /dev/null +++ b/emulators/vba/patches/patch-ac @@ -0,0 +1,271 @@ +$NetBSD: patch-ac,v 1.1 2006/04/17 14:50:47 wiz Exp $ + +--- src/sdl/SDL.cpp.orig 2004-05-21 22:16:58.000000000 +0200 ++++ src/sdl/SDL.cpp +@@ -98,6 +98,7 @@ extern void MotionBlurIB32(u8*,u32,int,i + void Init_Overlay(SDL_Surface *surface, int overlaytype); + void Quit_Overlay(void); + void Draw_Overlay(SDL_Surface *surface, int size); ++SDL_Surface *Set_Video(bool first); + + extern void remoteInit(); + extern void remoteCleanUp(); +@@ -248,8 +249,12 @@ bool screenMessage = false; + char screenMessageBuffer[21]; + u32 screenMessageTime = 0; + ++#if 0 + SDL_cond *cond = NULL; + SDL_mutex *mutex = NULL; ++#else ++SDL_sem *rsem, *wsem; ++#endif + u8 sdlBuffer[4096]; + int sdlSoundLen = 0; + +@@ -886,8 +891,8 @@ FILE *sdlFindFile(const char *name) + char *home = getenv("HOME"); + + if(home != NULL) { +- fprintf(stderr, "Searching home directory: %s\n", home); +- sprintf(path, "%s%c%s", home, FILE_SEP, name); ++ fprintf(stderr, "Searching home directory: %s%c.vba\n", home, FILE_SEP); ++ sprintf(path, "%s%c.vba%c%s", home, FILE_SEP, FILE_SEP, name); + f = fopen(path, "r"); + if(f != NULL) + return f; +@@ -1744,11 +1749,8 @@ void sdlPollEvents() + case SDLK_f: + if(!(event.key.keysym.mod & MOD_NOCTRL) && + (event.key.keysym.mod & KMOD_CTRL)) { +- int flags = 0; + fullscreen = !fullscreen; +- if(fullscreen) +- flags |= SDL_FULLSCREEN; +- SDL_SetVideoMode(destWidth, destHeight, systemColorDepth, flags); ++ Set_Video(false); + // if(SDL_WM_ToggleFullScreen(surface)) + // fullscreen = !fullscreen; + } +@@ -2320,9 +2322,7 @@ int main(int argc, char **argv) + destWidth = (sizeOption+1)*srcWidth; + destHeight = (sizeOption+1)*srcHeight; + +- surface = SDL_SetVideoMode(destWidth, destHeight, 16, +- SDL_ANYFORMAT|SDL_HWSURFACE|SDL_DOUBLEBUF| +- (fullscreen ? SDL_FULLSCREEN : 0)); ++ surface = Set_Video(true); + + if(surface == NULL) { + systemMessage(0, "Failed to set video mode"); +@@ -2916,6 +2916,7 @@ void soundCallback(void *,u8 *stream,int + { + if(!emulating) + return; ++#if 0 + SDL_mutexP(mutex); + // printf("Locked mutex\n"); + if(!speedup && !throttle) { +@@ -2926,19 +2927,27 @@ void soundCallback(void *,u8 *stream,int + break; + } + } ++#else ++ SDL_SemWait(rsem); ++#endif + if(emulating) { + // printf("Copying data\n"); + memcpy(stream, sdlBuffer, len); + } + sdlSoundLen = 0; ++#if 0 + if(mutex) + SDL_mutexV(mutex); ++#else ++ SDL_SemPost(wsem); ++#endif + } + + void systemWriteDataToSoundBuffer() + { + if(SDL_GetAudioStatus() != SDL_AUDIO_PLAYING) + SDL_PauseAudio(0); ++#if 0 + bool cont = true; + while(cont && !speedup && !throttle) { + SDL_mutexP(mutex); +@@ -2976,6 +2985,11 @@ soundBufferLen); + memcpy(&sdlBuffer[sdlSoundLen], soundFinalWave, soundBufferLen); + sdlSoundLen += soundBufferLen; + } ++#else ++ memcpy(sdlBuffer, soundFinalWave, soundBufferLen); ++ SDL_SemPost(rsem); ++ SDL_SemWait(wsem); ++#endif + } + + bool systemSoundInit() +@@ -2998,7 +3012,7 @@ bool systemSoundInit() + } + audio.format=AUDIO_S16SYS; + audio.channels = 2; +- audio.samples = 1024; ++ audio.samples = soundBufferLen/4; + audio.callback = soundCallback; + audio.userdata = NULL; + if(SDL_OpenAudio(&audio, NULL)) { +@@ -3006,8 +3020,13 @@ bool systemSoundInit() + return false; + } + soundBufferTotalLen = soundBufferLen*10; ++#if 0 + cond = SDL_CreateCond(); + mutex = SDL_CreateMutex(); ++#else ++ rsem = SDL_CreateSemaphore(0); ++ wsem = SDL_CreateSemaphore(0); ++#endif + sdlSoundLen = 0; + systemSoundOn = true; + return true; +@@ -3015,6 +3034,7 @@ bool systemSoundInit() + + void systemSoundShutdown() + { ++#if 0 + SDL_mutexP(mutex); + SDL_CondSignal(cond); + SDL_mutexV(mutex); +@@ -3022,7 +3042,15 @@ void systemSoundShutdown() + cond = NULL; + SDL_DestroyMutex(mutex); + mutex = NULL; ++#else ++ SDL_SemPost(rsem); ++#endif + SDL_CloseAudio(); ++#if 0 ++#else ++ SDL_DestroySemaphore(rsem); ++ SDL_DestroySemaphore(wsem); ++#endif + } + + void systemSoundPause() +@@ -3139,9 +3167,15 @@ bool systemPauseOnFrame() + + void Init_Overlay(SDL_Surface *gbascreen, int overlaytype) + { +- +- overlay = SDL_CreateYUVOverlay( GBA_WIDTH, +- GBA_HEIGHT, ++ int width; ++ ++ if (overlaytype == SDL_YUY2_OVERLAY) ++ width = srcWidth *2; ++ else ++ width = srcWidth; ++ ++ overlay = SDL_CreateYUVOverlay( width, ++ srcHeight, + overlaytype, gbascreen); + fprintf(stderr, "Created %dx%dx%d %s %s overlay\n", + overlay->w,overlay->h,overlay->planes, +@@ -3304,19 +3338,15 @@ inline void ConvertRGBtoYUY2(SDL_Overlay + + SDL_LockYUVOverlay(o); + +- for(y=0; y<160 && y<o->h; y++) { ++ for(y=0; y<srcHeight && y<o->h; y++) { + p=(Uint8 *)pix+srcPitch*y; + op=o->pixels[0]+o->pitches[0]*y; +- for(x=0; x<240 && x<o->w; x++) { ++ for(x=0; x<srcWidth && x<o->w; x++) { + RGBtoYUV(p,yuv); +- if(x%2==0) { +- *(op++)=yuv[0]; +- *(op++)=yuv[1]; +- op[1]=yuv[2]; +- } else { +- *op=yuv[0]; +- op+=2; +- } ++ *(op++)=yuv[0]; ++ *(op++)=yuv[1]; ++ *(op++)=yuv[0]; ++ *(op++)=yuv[2]; + + p+=4; //s->format->BytesPerPixel; + } +@@ -3358,11 +3388,6 @@ inline void Draw_Overlay(SDL_Surface *di + + Convert32bit(display); + +- overlay_rect.x = 0; +- overlay_rect.y = 0; +- overlay_rect.w = GBA_WIDTH * size; +- overlay_rect.h = GBA_HEIGHT * size; +- + SDL_DisplayYUVOverlay(overlay, &overlay_rect); + SDL_UnlockYUVOverlay(overlay); + } +@@ -3378,9 +3403,8 @@ void systemGbBorderOn() + destWidth = (sizeOption+1)*srcWidth; + destHeight = (sizeOption+1)*srcHeight; + +- surface = SDL_SetVideoMode(destWidth, destHeight, 16, +- SDL_ANYFORMAT|SDL_HWSURFACE|SDL_DOUBLEBUF| +- (fullscreen ? SDL_FULLSCREEN : 0)); ++ surface = Set_Video(true); ++ + #ifndef C_CORE + sdlMakeStretcher(srcWidth); + #else +@@ -3440,3 +3464,46 @@ void systemGbBorderOn() + srcPitch = srcWidth*3; + } + } ++ ++SDL_Surface * ++Set_Video(bool first) ++{ ++ int flags; ++ ++ flags = SDL_HWSURFACE|SDL_DOUBLEBUF; ++ if (first) { ++ flags |= SDL_ANYFORMAT; ++ systemColorDepth = 16; ++ } ++ ++ if(fullscreen) ++ flags |= SDL_FULLSCREEN; ++ ++ destWidth = srcWidth*(sizeOption+1); ++ destHeight = srcHeight*(sizeOption+1); ++ ++ if (yuv) { ++ double mul, mul2; ++ ++ if (fullscreen) { ++ SDL_Rect **mode; ++ if ((mode=SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_HWSURFACE)) ++ != NULL) { ++ destWidth = mode[0]->w; ++ destHeight = mode[0]->h; ++ } ++ } ++ ++ mul = (double)destWidth/srcWidth; ++ mul2 = (double)destHeight/srcHeight; ++ if (mul2 < mul) ++ mul = mul2; ++ ++ overlay_rect.w = (Uint16)(srcWidth*mul); ++ overlay_rect.h = (Uint16)(srcHeight*mul); ++ overlay_rect.x = (destWidth-overlay_rect.w)/2; ++ overlay_rect.y = (destHeight-overlay_rect.h)/2; ++ } ++ ++ return SDL_SetVideoMode(destWidth, destHeight, systemColorDepth, flags); ++} |