mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-06 15:48:05 -04:00
sound (with problems) + stuff
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@265 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
471484e4c2
commit
fa283c9a38
9 changed files with 210 additions and 77 deletions
|
@ -720,7 +720,7 @@ PICO_INTERNAL_ASM void z80_write(unsigned char data, unsigned short a)
|
|||
|
||||
if ((a>>13)==2) // 0x4000-0x5fff (Charles MacDonald)
|
||||
{
|
||||
if(PicoOpt&1) emustatus|=YM2612Write(a, data);
|
||||
if(PicoOpt&1) emustatus|=YM2612Write(a, data) & 1;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ void OtherWrite8(u32 a,u32 d)
|
|||
#ifndef _ASM_MEMORY_C
|
||||
if ((a&0xe700f9)==0xc00011||(a&0xff7ff9)==0xa07f11) { if(PicoOpt&2) SN76496Write(d); return; } // PSG Sound
|
||||
if ((a&0xff4000)==0xa00000) { if(!(Pico.m.z80Run&1)) Pico.zram[a&0x1fff]=(u8)d; return; } // Z80 ram
|
||||
if ((a&0xff6000)==0xa04000) { if(PicoOpt&1) emustatus|=YM2612Write(a&3, d); return; } // FM Sound
|
||||
if ((a&0xff6000)==0xa04000) { if(PicoOpt&1) emustatus|=YM2612Write(a&3, d)&1; return; } // FM Sound
|
||||
if ((a&0xffffe0)==0xa10000) { IoWrite8(a, d); return; } // I/O ports
|
||||
#endif
|
||||
if (a==0xa11100) { z80WriteBusReq(d); return; }
|
||||
|
@ -210,7 +210,7 @@ void OtherWrite16(u32 a,u32 d)
|
|||
if ((a&0xffffe0)==0xa10000) { IoWrite8(a, d); return; } // I/O ports
|
||||
if ((a&0xff4000)==0xa00000) { if(!(Pico.m.z80Run&1)) Pico.zram[a&0x1fff]=(u8)(d>>8); return; } // Z80 ram (MSB only)
|
||||
if ((a&0xe700f8)==0xc00010||(a&0xff7ff8)==0xa07f10) { if(PicoOpt&2) SN76496Write(d); return; } // PSG Sound
|
||||
if ((a&0xff6000)==0xa04000) { if(PicoOpt&1) emustatus|=YM2612Write(a&3, d); return; } // FM Sound (??)
|
||||
if ((a&0xff6000)==0xa04000) { if(PicoOpt&1) emustatus|=YM2612Write(a&3, d)&1; return; } // FM Sound (??)
|
||||
if ((a&0xff7f00)==0xa06000) // Z80 BANK register
|
||||
{
|
||||
Pico.m.z80_bank68k>>=1;
|
||||
|
|
|
@ -16,14 +16,13 @@ int PicoOpt=0; // disable everything by default
|
|||
int PicoSkipFrame=0; // skip rendering frame?
|
||||
int PicoRegionOverride = 0; // override the region detection 0: Auto, 1: Japan NTSC, 2: Japan PAL, 4: US, 8: Europe
|
||||
int PicoAutoRgnOrder = 0;
|
||||
int emustatus = 0;
|
||||
int emustatus = 0; // rapid_ym2612, multi_ym_updates
|
||||
void (*PicoWriteSound)(int len) = 0; // called once per frame at the best time to send sound buffer (PsndOut) to hardware
|
||||
|
||||
struct PicoSRAM SRam = {0,};
|
||||
int z80startCycle, z80stopCycle; // in 68k cycles
|
||||
//int z80ExtraCycles = 0;
|
||||
int PicoPad[2]; // Joypads, format is SACB RLDU
|
||||
int PicoMCD = 0; // mega CD status: scd_started, reset_pending
|
||||
int PicoMCD = 0; // mega CD status: scd_started
|
||||
|
||||
// to be called once on emu init
|
||||
int PicoInit(void)
|
||||
|
@ -265,6 +264,8 @@ static int CheckIdle(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void lprintf_al(const char *fmt, ...);
|
||||
|
||||
// to be called on 224 or line_sample scanlines only
|
||||
static __inline void getSamples(int y)
|
||||
{
|
||||
|
@ -625,7 +626,7 @@ void PicoFrameDrawOnly(void)
|
|||
// callback to output message from emu
|
||||
void (*PicoMessage)(const char *msg)=NULL;
|
||||
|
||||
#if defined(__DEBUG_PRINT) || defined(__GP2X__)
|
||||
#if defined(__DEBUG_PRINT) || defined(__GP2X__) || defined(__GIZ__)
|
||||
// tmp debug: dump some stuff
|
||||
#define bit(r, x) ((r>>x)&1)
|
||||
void z80_debug(char *dstr);
|
||||
|
|
|
@ -464,7 +464,7 @@ PICO_INTERNAL void z80_exit(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
#if defined(__DEBUG_PRINT) || defined(__GP2X__)
|
||||
#if defined(__DEBUG_PRINT) || defined(__GP2X__) || defined(__GIZ__)
|
||||
PICO_INTERNAL void z80_debug(char *dstr)
|
||||
{
|
||||
#if defined(_USE_DRZ80)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue