mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-13 22:35:10 +01:00
sound rendering test, updated DOS/Win32 ports
This commit is contained in:
parent
831c9642d3
commit
fefc260ec4
@ -196,6 +196,8 @@ int main (int argc, char *argv[])
|
|||||||
/* Emulation Loop */
|
/* Emulation Loop */
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
ogc_audio__start();
|
||||||
|
|
||||||
/* Frame synchronization */
|
/* Frame synchronization */
|
||||||
if (gc_pal != vdp_pal)
|
if (gc_pal != vdp_pal)
|
||||||
{
|
{
|
||||||
@ -242,8 +244,8 @@ int main (int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* update video & audio */
|
/* update video & audio */
|
||||||
ogc_video__update();
|
|
||||||
ogc_audio__update();
|
ogc_audio__update();
|
||||||
|
ogc_video__update();
|
||||||
|
|
||||||
/* Check rendered frames (FPS) */
|
/* Check rendered frames (FPS) */
|
||||||
FrameCount++;
|
FrameCount++;
|
||||||
|
@ -51,11 +51,14 @@ void ogc_audio__init(void)
|
|||||||
{
|
{
|
||||||
AUDIO_Init (NULL);
|
AUDIO_Init (NULL);
|
||||||
AUDIO_SetDSPSampleRate (AI_SAMPLERATE_48KHZ);
|
AUDIO_SetDSPSampleRate (AI_SAMPLERATE_48KHZ);
|
||||||
AUDIO_RegisterDMACallback (AudioSwitchBuffers);
|
// AUDIO_RegisterDMACallback (AudioSwitchBuffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ogc_audio__reset(void)
|
void ogc_audio__reset(void)
|
||||||
{
|
{
|
||||||
|
IsPlaying = 0;
|
||||||
|
mixbuffer = 0;
|
||||||
|
playbuffer = 0;
|
||||||
memset(soundbuffer, 0, 16 * 3840);
|
memset(soundbuffer, 0, 16 * 3840);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,12 +66,27 @@ void ogc_audio__update(void)
|
|||||||
{
|
{
|
||||||
/* flush data from CPU cache */
|
/* flush data from CPU cache */
|
||||||
DCFlushRange(soundbuffer[mixbuffer], dma_len);
|
DCFlushRange(soundbuffer[mixbuffer], dma_len);
|
||||||
|
AUDIO_InitDMA((u32) soundbuffer[mixbuffer], dma_len);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ogc_audio__stop(void)
|
||||||
|
{
|
||||||
|
/* stop audio DMA */
|
||||||
|
AUDIO_StopDMA ();
|
||||||
|
AUDIO_InitDMA((u32) soundbuffer[0], dma_len);
|
||||||
|
IsPlaying = 0;
|
||||||
|
mixbuffer = 0;
|
||||||
|
playbuffer = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ogc_audio__start(void)
|
||||||
|
{
|
||||||
if (!IsPlaying)
|
if (!IsPlaying)
|
||||||
{
|
{
|
||||||
dma_len = (vdp_pal) ? 3840 : 3200;
|
/* buffer size */
|
||||||
|
dma_len = vdp_pal ? 3840 : 3200;
|
||||||
|
|
||||||
/* set audio DMA parameters */
|
/* set default DMA parameters */
|
||||||
AUDIO_InitDMA((u32) soundbuffer[0], dma_len);
|
AUDIO_InitDMA((u32) soundbuffer[0], dma_len);
|
||||||
|
|
||||||
/* start audio DMA */
|
/* start audio DMA */
|
||||||
@ -77,13 +95,3 @@ void ogc_audio__update(void)
|
|||||||
IsPlaying = 1;
|
IsPlaying = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ogc_audio__stop(void)
|
|
||||||
{
|
|
||||||
/* stop audio DMA */
|
|
||||||
AUDIO_StopDMA ();
|
|
||||||
IsPlaying = 0;
|
|
||||||
mixbuffer = 0;
|
|
||||||
playbuffer = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ extern int mixbuffer;
|
|||||||
extern void ogc_audio__init(void);
|
extern void ogc_audio__init(void);
|
||||||
extern void ogc_audio__reset(void);
|
extern void ogc_audio__reset(void);
|
||||||
extern void ogc_audio__stop(void);
|
extern void ogc_audio__stop(void);
|
||||||
|
extern void ogc_audio__start(void);
|
||||||
extern void ogc_audio__update(void);
|
extern void ogc_audio__update(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -396,9 +396,4 @@ static inline void audio_update (void)
|
|||||||
*sb++ = l;
|
*sb++ = l;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef DOS
|
|
||||||
mixbuffer++;
|
|
||||||
mixbuffer &= 0xf;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,28 @@
|
|||||||
Genesis Plus History
|
Genesis Plus History
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
Note: All recent changes directly come from the Gamecube/Wii port, coded by Eke-Eke.
|
Note: All recent changes directly come from the GX (Gamecube/Wii) port, code by Eke-Eke.
|
||||||
|
|
||||||
|
|
||||||
|
[14/12/08] (Eke-Eke) version 1.3.0
|
||||||
|
-------------------
|
||||||
|
- YM2612 bugfixes (MAME core):
|
||||||
|
.fixed EG Decay->Substain transition when SL & DR are minimals: fix tracks #3 and #9 in "Mega Turrican"
|
||||||
|
.fixed a bug in SSG-EG emulation code: fix Level 1 music in "Alisia Dragoon"
|
||||||
|
.modified SSG-EG Decay End Level: fix some sound effects (ChainSaw, Zap...) in "Beavis & Butthead"
|
||||||
|
.improved Detune overflow accuracy: fix very high frequency sounds in many games
|
||||||
|
.fixed registers 0x20-0x26 Reset state: fix intro music in "B.O.B"
|
||||||
|
.reverted incorrect fix with KEY ON: fix "Flamethrower" sound effect in "Alien 3" and many others
|
||||||
|
- adjusted HCounter values: fixes line flickering in "Sonic 3D" bonus stage
|
||||||
|
- adjusted VINT timing: fixes hang-up in "V.R Troopers"
|
||||||
|
- improved HBLANK flag accuracy: fixes line flickering in "Gouketsuji Ichizoku"
|
||||||
|
- fixed broken Z80 access to WRAM: fixes hang-up in "Mamono Hunter Youko"
|
||||||
|
- modified JCART emulation: fixes corrupted tracks logo in "Micro Machines 2"
|
||||||
|
- added Blargg's NTSC Filters support (NTSC video artifacts emulation)
|
||||||
|
- optimized VDP rendering core, rewrote 68k interface (memory handlers, cycle execution, interrupts): greatly improved emulation speed
|
||||||
|
|
||||||
[08/26/08] (Eke-Eke)
|
[08/26/08] (Eke-Eke)
|
||||||
|
-------------------
|
||||||
- YM2612(MAME): fixed LFO phase update for CH3 special mode: fix sound effects in Warlock & Aladdin (thanks to AamirM)
|
- YM2612(MAME): fixed LFO phase update for CH3 special mode: fix sound effects in Warlock & Aladdin (thanks to AamirM)
|
||||||
- YM2612(MAME): fixed EG attenuation level on "KEY ON": fix Ecco 2's splash sound
|
- YM2612(MAME): fixed EG attenuation level on "KEY ON": fix Ecco 2's splash sound
|
||||||
- YM2612(MAME): fixed SSG-EG emulation: fix Bubba'n Stix (Track 5) and many others
|
- YM2612(MAME): fixed SSG-EG emulation: fix Bubba'n Stix (Track 5) and many others
|
||||||
@ -19,6 +38,7 @@ Note: All recent changes directly come from the Gamecube/Wii port, coded by Eke-
|
|||||||
- added Sega Mouse emulation (Populous 2, Body Count, Shangai 2, Fun'n Games, ...)
|
- added Sega Mouse emulation (Populous 2, Body Count, Shangai 2, Fun'n Games, ...)
|
||||||
|
|
||||||
[07/16/08] (Eke-Eke)
|
[07/16/08] (Eke-Eke)
|
||||||
|
-------------------
|
||||||
- adjusted (again) HINT timings: fix Double Dragon 2 (game freezed), hopefully does not break anything else
|
- adjusted (again) HINT timings: fix Double Dragon 2 (game freezed), hopefully does not break anything else
|
||||||
- fixed broken EEPROM support for Codemaster games
|
- fixed broken EEPROM support for Codemaster games
|
||||||
- modified input update timings: fix Dungeons & Dragons - Warriors of the Eternal Sun (thanks to Notaz)
|
- modified input update timings: fix Dungeons & Dragons - Warriors of the Eternal Sun (thanks to Notaz)
|
||||||
@ -33,22 +53,26 @@ Note: All recent changes directly come from the Gamecube/Wii port, coded by Eke-
|
|||||||
.implemented sample interpolation in MAME core to emulate the chip at original frequency (HQ YM2612 mode, from gens)
|
.implemented sample interpolation in MAME core to emulate the chip at original frequency (HQ YM2612 mode, from gens)
|
||||||
|
|
||||||
[06/01/08] (Eke-Eke)
|
[06/01/08] (Eke-Eke)
|
||||||
|
-------------------
|
||||||
- improved HCounter accuracy: fix graphic glitches in "Striker (Europe)"
|
- improved HCounter accuracy: fix graphic glitches in "Striker (Europe)"
|
||||||
- improved HINT timing accuracy: fix flickering in "Zero The Kamikaze Squirrel (USA)"
|
- improved HINT timing accuracy: fix flickering in "Zero The Kamikaze Squirrel (USA)"
|
||||||
- improved rendering accuracy when backdrop color is modified during HBLANK (Road Rash I/II/III)
|
- improved rendering accuracy when backdrop color is modified during HBLANK (Road Rash I/II/III)
|
||||||
- fixed broken Game Genie support
|
- fixed broken Game Genie support
|
||||||
|
|
||||||
[04/19/08] (Eke-Eke)
|
[04/19/08] (Eke-Eke)
|
||||||
|
-------------------
|
||||||
- modified VINT timings a little bit: fix lockup during Desert Strike's intro
|
- modified VINT timings a little bit: fix lockup during Desert Strike's intro
|
||||||
- corrected 68k interrupts handling: fix graphic glitches in Darius II/Sagaia
|
- corrected 68k interrupts handling: fix graphic glitches in Darius II/Sagaia
|
||||||
|
|
||||||
[04/06/08] (Eke-Eke)
|
[04/06/08] (Eke-Eke)
|
||||||
|
-------------------
|
||||||
- updated SVP core: fix some perspective issues in Virtua Racing (thanks to Notaz)
|
- updated SVP core: fix some perspective issues in Virtua Racing (thanks to Notaz)
|
||||||
- added internal SAT update during VRAM Fill: fix unmasked sprites during Battletech's intro
|
- added internal SAT update during VRAM Fill: fix unmasked sprites during Battletech's intro
|
||||||
- fixed m68k core issues with gcc 4.2.3: fix Xperts, Lemmings 2, M1 Abrams Battle Tank
|
- fixed m68k core issues with gcc 4.2.3: fix Xperts, Lemmings 2, M1 Abrams Battle Tank
|
||||||
- forced YM2612 Enveloppe update: fix intro music in Batman&Robin (thanks to Aamir)
|
- forced YM2612 Enveloppe update: fix intro music in Batman&Robin (thanks to Aamir)
|
||||||
|
|
||||||
[03/01/08] (Eke-Eke)
|
[03/01/08] (Eke-Eke)
|
||||||
|
-------------------
|
||||||
- added SVP emulation: Virtua Racing is now emulated (big thanks to Notaz and TascoDeluxe)
|
- added SVP emulation: Virtua Racing is now emulated (big thanks to Notaz and TascoDeluxe)
|
||||||
- fixed VDP registers behaviour when VDP Mode 4 is enabled: fix Bass Masters Classic Pro, Captain Planet & The Planeeters
|
- fixed VDP registers behaviour when VDP Mode 4 is enabled: fix Bass Masters Classic Pro, Captain Planet & The Planeeters
|
||||||
- corrected a bug in DMA Fill operation: fix James Pond 3, Rockman World/Megaman Willy Wars (corrupted VRAM)
|
- corrected a bug in DMA Fill operation: fix James Pond 3, Rockman World/Megaman Willy Wars (corrupted VRAM)
|
||||||
@ -59,6 +83,7 @@ Note: All recent changes directly come from the Gamecube/Wii port, coded by Eke-
|
|||||||
- reduced Savestate size
|
- reduced Savestate size
|
||||||
|
|
||||||
[01/07/08] (Eke-Eke)
|
[01/07/08] (Eke-Eke)
|
||||||
|
-------------------
|
||||||
- fixed interleaved rom detection: roms with .smd extension should now work fine
|
- fixed interleaved rom detection: roms with .smd extension should now work fine
|
||||||
- fixed a recently introduced bug in VDP registers writes: fixes bad colors in Toy Story (intro)
|
- fixed a recently introduced bug in VDP registers writes: fixes bad colors in Toy Story (intro)
|
||||||
- updated list of games using EEPROM: added Sports Talk Baseball (internal memory check fixed) and Brian Lara Cricket
|
- updated list of games using EEPROM: added Sports Talk Baseball (internal memory check fixed) and Brian Lara Cricket
|
||||||
@ -69,6 +94,7 @@ Note: All recent changes directly come from the Gamecube/Wii port, coded by Eke-
|
|||||||
- added support for custom ROM/RAM mapping used by Game no Kanzume Otokuyou
|
- added support for custom ROM/RAM mapping used by Game no Kanzume Otokuyou
|
||||||
|
|
||||||
[12/28/07] (Eke-Eke)
|
[12/28/07] (Eke-Eke)
|
||||||
|
-------------------
|
||||||
- many sourcecode cleanup and optimization
|
- many sourcecode cleanup and optimization
|
||||||
- completely rewrote EEPROM emulation: now support all known EEPROM types (24C01-24C65) and mappers (Sega, Acclaim, EA, Codemasters)
|
- completely rewrote EEPROM emulation: now support all known EEPROM types (24C01-24C65) and mappers (Sega, Acclaim, EA, Codemasters)
|
||||||
used in a few games (now use internal game database) as external RAM. This should at least fix save support in the following games:
|
used in a few games (now use internal game database) as external RAM. This should at least fix save support in the following games:
|
||||||
@ -99,6 +125,7 @@ used in a few games (now use internal game database) as external RAM. This shoul
|
|||||||
- added full overscan emulation (vertical & horizontal borders) for "pixel perfect" aspect ratio (tested against a real genesis)
|
- added full overscan emulation (vertical & horizontal borders) for "pixel perfect" aspect ratio (tested against a real genesis)
|
||||||
|
|
||||||
[07/20/07] (Eke-Eke)
|
[07/20/07] (Eke-Eke)
|
||||||
|
-------------------
|
||||||
- corrected TeamPlayer support: fix multiplayer in Gauntlet 4 (Sept. version), Pengo and a lot of others
|
- corrected TeamPlayer support: fix multiplayer in Gauntlet 4 (Sept. version), Pengo and a lot of others
|
||||||
- added J-Cart support: enable multiplayer in Codemasters games (Pete Sampras, Micromachines games, Super Skidmarks)
|
- added J-Cart support: enable multiplayer in Codemasters games (Pete Sampras, Micromachines games, Super Skidmarks)
|
||||||
- added serial EEPROM autodetection: fix games with bad SRAM informations in header (NBA Jam TE)
|
- added serial EEPROM autodetection: fix games with bad SRAM informations in header (NBA Jam TE)
|
||||||
@ -109,10 +136,12 @@ used in a few games (now use internal game database) as external RAM. This shoul
|
|||||||
in some games to enable special features or even complete the game (ex: X-Men).
|
in some games to enable special features or even complete the game (ex: X-Men).
|
||||||
|
|
||||||
[06/21/07] (Eke-Eke)
|
[06/21/07] (Eke-Eke)
|
||||||
|
-------------------
|
||||||
- added Multitap support (EA 4-Way Play and Sega Teamplayer): allowed up to four players in games supporting those peripherals
|
- added Multitap support (EA 4-Way Play and Sega Teamplayer): allowed up to four players in games supporting those peripherals
|
||||||
- added partial Sega Menacer lightgun support (use Analog Stick): automatically set when detecting the 6-in-1 Menacer game
|
- added partial Sega Menacer lightgun support (use Analog Stick): automatically set when detecting the 6-in-1 Menacer game
|
||||||
|
|
||||||
[05/18/07] (Eke-Eke)
|
[05/18/07] (Eke-Eke)
|
||||||
|
-------------------
|
||||||
- you can now switch between FM cores without reseting the game. FM registers value are automatically restored when switching.
|
- you can now switch between FM cores without reseting the game. FM registers value are automatically restored when switching.
|
||||||
- removed the previous VINT timings modification because it brokes some games (Rocket Knight, Thunderforce III,...)
|
- removed the previous VINT timings modification because it brokes some games (Rocket Knight, Thunderforce III,...)
|
||||||
- added automatic Timing configuration (VDP latency, VINT timing & alternate Line Timing) at game loading, based upon specific romname detection.
|
- added automatic Timing configuration (VDP latency, VINT timing & alternate Line Timing) at game loading, based upon specific romname detection.
|
||||||
@ -124,6 +153,7 @@ For information, games that are actually detected and need special timings to ru
|
|||||||
.Chaos Engine/Soldiers of Fortune (graphic glitches on scrolling)
|
.Chaos Engine/Soldiers of Fortune (graphic glitches on scrolling)
|
||||||
|
|
||||||
[05/08/07] (Eke-Eke)
|
[05/08/07] (Eke-Eke)
|
||||||
|
-------------------
|
||||||
- VINT timings are now a little more accurate: fixes Sesame's Street Counting Cafe
|
- VINT timings are now a little more accurate: fixes Sesame's Street Counting Cafe
|
||||||
- SN76496 MAX_OUTPUT back to normal
|
- SN76496 MAX_OUTPUT back to normal
|
||||||
- modified FB_WNOISE value in SN76496 core according to John Kortink's last informations
|
- modified FB_WNOISE value in SN76496 core according to John Kortink's last informations
|
||||||
@ -135,13 +165,16 @@ For information, games that are actually detected and need special timings to ru
|
|||||||
- added some other configurable sound options (boost overall volume, FM improvment for Gens YM2612)
|
- added some other configurable sound options (boost overall volume, FM improvment for Gens YM2612)
|
||||||
|
|
||||||
[04/11/07] (Eke-Eke)
|
[04/11/07] (Eke-Eke)
|
||||||
|
-------------------
|
||||||
- corrected MAX_OUTPUT value in SN76496 core: fix PSG sound (SFX) volume
|
- corrected MAX_OUTPUT value in SN76496 core: fix PSG sound (SFX) volume
|
||||||
|
|
||||||
[03/17/07] (Eke-Eke)
|
[03/17/07] (Eke-Eke)
|
||||||
|
-------------------
|
||||||
- added an option to enable alternate line rendering timing (fix single line error in Road Rash series and Legend of Galahad's Intro)
|
- added an option to enable alternate line rendering timing (fix single line error in Road Rash series and Legend of Galahad's Intro)
|
||||||
- Color RAM update now always reset color 0 to border color (fix color glitches in Mortal Kombat,...) (thanks to Noop's for the idea)
|
- Color RAM update now always reset color 0 to border color (fix color glitches in Mortal Kombat,...) (thanks to Noop's for the idea)
|
||||||
|
|
||||||
[03/09/07] (Eke-Eke)
|
[03/09/07] (Eke-Eke)
|
||||||
|
-------------------
|
||||||
- modified HV counter tables (fix graphic glitches in Skitchin's sky, Lotus 2 Recs, Panorama Cotton, Dashin Desperados & maybe more)
|
- modified HV counter tables (fix graphic glitches in Skitchin's sky, Lotus 2 Recs, Panorama Cotton, Dashin Desperados & maybe more)
|
||||||
- completely rewrote DMA timings emulation so that it works for all games (no more cpu freezing)
|
- completely rewrote DMA timings emulation so that it works for all games (no more cpu freezing)
|
||||||
- added all DMA tranfer rates handling for each three DMA modes and added dma busy flag emulation
|
- added all DMA tranfer rates handling for each three DMA modes and added dma busy flag emulation
|
||||||
@ -154,6 +187,7 @@ For information, games that are actually detected and need special timings to ru
|
|||||||
- modified sound mixing a bit according to Generator sourcecode (FM and PSG ratios seems more correct)
|
- modified sound mixing a bit according to Generator sourcecode (FM and PSG ratios seems more correct)
|
||||||
|
|
||||||
[02/07/07] (Eke-Eke)
|
[02/07/07] (Eke-Eke)
|
||||||
|
-------------------
|
||||||
- fixed fm timers (fix missing music in Castle of Illusion, Quackshot, Undead Line, Wonderboy in Monster Lair, Cal 50, Turbo Outrun, Thundeforce 4 and maybe more)
|
- fixed fm timers (fix missing music in Castle of Illusion, Quackshot, Undead Line, Wonderboy in Monster Lair, Cal 50, Turbo Outrun, Thundeforce 4 and maybe more)
|
||||||
- added complete EEPROM emulation (save support now works fine in Wonderboy5, Megaman Willy Wars, NBA Jam...) (credits to Notaz, adapted from Picodrive code)
|
- added complete EEPROM emulation (save support now works fine in Wonderboy5, Megaman Willy Wars, NBA Jam...) (credits to Notaz, adapted from Picodrive code)
|
||||||
- added preliminar dma timing emulation (fix bottom screen in Legend of Galahad) (credits to Notaz, adapted from Picodrive code)
|
- added preliminar dma timing emulation (fix bottom screen in Legend of Galahad) (credits to Notaz, adapted from Picodrive code)
|
||||||
@ -165,12 +199,15 @@ For information, games that are actually detected and need special timings to ru
|
|||||||
- modified dma fill operation for big endian platform (fix Contra Hardcorps gfx garbage)
|
- modified dma fill operation for big endian platform (fix Contra Hardcorps gfx garbage)
|
||||||
|
|
||||||
[05/25/03]
|
[05/25/03]
|
||||||
|
-------------------
|
||||||
- Fixed a typo that made Z80 banked access to the VDP registers always fail.
|
- Fixed a typo that made Z80 banked access to the VDP registers always fail.
|
||||||
|
|
||||||
[05/17/03]
|
[05/17/03]
|
||||||
|
-------------------
|
||||||
- Modified the rendering code to handle unaligned longword access to memory.
|
- Modified the rendering code to handle unaligned longword access to memory.
|
||||||
|
|
||||||
[04/20/03]
|
[04/20/03]
|
||||||
|
-------------------
|
||||||
- Modified 68000 emulator to prevent 'tas.b $mem' from writing data back
|
- Modified 68000 emulator to prevent 'tas.b $mem' from writing data back
|
||||||
after a read (fixes Gargoyles).
|
after a read (fixes Gargoyles).
|
||||||
- Fixed bug in 68000 emulator to swap order of words written for address
|
- Fixed bug in 68000 emulator to swap order of words written for address
|
||||||
@ -181,6 +218,7 @@ For information, games that are actually detected and need special timings to ru
|
|||||||
- Optimized sprite rendering inner loop.
|
- Optimized sprite rendering inner loop.
|
||||||
|
|
||||||
[04/13/03]
|
[04/13/03]
|
||||||
|
-------------------
|
||||||
- Finished up memory map for VDP DMA V-bus reads.
|
- Finished up memory map for VDP DMA V-bus reads.
|
||||||
- Fixed handling of 68000 writes to I/O chip at even addresses.
|
- Fixed handling of 68000 writes to I/O chip at even addresses.
|
||||||
- Fixed bit 7 handling of control register in I/O chip.
|
- Fixed bit 7 handling of control register in I/O chip.
|
||||||
@ -189,5 +227,6 @@ For information, games that are actually detected and need special timings to ru
|
|||||||
- Removed some faulty code from the 68000 memory map handlers.
|
- Removed some faulty code from the 68000 memory map handlers.
|
||||||
|
|
||||||
[03/22/03]
|
[03/22/03]
|
||||||
|
-------------------
|
||||||
- Completed implementation of Z80 banked memory handlers.
|
- Completed implementation of Z80 banked memory handlers.
|
||||||
|
|
||||||
|
@ -34,7 +34,6 @@ OBJ += obj/genesis.o \
|
|||||||
obj/mem68k.o \
|
obj/mem68k.o \
|
||||||
obj/memz80.o \
|
obj/memz80.o \
|
||||||
obj/membnk.o \
|
obj/membnk.o \
|
||||||
obj/memvdp.o \
|
|
||||||
obj/state.o
|
obj/state.o
|
||||||
|
|
||||||
OBJ += obj/sound.o \
|
OBJ += obj/sound.o \
|
||||||
|
@ -242,15 +242,16 @@ void playstreamedsample(int channel,signed char *data,int len,int freq,int volum
|
|||||||
{
|
{
|
||||||
free(lpWave[channel]);
|
free(lpWave[channel]);
|
||||||
lpWave[channel] = 0;
|
lpWave[channel] = 0;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(lpWave[channel]->lpData,0,3*len);
|
memset(lpWave[channel]->lpData,0,3*len);
|
||||||
memcpy(lpWave[channel]->lpData,data,len);
|
memcpy(lpWave[channel]->lpData,data,len);
|
||||||
|
|
||||||
/* upload the data to the audio DRAM local memory */
|
/* upload the data to the audio DRAM local memory */
|
||||||
AWriteAudioData(lpWave[channel],0,3*len);
|
AWriteAudioData(lpWave[channel],0,3*len);
|
||||||
APrimeVoice(hVoice[channel],lpWave[channel]);
|
APrimeVoice(hVoice[channel],lpWave[channel]);
|
||||||
|
|
||||||
/* need to cast to double because freq*nominal_sample_rate can exceed the size of an int */
|
/* need to cast to double because freq*nominal_sample_rate can exceed the size of an int */
|
||||||
ASetVoiceFrequency(hVoice[channel],(double)freq*nominal_sample_rate/seal_sample_rate);
|
ASetVoiceFrequency(hVoice[channel],(double)freq*nominal_sample_rate/seal_sample_rate);
|
||||||
AStartVoice(hVoice[channel]);
|
AStartVoice(hVoice[channel]);
|
||||||
@ -276,7 +277,6 @@ void playstreamedsample(int channel,signed char *data,int len,int freq,int volum
|
|||||||
if (c[channel] == 3) c[channel] = 0;
|
if (c[channel] == 3) c[channel] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ASetVoiceVolume(hVoice[channel],volume * 64 / 100);
|
ASetVoiceVolume(hVoice[channel],volume * 64 / 100);
|
||||||
ASetVoicePanning(hVoice[channel],(pan + 100) * 255 / 200);
|
ASetVoicePanning(hVoice[channel],(pan + 100) * 255 / 200);
|
||||||
}
|
}
|
||||||
|
@ -120,6 +120,7 @@ int main (int argc, char *argv[])
|
|||||||
/* emulation loop */
|
/* emulation loop */
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
|
dos_update_input();
|
||||||
frame_count += 1;
|
frame_count += 1;
|
||||||
if(quit) break;
|
if(quit) break;
|
||||||
if(frame_count % frame_skip == 0)
|
if(frame_count % frame_skip == 0)
|
||||||
@ -130,7 +131,7 @@ int main (int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
system_frame(1);
|
system_frame(1,reset_line);
|
||||||
}
|
}
|
||||||
if(option.sound) dos_update_audio();
|
if(option.sound) dos_update_audio();
|
||||||
}
|
}
|
||||||
@ -200,7 +201,6 @@ void dos_update_input(void)
|
|||||||
|
|
||||||
if(check_key(KEY_F11))
|
if(check_key(KEY_F11))
|
||||||
{
|
{
|
||||||
|
|
||||||
joynum ++;
|
joynum ++;
|
||||||
if (joynum > MAX_DEVICES - 1) joynum = 0;
|
if (joynum > MAX_DEVICES - 1) joynum = 0;
|
||||||
|
|
||||||
@ -332,7 +332,6 @@ void dos_update_input(void)
|
|||||||
if (pico_current > 6) pico_current = 0;
|
if (pico_current > 6) pico_current = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(check_key(KEY_F1)) frame_skip = 1;
|
if(check_key(KEY_F1)) frame_skip = 1;
|
||||||
if(check_key(KEY_F2)) frame_skip = 2;
|
if(check_key(KEY_F2)) frame_skip = 2;
|
||||||
if(check_key(KEY_F3)) frame_skip = 3;
|
if(check_key(KEY_F3)) frame_skip = 3;
|
||||||
@ -484,7 +483,7 @@ void dos_update_video(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
msg_print(2, 2, "offset = 0x%x", hc_latch/*frame_rate*/);
|
msg_print(2, 2, "%d", frame_rate);
|
||||||
|
|
||||||
if(option.scanlines)
|
if(option.scanlines)
|
||||||
{
|
{
|
||||||
@ -497,7 +496,6 @@ void dos_update_video(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
stretch_blit(gen_bmp, screen, 0, 0, width, height, (SCREEN_W-352)/2, (SCREEN_H-240)/2, 352,240 << (interlaced ? 1:0));
|
stretch_blit(gen_bmp, screen, 0, 0, width, height, (SCREEN_W-352)/2, (SCREEN_H-240)/2, 352,240 << (interlaced ? 1:0));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -522,7 +520,7 @@ void init_machine(void)
|
|||||||
install_int_ex(tick_handler, BPS_TO_TIMER(FRAMES_PER_SECOND));
|
install_int_ex(tick_handler, BPS_TO_TIMER(FRAMES_PER_SECOND));
|
||||||
|
|
||||||
set_color_depth(option.video_depth);
|
set_color_depth(option.video_depth);
|
||||||
gen_bmp = create_bitmap(360, 576);
|
gen_bmp = create_bitmap(720, 576);
|
||||||
clear(gen_bmp);
|
clear(gen_bmp);
|
||||||
|
|
||||||
memset(&bitmap, 0, sizeof(bitmap));
|
memset(&bitmap, 0, sizeof(bitmap));
|
||||||
|
@ -17,7 +17,6 @@ void make_vdp_palette(void);
|
|||||||
void dos_change_mode(void);
|
void dos_change_mode(void);
|
||||||
int check_key(int code);
|
int check_key(int code);
|
||||||
|
|
||||||
#define update_input() dos_update_input()
|
|
||||||
#define MAX_INPUTS 8
|
#define MAX_INPUTS 8
|
||||||
|
|
||||||
extern uint8 debug_on;
|
extern uint8 debug_on;
|
||||||
|
1294
source/unused/dos/unzip.c
Normal file
1294
source/unused/dos/unzip.c
Normal file
File diff suppressed because it is too large
Load Diff
273
source/unused/dos/unzip.h
Normal file
273
source/unused/dos/unzip.h
Normal file
@ -0,0 +1,273 @@
|
|||||||
|
/* unzip.h -- IO for uncompress .zip files using zlib
|
||||||
|
Version 0.15 beta, Mar 19th, 1998,
|
||||||
|
|
||||||
|
Copyright (C) 1998 Gilles Vollant
|
||||||
|
|
||||||
|
This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g
|
||||||
|
WinZip, InfoZip tools and compatible.
|
||||||
|
Encryption and multi volume ZipFile (span) are not supported.
|
||||||
|
Old compressions used by old PKZip 1.x are not supported
|
||||||
|
|
||||||
|
THIS IS AN ALPHA VERSION. AT THIS STAGE OF DEVELOPPEMENT, SOMES API OR STRUCTURE
|
||||||
|
CAN CHANGE IN FUTURE VERSION !!
|
||||||
|
I WAIT FEEDBACK at mail info@winimage.com
|
||||||
|
Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution
|
||||||
|
|
||||||
|
Condition of use and distribution are the same than zlib :
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied
|
||||||
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
arising from the use of this software.
|
||||||
|
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it
|
||||||
|
freely, subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not
|
||||||
|
claim that you wrote the original software. If you use this software
|
||||||
|
in a product, an acknowledgment in the product documentation would be
|
||||||
|
appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* for more info about .ZIP format, see
|
||||||
|
ftp://ftp.cdrom.com/pub/infozip/doc/appnote-970311-iz.zip
|
||||||
|
PkWare has also a specification at :
|
||||||
|
ftp://ftp.pkware.com/probdesc.zip */
|
||||||
|
|
||||||
|
#ifndef _unz_H
|
||||||
|
#define _unz_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _ZLIB_H
|
||||||
|
#include "zlib.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
|
||||||
|
/* like the STRICT of WIN32, we define a pointer that cannot be converted
|
||||||
|
from (void*) without cast */
|
||||||
|
typedef struct TagunzFile__ { int unused; } unzFile__;
|
||||||
|
typedef unzFile__ *unzFile;
|
||||||
|
#else
|
||||||
|
typedef voidp unzFile;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#define UNZ_OK (0)
|
||||||
|
#define UNZ_END_OF_LIST_OF_FILE (-100)
|
||||||
|
#define UNZ_ERRNO (Z_ERRNO)
|
||||||
|
#define UNZ_EOF (0)
|
||||||
|
#define UNZ_PARAMERROR (-102)
|
||||||
|
#define UNZ_BADZIPFILE (-103)
|
||||||
|
#define UNZ_INTERNALERROR (-104)
|
||||||
|
#define UNZ_CRCERROR (-105)
|
||||||
|
|
||||||
|
/* tm_unz contain date/time info */
|
||||||
|
typedef struct tm_unz_s
|
||||||
|
{
|
||||||
|
uInt tm_sec; /* seconds after the minute - [0,59] */
|
||||||
|
uInt tm_min; /* minutes after the hour - [0,59] */
|
||||||
|
uInt tm_hour; /* hours since midnight - [0,23] */
|
||||||
|
uInt tm_mday; /* day of the month - [1,31] */
|
||||||
|
uInt tm_mon; /* months since January - [0,11] */
|
||||||
|
uInt tm_year; /* years - [1980..2044] */
|
||||||
|
} tm_unz;
|
||||||
|
|
||||||
|
/* unz_global_info structure contain global data about the ZIPfile
|
||||||
|
These data comes from the end of central dir */
|
||||||
|
typedef struct unz_global_info_s
|
||||||
|
{
|
||||||
|
uLong number_entry; /* total number of entries in
|
||||||
|
the central dir on this disk */
|
||||||
|
uLong size_comment; /* size of the global comment of the zipfile */
|
||||||
|
} unz_global_info;
|
||||||
|
|
||||||
|
|
||||||
|
/* unz_file_info contain information about a file in the zipfile */
|
||||||
|
typedef struct unz_file_info_s
|
||||||
|
{
|
||||||
|
uLong version; /* version made by 2 bytes */
|
||||||
|
uLong version_needed; /* version needed to extract 2 bytes */
|
||||||
|
uLong flag; /* general purpose bit flag 2 bytes */
|
||||||
|
uLong compression_method; /* compression method 2 bytes */
|
||||||
|
uLong dosDate; /* last mod file date in Dos fmt 4 bytes */
|
||||||
|
uLong crc; /* crc-32 4 bytes */
|
||||||
|
uLong compressed_size; /* compressed size 4 bytes */
|
||||||
|
uLong uncompressed_size; /* uncompressed size 4 bytes */
|
||||||
|
uLong size_filename; /* filename length 2 bytes */
|
||||||
|
uLong size_file_extra; /* extra field length 2 bytes */
|
||||||
|
uLong size_file_comment; /* file comment length 2 bytes */
|
||||||
|
|
||||||
|
uLong disk_num_start; /* disk number start 2 bytes */
|
||||||
|
uLong internal_fa; /* internal file attributes 2 bytes */
|
||||||
|
uLong external_fa; /* external file attributes 4 bytes */
|
||||||
|
|
||||||
|
tm_unz tmu_date;
|
||||||
|
} unz_file_info;
|
||||||
|
|
||||||
|
extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
|
||||||
|
const char* fileName2,
|
||||||
|
int iCaseSensitivity));
|
||||||
|
/*
|
||||||
|
Compare two filename (fileName1,fileName2).
|
||||||
|
If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
|
||||||
|
If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
|
||||||
|
or strcasecmp)
|
||||||
|
If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
|
||||||
|
(like 1 on Unix, 2 on Windows)
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
extern unzFile ZEXPORT unzOpen OF((const char *path));
|
||||||
|
/*
|
||||||
|
Open a Zip file. path contain the full pathname (by example,
|
||||||
|
on a Windows NT computer "c:\\zlib\\zlib111.zip" or on an Unix computer
|
||||||
|
"zlib/zlib111.zip".
|
||||||
|
If the zipfile cannot be opened (file don't exist or in not valid), the
|
||||||
|
return value is NULL.
|
||||||
|
Else, the return value is a unzFile Handle, usable with other function
|
||||||
|
of this unzip package.
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern int ZEXPORT unzClose OF((unzFile file));
|
||||||
|
/*
|
||||||
|
Close a ZipFile opened with unzipOpen.
|
||||||
|
If there is files inside the .Zip opened with unzOpenCurrentFile (see later),
|
||||||
|
these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
|
||||||
|
return UNZ_OK if there is no problem. */
|
||||||
|
|
||||||
|
extern int ZEXPORT unzGetGlobalInfo OF((unzFile file,
|
||||||
|
unz_global_info *pglobal_info));
|
||||||
|
/*
|
||||||
|
Write info about the ZipFile in the *pglobal_info structure.
|
||||||
|
No preparation of the structure is needed
|
||||||
|
return UNZ_OK if there is no problem. */
|
||||||
|
|
||||||
|
|
||||||
|
extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
|
||||||
|
char *szComment,
|
||||||
|
uLong uSizeBuf));
|
||||||
|
/*
|
||||||
|
Get the global comment string of the ZipFile, in the szComment buffer.
|
||||||
|
uSizeBuf is the size of the szComment buffer.
|
||||||
|
return the number of byte copied or an error code <0
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/***************************************************************************/
|
||||||
|
/* Unzip package allow you browse the directory of the zipfile */
|
||||||
|
|
||||||
|
extern int ZEXPORT unzGoToFirstFile OF((unzFile file));
|
||||||
|
/*
|
||||||
|
Set the current file of the zipfile to the first file.
|
||||||
|
return UNZ_OK if there is no problem
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern int ZEXPORT unzGoToNextFile OF((unzFile file));
|
||||||
|
/*
|
||||||
|
Set the current file of the zipfile to the next file.
|
||||||
|
return UNZ_OK if there is no problem
|
||||||
|
return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern int ZEXPORT unzLocateFile OF((unzFile file,
|
||||||
|
const char *szFileName,
|
||||||
|
int iCaseSensitivity));
|
||||||
|
/*
|
||||||
|
Try locate the file szFileName in the zipfile.
|
||||||
|
For the iCaseSensitivity signification, see unzStringFileNameCompare
|
||||||
|
|
||||||
|
return value :
|
||||||
|
UNZ_OK if the file is found. It becomes the current file.
|
||||||
|
UNZ_END_OF_LIST_OF_FILE if the file is not found
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
|
||||||
|
unz_file_info *pfile_info,
|
||||||
|
char *szFileName,
|
||||||
|
uLong fileNameBufferSize,
|
||||||
|
void *extraField,
|
||||||
|
uLong extraFieldBufferSize,
|
||||||
|
char *szComment,
|
||||||
|
uLong commentBufferSize));
|
||||||
|
/*
|
||||||
|
Get Info about the current file
|
||||||
|
if pfile_info!=NULL, the *pfile_info structure will contain somes info about
|
||||||
|
the current file
|
||||||
|
if szFileName!=NULL, the filemane string will be copied in szFileName
|
||||||
|
(fileNameBufferSize is the size of the buffer)
|
||||||
|
if extraField!=NULL, the extra field information will be copied in extraField
|
||||||
|
(extraFieldBufferSize is the size of the buffer).
|
||||||
|
This is the Central-header version of the extra field
|
||||||
|
if szComment!=NULL, the comment string of the file will be copied in szComment
|
||||||
|
(commentBufferSize is the size of the buffer)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/***************************************************************************/
|
||||||
|
/* for reading the content of the current zipfile, you can open it, read data
|
||||||
|
from it, and close it (you can close it before reading all the file)
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern int ZEXPORT unzOpenCurrentFile OF((unzFile file));
|
||||||
|
/*
|
||||||
|
Open for reading data the current file in the zipfile.
|
||||||
|
If there is no error, the return value is UNZ_OK.
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern int ZEXPORT unzCloseCurrentFile OF((unzFile file));
|
||||||
|
/*
|
||||||
|
Close the file in zip opened with unzOpenCurrentFile
|
||||||
|
Return UNZ_CRCERROR if all the file was read but the CRC is not good
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern int ZEXPORT unzReadCurrentFile OF((unzFile file,
|
||||||
|
voidp buf,
|
||||||
|
unsigned len));
|
||||||
|
/*
|
||||||
|
Read bytes from the current file (opened by unzOpenCurrentFile)
|
||||||
|
buf contain buffer where data must be copied
|
||||||
|
len the size of buf.
|
||||||
|
|
||||||
|
return the number of byte copied if somes bytes are copied
|
||||||
|
return 0 if the end of file was reached
|
||||||
|
return <0 with error code if there is an error
|
||||||
|
(UNZ_ERRNO for IO error, or zLib error for uncompress error)
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern z_off_t ZEXPORT unztell OF((unzFile file));
|
||||||
|
/*
|
||||||
|
Give the current position in uncompressed data
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern int ZEXPORT unzeof OF((unzFile file));
|
||||||
|
/*
|
||||||
|
return 1 if the end of file was reached, 0 elsewhere
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
|
||||||
|
voidp buf,
|
||||||
|
unsigned len));
|
||||||
|
/*
|
||||||
|
Read extra field from the current file (opened by unzOpenCurrentFile)
|
||||||
|
This is the local-header version of the extra field (sometimes, there is
|
||||||
|
more info in the local-header version than in the central-header)
|
||||||
|
|
||||||
|
if buf==NULL, it return the size of the local extra field
|
||||||
|
|
||||||
|
if buf!=NULL, len is the size of the buffer, the extra header is copied in
|
||||||
|
buf.
|
||||||
|
the return value is the number of bytes copied in buf, or (if <0)
|
||||||
|
the error code
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _unz_H */
|
@ -31,7 +31,6 @@ OBJECTS += obj/genesis.o \
|
|||||||
obj/mem68k.o \
|
obj/mem68k.o \
|
||||||
obj/memz80.o \
|
obj/memz80.o \
|
||||||
obj/membnk.o \
|
obj/membnk.o \
|
||||||
obj/memvdp.o \
|
|
||||||
obj/state.o
|
obj/state.o
|
||||||
|
|
||||||
OBJECTS += obj/sound.o \
|
OBJECTS += obj/sound.o \
|
||||||
|
@ -11,8 +11,8 @@ void set_config_defaults(void)
|
|||||||
config.fm_preamp = 1.0;
|
config.fm_preamp = 1.0;
|
||||||
config.boost = 1;
|
config.boost = 1;
|
||||||
config.filter = 1;
|
config.filter = 1;
|
||||||
config.hq_fm = 2;
|
config.hq_fm = 1;
|
||||||
config.fm_core = 0;
|
config.fm_core = 1;
|
||||||
|
|
||||||
/* system options */
|
/* system options */
|
||||||
config.region_detect = 0;
|
config.region_detect = 0;
|
||||||
|
@ -15,7 +15,7 @@ struct {
|
|||||||
|
|
||||||
void error_init(void)
|
void error_init(void)
|
||||||
{
|
{
|
||||||
#ifdef LOG_ERROR
|
#ifdef LOGERROR
|
||||||
error_log = fopen("error.log","w");
|
error_log = fopen("error.log","w");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -24,8 +24,8 @@ int playbuffer = 0;
|
|||||||
|
|
||||||
uint8 log_error = 0;
|
uint8 log_error = 0;
|
||||||
uint8 debug_on = 0;
|
uint8 debug_on = 0;
|
||||||
uint8 turbo_mode = 0;
|
uint8 turbo_mode = 1;
|
||||||
uint8 use_sound = 1;
|
uint8 use_sound = 0;
|
||||||
uint8 fullscreen = 0;
|
uint8 fullscreen = 0;
|
||||||
|
|
||||||
int audio_len;
|
int audio_len;
|
||||||
@ -171,8 +171,8 @@ int main (int argc, char **argv)
|
|||||||
SDL_WM_SetCaption("Genesis Plus/SDL", NULL);
|
SDL_WM_SetCaption("Genesis Plus/SDL", NULL);
|
||||||
SDL_ShowCursor(0);
|
SDL_ShowCursor(0);
|
||||||
|
|
||||||
screen = SDL_SetVideoMode(640, 480, 16, fullscreen ? (SDL_SWSURFACE|SDL_FULLSCREEN): (SDL_SWSURFACE));
|
screen = SDL_SetVideoMode(640, 480, 16, fullscreen ? (SDL_HWSURFACE|SDL_FULLSCREEN): (SDL_HWSURFACE));
|
||||||
surface = SDL_CreateRGBSurface(SDL_SWSURFACE, 720, 576, 16, 0, 0, 0, 0);
|
surface = SDL_CreateRGBSurface(SDL_HWSURFACE, 720, 576, 16, 0, 0, 0, 0);
|
||||||
if (!screen || !surface)
|
if (!screen || !surface)
|
||||||
{
|
{
|
||||||
MessageBox(NULL, "Video initialization failed", "Error", 0);
|
MessageBox(NULL, "Video initialization failed", "Error", 0);
|
||||||
@ -261,7 +261,7 @@ int main (int argc, char **argv)
|
|||||||
else if (sym == SDLK_RETURN)
|
else if (sym == SDLK_RETURN)
|
||||||
{
|
{
|
||||||
fullscreen ^=1;
|
fullscreen ^=1;
|
||||||
screen = SDL_SetVideoMode(640, 480, 16, fullscreen ? (SDL_SWSURFACE|SDL_FULLSCREEN): (SDL_SWSURFACE));
|
screen = SDL_SetVideoMode(640, 480, 16, fullscreen ? (SDL_HWSURFACE|SDL_FULLSCREEN): (SDL_HWSURFACE));
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(sym == SDLK_F3) config.render ^=1;
|
else if(sym == SDLK_F3) config.render ^=1;
|
||||||
@ -342,6 +342,7 @@ int main (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(!paused)
|
if(!paused)
|
||||||
{
|
{
|
||||||
if (frameticker > 1)
|
if (frameticker > 1)
|
||||||
@ -359,6 +360,7 @@ int main (int argc, char **argv)
|
|||||||
system_frame (0);
|
system_frame (0);
|
||||||
frame_count++;
|
frame_count++;
|
||||||
}
|
}
|
||||||
|
update_input();
|
||||||
|
|
||||||
frameticker--;
|
frameticker--;
|
||||||
|
|
||||||
@ -448,7 +450,6 @@ int update_input(void)
|
|||||||
if(keystate[SDLK_c]) input.pad[joynum] |= INPUT_Z;
|
if(keystate[SDLK_c]) input.pad[joynum] |= INPUT_Z;
|
||||||
if(keystate[SDLK_v]) input.pad[joynum] |= INPUT_MODE;
|
if(keystate[SDLK_v]) input.pad[joynum] |= INPUT_MODE;
|
||||||
|
|
||||||
extern uint8 pico_current;
|
|
||||||
if (input.dev[joynum] == DEVICE_LIGHTGUN)
|
if (input.dev[joynum] == DEVICE_LIGHTGUN)
|
||||||
{
|
{
|
||||||
/* get mouse (absolute values) */
|
/* get mouse (absolute values) */
|
||||||
|
1294
source/unused/win/unzip.c
Normal file
1294
source/unused/win/unzip.c
Normal file
File diff suppressed because it is too large
Load Diff
273
source/unused/win/unzip.h
Normal file
273
source/unused/win/unzip.h
Normal file
@ -0,0 +1,273 @@
|
|||||||
|
/* unzip.h -- IO for uncompress .zip files using zlib
|
||||||
|
Version 0.15 beta, Mar 19th, 1998,
|
||||||
|
|
||||||
|
Copyright (C) 1998 Gilles Vollant
|
||||||
|
|
||||||
|
This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g
|
||||||
|
WinZip, InfoZip tools and compatible.
|
||||||
|
Encryption and multi volume ZipFile (span) are not supported.
|
||||||
|
Old compressions used by old PKZip 1.x are not supported
|
||||||
|
|
||||||
|
THIS IS AN ALPHA VERSION. AT THIS STAGE OF DEVELOPPEMENT, SOMES API OR STRUCTURE
|
||||||
|
CAN CHANGE IN FUTURE VERSION !!
|
||||||
|
I WAIT FEEDBACK at mail info@winimage.com
|
||||||
|
Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution
|
||||||
|
|
||||||
|
Condition of use and distribution are the same than zlib :
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied
|
||||||
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
arising from the use of this software.
|
||||||
|
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it
|
||||||
|
freely, subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not
|
||||||
|
claim that you wrote the original software. If you use this software
|
||||||
|
in a product, an acknowledgment in the product documentation would be
|
||||||
|
appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* for more info about .ZIP format, see
|
||||||
|
ftp://ftp.cdrom.com/pub/infozip/doc/appnote-970311-iz.zip
|
||||||
|
PkWare has also a specification at :
|
||||||
|
ftp://ftp.pkware.com/probdesc.zip */
|
||||||
|
|
||||||
|
#ifndef _unz_H
|
||||||
|
#define _unz_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _ZLIB_H
|
||||||
|
#include "zlib.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
|
||||||
|
/* like the STRICT of WIN32, we define a pointer that cannot be converted
|
||||||
|
from (void*) without cast */
|
||||||
|
typedef struct TagunzFile__ { int unused; } unzFile__;
|
||||||
|
typedef unzFile__ *unzFile;
|
||||||
|
#else
|
||||||
|
typedef voidp unzFile;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#define UNZ_OK (0)
|
||||||
|
#define UNZ_END_OF_LIST_OF_FILE (-100)
|
||||||
|
#define UNZ_ERRNO (Z_ERRNO)
|
||||||
|
#define UNZ_EOF (0)
|
||||||
|
#define UNZ_PARAMERROR (-102)
|
||||||
|
#define UNZ_BADZIPFILE (-103)
|
||||||
|
#define UNZ_INTERNALERROR (-104)
|
||||||
|
#define UNZ_CRCERROR (-105)
|
||||||
|
|
||||||
|
/* tm_unz contain date/time info */
|
||||||
|
typedef struct tm_unz_s
|
||||||
|
{
|
||||||
|
uInt tm_sec; /* seconds after the minute - [0,59] */
|
||||||
|
uInt tm_min; /* minutes after the hour - [0,59] */
|
||||||
|
uInt tm_hour; /* hours since midnight - [0,23] */
|
||||||
|
uInt tm_mday; /* day of the month - [1,31] */
|
||||||
|
uInt tm_mon; /* months since January - [0,11] */
|
||||||
|
uInt tm_year; /* years - [1980..2044] */
|
||||||
|
} tm_unz;
|
||||||
|
|
||||||
|
/* unz_global_info structure contain global data about the ZIPfile
|
||||||
|
These data comes from the end of central dir */
|
||||||
|
typedef struct unz_global_info_s
|
||||||
|
{
|
||||||
|
uLong number_entry; /* total number of entries in
|
||||||
|
the central dir on this disk */
|
||||||
|
uLong size_comment; /* size of the global comment of the zipfile */
|
||||||
|
} unz_global_info;
|
||||||
|
|
||||||
|
|
||||||
|
/* unz_file_info contain information about a file in the zipfile */
|
||||||
|
typedef struct unz_file_info_s
|
||||||
|
{
|
||||||
|
uLong version; /* version made by 2 bytes */
|
||||||
|
uLong version_needed; /* version needed to extract 2 bytes */
|
||||||
|
uLong flag; /* general purpose bit flag 2 bytes */
|
||||||
|
uLong compression_method; /* compression method 2 bytes */
|
||||||
|
uLong dosDate; /* last mod file date in Dos fmt 4 bytes */
|
||||||
|
uLong crc; /* crc-32 4 bytes */
|
||||||
|
uLong compressed_size; /* compressed size 4 bytes */
|
||||||
|
uLong uncompressed_size; /* uncompressed size 4 bytes */
|
||||||
|
uLong size_filename; /* filename length 2 bytes */
|
||||||
|
uLong size_file_extra; /* extra field length 2 bytes */
|
||||||
|
uLong size_file_comment; /* file comment length 2 bytes */
|
||||||
|
|
||||||
|
uLong disk_num_start; /* disk number start 2 bytes */
|
||||||
|
uLong internal_fa; /* internal file attributes 2 bytes */
|
||||||
|
uLong external_fa; /* external file attributes 4 bytes */
|
||||||
|
|
||||||
|
tm_unz tmu_date;
|
||||||
|
} unz_file_info;
|
||||||
|
|
||||||
|
extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
|
||||||
|
const char* fileName2,
|
||||||
|
int iCaseSensitivity));
|
||||||
|
/*
|
||||||
|
Compare two filename (fileName1,fileName2).
|
||||||
|
If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
|
||||||
|
If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
|
||||||
|
or strcasecmp)
|
||||||
|
If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
|
||||||
|
(like 1 on Unix, 2 on Windows)
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
extern unzFile ZEXPORT unzOpen OF((const char *path));
|
||||||
|
/*
|
||||||
|
Open a Zip file. path contain the full pathname (by example,
|
||||||
|
on a Windows NT computer "c:\\zlib\\zlib111.zip" or on an Unix computer
|
||||||
|
"zlib/zlib111.zip".
|
||||||
|
If the zipfile cannot be opened (file don't exist or in not valid), the
|
||||||
|
return value is NULL.
|
||||||
|
Else, the return value is a unzFile Handle, usable with other function
|
||||||
|
of this unzip package.
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern int ZEXPORT unzClose OF((unzFile file));
|
||||||
|
/*
|
||||||
|
Close a ZipFile opened with unzipOpen.
|
||||||
|
If there is files inside the .Zip opened with unzOpenCurrentFile (see later),
|
||||||
|
these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
|
||||||
|
return UNZ_OK if there is no problem. */
|
||||||
|
|
||||||
|
extern int ZEXPORT unzGetGlobalInfo OF((unzFile file,
|
||||||
|
unz_global_info *pglobal_info));
|
||||||
|
/*
|
||||||
|
Write info about the ZipFile in the *pglobal_info structure.
|
||||||
|
No preparation of the structure is needed
|
||||||
|
return UNZ_OK if there is no problem. */
|
||||||
|
|
||||||
|
|
||||||
|
extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
|
||||||
|
char *szComment,
|
||||||
|
uLong uSizeBuf));
|
||||||
|
/*
|
||||||
|
Get the global comment string of the ZipFile, in the szComment buffer.
|
||||||
|
uSizeBuf is the size of the szComment buffer.
|
||||||
|
return the number of byte copied or an error code <0
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/***************************************************************************/
|
||||||
|
/* Unzip package allow you browse the directory of the zipfile */
|
||||||
|
|
||||||
|
extern int ZEXPORT unzGoToFirstFile OF((unzFile file));
|
||||||
|
/*
|
||||||
|
Set the current file of the zipfile to the first file.
|
||||||
|
return UNZ_OK if there is no problem
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern int ZEXPORT unzGoToNextFile OF((unzFile file));
|
||||||
|
/*
|
||||||
|
Set the current file of the zipfile to the next file.
|
||||||
|
return UNZ_OK if there is no problem
|
||||||
|
return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern int ZEXPORT unzLocateFile OF((unzFile file,
|
||||||
|
const char *szFileName,
|
||||||
|
int iCaseSensitivity));
|
||||||
|
/*
|
||||||
|
Try locate the file szFileName in the zipfile.
|
||||||
|
For the iCaseSensitivity signification, see unzStringFileNameCompare
|
||||||
|
|
||||||
|
return value :
|
||||||
|
UNZ_OK if the file is found. It becomes the current file.
|
||||||
|
UNZ_END_OF_LIST_OF_FILE if the file is not found
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
|
||||||
|
unz_file_info *pfile_info,
|
||||||
|
char *szFileName,
|
||||||
|
uLong fileNameBufferSize,
|
||||||
|
void *extraField,
|
||||||
|
uLong extraFieldBufferSize,
|
||||||
|
char *szComment,
|
||||||
|
uLong commentBufferSize));
|
||||||
|
/*
|
||||||
|
Get Info about the current file
|
||||||
|
if pfile_info!=NULL, the *pfile_info structure will contain somes info about
|
||||||
|
the current file
|
||||||
|
if szFileName!=NULL, the filemane string will be copied in szFileName
|
||||||
|
(fileNameBufferSize is the size of the buffer)
|
||||||
|
if extraField!=NULL, the extra field information will be copied in extraField
|
||||||
|
(extraFieldBufferSize is the size of the buffer).
|
||||||
|
This is the Central-header version of the extra field
|
||||||
|
if szComment!=NULL, the comment string of the file will be copied in szComment
|
||||||
|
(commentBufferSize is the size of the buffer)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/***************************************************************************/
|
||||||
|
/* for reading the content of the current zipfile, you can open it, read data
|
||||||
|
from it, and close it (you can close it before reading all the file)
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern int ZEXPORT unzOpenCurrentFile OF((unzFile file));
|
||||||
|
/*
|
||||||
|
Open for reading data the current file in the zipfile.
|
||||||
|
If there is no error, the return value is UNZ_OK.
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern int ZEXPORT unzCloseCurrentFile OF((unzFile file));
|
||||||
|
/*
|
||||||
|
Close the file in zip opened with unzOpenCurrentFile
|
||||||
|
Return UNZ_CRCERROR if all the file was read but the CRC is not good
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern int ZEXPORT unzReadCurrentFile OF((unzFile file,
|
||||||
|
voidp buf,
|
||||||
|
unsigned len));
|
||||||
|
/*
|
||||||
|
Read bytes from the current file (opened by unzOpenCurrentFile)
|
||||||
|
buf contain buffer where data must be copied
|
||||||
|
len the size of buf.
|
||||||
|
|
||||||
|
return the number of byte copied if somes bytes are copied
|
||||||
|
return 0 if the end of file was reached
|
||||||
|
return <0 with error code if there is an error
|
||||||
|
(UNZ_ERRNO for IO error, or zLib error for uncompress error)
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern z_off_t ZEXPORT unztell OF((unzFile file));
|
||||||
|
/*
|
||||||
|
Give the current position in uncompressed data
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern int ZEXPORT unzeof OF((unzFile file));
|
||||||
|
/*
|
||||||
|
return 1 if the end of file was reached, 0 elsewhere
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
|
||||||
|
voidp buf,
|
||||||
|
unsigned len));
|
||||||
|
/*
|
||||||
|
Read extra field from the current file (opened by unzOpenCurrentFile)
|
||||||
|
This is the local-header version of the extra field (sometimes, there is
|
||||||
|
more info in the local-header version than in the central-header)
|
||||||
|
|
||||||
|
if buf==NULL, it return the size of the local extra field
|
||||||
|
|
||||||
|
if buf!=NULL, len is the size of the buffer, the extra header is copied in
|
||||||
|
buf.
|
||||||
|
the return value is the number of bytes copied in buf, or (if <0)
|
||||||
|
the error code
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _unz_H */
|
Loading…
Reference in New Issue
Block a user