backport some files from snes9x master

This commit is contained in:
Daryl Borth 2018-08-10 10:25:56 -06:00
parent c685dfceb9
commit e8f2613841
55 changed files with 2199 additions and 1082 deletions

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

File diff suppressed because it is too large Load Diff

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in
@ -178,6 +193,8 @@
#ifndef _BSX_H_ #ifndef _BSX_H_
#define _BSX_H_ #define _BSX_H_
#include <fstream>
struct SBSX struct SBSX
{ {
bool8 dirty; // Changed register values bool8 dirty; // Changed register values
@ -195,6 +212,22 @@ struct SBSX
uint8 MMC[16]; uint8 MMC[16];
uint8 prevMMC[16]; uint8 prevMMC[16];
uint8 test2192[32]; uint8 test2192[32];
bool flash_csr;
bool flash_gsr;
bool flash_bsr;
bool flash_cmd_done;
std::ifstream sat_stream1;
std::ifstream sat_stream2;
bool sat_pf_latch1_enable, sat_dt_latch1_enable;
bool sat_pf_latch2_enable, sat_dt_latch2_enable;
bool sat_stream1_loaded, sat_stream2_loaded;
bool sat_stream1_first, sat_stream2_first;
uint8 sat_stream1_count, sat_stream2_count;
uint16 sat_stream1_queue, sat_stream2_queue;
}; };
extern struct SBSX BSX; extern struct SBSX BSX;

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in
@ -294,7 +309,6 @@ void C4Op1F (void)
{ {
tanval = (double) C41FYVal / C41FXVal; tanval = (double) C41FYVal / C41FXVal;
C41FAngleRes = (int16) (atan(tanval) / (C4_PI * 2) * 512); C41FAngleRes = (int16) (atan(tanval) / (C4_PI * 2) * 512);
C41FAngleRes = C41FAngleRes;
if (C41FXVal< 0) if (C41FXVal< 0)
C41FAngleRes += 0x100; C41FAngleRes += 0x100;
C41FAngleRes &= 0x1FF; C41FAngleRes &= 0x1FF;

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in
@ -199,6 +214,7 @@ const char * S9xGetCrosshair (int idx);
// Superscope: 2 White Black // Superscope: 2 White Black
// Justifier 1: 4 Blue Black // Justifier 1: 4 Blue Black
// Justifier 2: 4 MagicPink Black // Justifier 2: 4 MagicPink Black
// Macs Rifle: 2 White Black
// //
// Available colors are: Trans, Black, 25Grey, 50Grey, 75Grey, White, Red, Orange, // Available colors are: Trans, Black, 25Grey, 50Grey, 75Grey, White, Red, Orange,
// Yellow, Green, Cyan, Sky, Blue, Violet, MagicPink, and Purple. // Yellow, Green, Cyan, Sky, Blue, Violet, MagicPink, and Purple.
@ -211,7 +227,8 @@ enum crosscontrols
X_MOUSE2, X_MOUSE2,
X_SUPERSCOPE, X_SUPERSCOPE,
X_JUSTIFIER1, X_JUSTIFIER1,
X_JUSTIFIER2 X_JUSTIFIER2,
X_MACSRIFLE
}; };
void S9xSetControllerCrosshair (enum crosscontrols ctl, int8 idx, const char *fg, const char *bg); void S9xSetControllerCrosshair (enum crosscontrols ctl, int8 idx, const char *fg, const char *bg);

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in
@ -178,6 +193,8 @@
#ifndef _DISPLAY_H_ #ifndef _DISPLAY_H_
#define _DISPLAY_H_ #define _DISPLAY_H_
#include "snes9x.h"
enum s9x_getdirtype enum s9x_getdirtype
{ {
DEFAULT_DIR = 0, DEFAULT_DIR = 0,
@ -189,14 +206,16 @@ enum s9x_getdirtype
SCREENSHOT_DIR, SCREENSHOT_DIR,
SPC_DIR, SPC_DIR,
CHEAT_DIR, CHEAT_DIR,
IPS_DIR, PATCH_DIR,
BIOS_DIR, BIOS_DIR,
LOG_DIR, LOG_DIR,
SAT_DIR,
LAST_DIR LAST_DIR
}; };
void S9xUsage (void); void S9xUsage (void);
char * S9xParseArgs (char **, int); char * S9xParseArgs (char **, int);
void S9xParseArgsForCheats (char **, int);
void S9xLoadConfigFiles (char **, int); void S9xLoadConfigFiles (char **, int);
void S9xSetInfoString (const char *); void S9xSetInfoString (const char *);

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in
@ -881,9 +896,9 @@ static void DSP1_Project (int16 X, int16 Y, int16 Z, int16 *H, int16 *V, int16 *
Py = DSP1_ShiftR(Py, E - refE); Py = DSP1_ShiftR(Py, E - refE);
Pz = DSP1_ShiftR(Pz, E3 - refE); Pz = DSP1_ShiftR(Pz, E3 - refE);
C11 =- (Px * DSP1.Nx >> 15); C11 = -(Px * DSP1.Nx >> 15);
C8 =- (Py * DSP1.Ny >> 15); C8 = -(Py * DSP1.Ny >> 15);
C9 =- (Pz * DSP1.Nz >> 15); C9 = -(Pz * DSP1.Nz >> 15);
C12 = C11 + C8 + C9; // this cannot overflow! C12 = C11 + C8 + C9; // this cannot overflow!
aux4 = C12; // de-normalization with 32-bits arithmetic aux4 = C12; // de-normalization with 32-bits arithmetic
@ -1354,7 +1369,7 @@ void DSP1SetByte (uint8 byte, uint16 address)
case 0x17: case 0x17:
case 0x37: case 0x37:
case 0x3F: case 0x3F:
DSP1.command = 0x1f; DSP1.command = 0x1f; // Fall through
case 0x1f: DSP1.in_count = 1; break; case 0x1f: DSP1.in_count = 1; break;
default: default:
#ifdef DEBUGGER #ifdef DEBUGGER
@ -1885,7 +1900,7 @@ uint8 DSP1GetByte (uint16 address)
DSP1.waiting4command = TRUE; DSP1.waiting4command = TRUE;
} }
else else
t = 0xff; t = 0x80;
} }
else else
t = 0x80; t = 0x80;

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in
@ -1139,7 +1154,7 @@ static void DSP3_OP10 (void)
DSP3_Reset(); DSP3_Reset();
else else
// absorb 2 bytes // absorb 2 bytes
DSP3.DR = DSP3.DR; DSP3.DR = DSP3.DR; // FIXME?
} }
/* /*

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in
@ -891,14 +906,14 @@ static void fx_plot_2bit (void)
return; return;
#endif #endif
if (!(GSU.vPlotOptionReg & 0x01) && !(COLR & 0xf))
return;
if (GSU.vPlotOptionReg & 0x02) if (GSU.vPlotOptionReg & 0x02)
c = (x ^ y) & 1 ? (uint8) (GSU.vColorReg >> 4) : (uint8) GSU.vColorReg; c = ((x ^ y) & 1) ? (uint8) (GSU.vColorReg >> 4) : (uint8) GSU.vColorReg;
else else
c = (uint8) GSU.vColorReg; c = (uint8) GSU.vColorReg;
if (!(GSU.vPlotOptionReg & 0x01) && !(c & 0xf))
return;
a = GSU.apvScreen[y >> 3] + GSU.x[x >> 3] + ((y & 7) << 1); a = GSU.apvScreen[y >> 3] + GSU.x[x >> 3] + ((y & 7) << 1);
v = 128 >> (x & 7); v = 128 >> (x & 7);
@ -955,14 +970,14 @@ static void fx_plot_4bit (void)
return; return;
#endif #endif
if (!(GSU.vPlotOptionReg & 0x01) && !(COLR & 0xf))
return;
if (GSU.vPlotOptionReg & 0x02) if (GSU.vPlotOptionReg & 0x02)
c = (x ^ y) & 1 ? (uint8) (GSU.vColorReg >> 4) : (uint8) GSU.vColorReg; c = ((x ^ y) & 1) ? (uint8) (GSU.vColorReg >> 4) : (uint8) GSU.vColorReg;
else else
c = (uint8) GSU.vColorReg; c = (uint8) GSU.vColorReg;
if (!(GSU.vPlotOptionReg & 0x01) && !(c & 0xf))
return;
a = GSU.apvScreen[y >> 3] + GSU.x[x >> 3] + ((y & 7) << 1); a = GSU.apvScreen[y >> 3] + GSU.x[x >> 3] + ((y & 7) << 1);
v = 128 >> (x & 7); v = 128 >> (x & 7);
@ -4137,7 +4152,6 @@ static void fx_sm_r15 (void)
uint32 fx_run (uint32 nInstructions) uint32 fx_run (uint32 nInstructions)
{ {
GSU.vCounter = nInstructions; GSU.vCounter = nInstructions;
READR14;
while (TF(G) && (GSU.vCounter-- > 0)) while (TF(G) && (GSU.vCounter-- > 0))
FX_STEP; FX_STEP;
#if 0 #if 0

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in
@ -195,7 +210,7 @@
#define SAVE_INFO_LOAD "Loaded" #define SAVE_INFO_LOAD "Loaded"
#define SAVE_INFO_OOPS "Auto-saving 'oops' snapshot" #define SAVE_INFO_OOPS "Auto-saving 'oops' snapshot"
#define SAVE_ERR_WRONG_FORMAT "File not in Snes9x snapshot format" #define SAVE_ERR_WRONG_FORMAT "File not in Snes9x snapshot format"
#define SAVE_ERR_WRONG_VERSION "Incompatable snapshot version" #define SAVE_ERR_WRONG_VERSION "Incompatible snapshot version"
#define SAVE_ERR_ROM_NOT_FOUND "ROM image \"%s\" for snapshot not found" #define SAVE_ERR_ROM_NOT_FOUND "ROM image \"%s\" for snapshot not found"
#define SAVE_ERR_SAVE_NOT_FOUND "Snapshot %s does not exist" #define SAVE_ERR_SAVE_NOT_FOUND "Snapshot %s does not exist"

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in
@ -437,14 +452,14 @@ static void reset_controllers (void)
MovieSetJoypad(i, 0); MovieSetJoypad(i, 0);
uint8 clearedMouse[MOUSE_DATA_SIZE]; uint8 clearedMouse[MOUSE_DATA_SIZE];
ZeroMemory(clearedMouse, MOUSE_DATA_SIZE); memset(clearedMouse, 0, MOUSE_DATA_SIZE);
clearedMouse[4] = 1; clearedMouse[4] = 1;
uint8 clearedScope[SCOPE_DATA_SIZE]; uint8 clearedScope[SCOPE_DATA_SIZE];
ZeroMemory(clearedScope, SCOPE_DATA_SIZE); memset(clearedScope, 0, SCOPE_DATA_SIZE);
uint8 clearedJustifier[JUSTIFIER_DATA_SIZE]; uint8 clearedJustifier[JUSTIFIER_DATA_SIZE];
ZeroMemory(clearedJustifier, JUSTIFIER_DATA_SIZE); memset(clearedJustifier, 0, JUSTIFIER_DATA_SIZE);
for (int p = 0; p < 2; p++) for (int p = 0; p < 2; p++)
{ {
@ -639,7 +654,7 @@ static void write_movie_header (FILE *fd, SMovie *movie)
{ {
uint8 buf[SMV_HEADER_SIZE], *ptr = buf; uint8 buf[SMV_HEADER_SIZE], *ptr = buf;
ZeroMemory(buf, sizeof(buf)); memset(buf, 0, sizeof(buf));
Write32(SMV_MAGIC, ptr); Write32(SMV_MAGIC, ptr);
Write32(SMV_VERSION, ptr); Write32(SMV_VERSION, ptr);
@ -771,7 +786,8 @@ int S9xMovieUnfreeze (uint8 *buf, uint32 size)
} }
else else
{ {
if (current_frame > Movie.MaxFrame || current_sample > Movie.MaxSample || memcmp(Movie.InputBuffer, ptr, space_needed)) uint32 space_processed = (Movie.BytesPerSample * (current_sample + 1));
if (current_frame > Movie.MaxFrame || current_sample > Movie.MaxSample || memcmp(Movie.InputBuffer, ptr, space_processed))
return (SNAPSHOT_INCONSISTENT); return (SNAPSHOT_INCONSISTENT);
change_state(MOVIE_STATE_PLAY); change_state(MOVIE_STATE_PLAY);
@ -812,13 +828,15 @@ int S9xMovieOpen (const char *filename, bool8 read_only)
read_movie_extrarominfo(fd, &Movie); read_movie_extrarominfo(fd, &Movie);
fn = dup(fileno(fd)); fflush(fd);
fclose(fd); fn = fileno(fd);
store_previous_settings(); store_previous_settings();
restore_movie_settings(); restore_movie_settings();
lseek(fn, Movie.SaveStateOffset, SEEK_SET); lseek(fn, Movie.SaveStateOffset, SEEK_SET);
// reopen stream to access as gzipped data
stream = REOPEN_STREAM(fn, "rb"); stream = REOPEN_STREAM(fn, "rb");
if (!stream) if (!stream)
return (FILE_NOT_FOUND); return (FILE_NOT_FOUND);
@ -832,7 +850,11 @@ int S9xMovieOpen (const char *filename, bool8 read_only)
else else
result = S9xUnfreezeFromStream(stream); result = S9xUnfreezeFromStream(stream);
CLOSE_STREAM(stream); // do not close stream but close FILE *
// (msvcrt will try to close all open FILE *handles on exit - if we do CLOSE_STREAM here
// the underlying file will be closed by zlib, causing problems when msvcrt tries to do it)
delete stream;
fclose(fd);
if (result != SUCCESS) if (result != SUCCESS)
return (result); return (result);
@ -846,7 +868,10 @@ int S9xMovieOpen (const char *filename, bool8 read_only)
} }
if (fseek(fd, Movie.ControllerDataOffset, SEEK_SET)) if (fseek(fd, Movie.ControllerDataOffset, SEEK_SET))
{
fclose(fd);
return (WRONG_FORMAT); return (WRONG_FORMAT);
}
Movie.File = fd; Movie.File = fd;
Movie.BytesPerSample = bytes_per_sample(); Movie.BytesPerSample = bytes_per_sample();
@ -879,7 +904,6 @@ int S9xMovieCreate (const char *filename, uint8 controllers_mask, uint8 opts, co
{ {
FILE *fd; FILE *fd;
STREAM stream; STREAM stream;
int fn;
if (controllers_mask == 0) if (controllers_mask == 0)
return (WRONG_FORMAT); return (WRONG_FORMAT);
@ -928,10 +952,9 @@ int S9xMovieCreate (const char *filename, uint8 controllers_mask, uint8 opts, co
write_movie_extrarominfo(fd, &Movie); write_movie_extrarominfo(fd, &Movie);
fn = dup(fileno(fd));
fclose(fd); fclose(fd);
stream = REOPEN_STREAM(fn, "ab"); stream = OPEN_STREAM(filename, "ab");
if (!stream) if (!stream)
return (FILE_NOT_FOUND); return (FILE_NOT_FOUND);
@ -989,14 +1012,17 @@ int S9xMovieGetInfo (const char *filename, struct MovieInfo *info)
flush_movie(); flush_movie();
ZeroMemory(info, sizeof(*info)); memset(info, 0, sizeof(*info));
if (!(fd = fopen(filename, "rb"))) if (!(fd = fopen(filename, "rb")))
return (FILE_NOT_FOUND); return (FILE_NOT_FOUND);
result = read_movie_header(fd, &local_movie); result = read_movie_header(fd, &local_movie);
if (result != SUCCESS) if (result != SUCCESS)
{
fclose(fd);
return (result); return (result);
}
info->TimeCreated = (time_t) local_movie.MovieId; info->TimeCreated = (time_t) local_movie.MovieId;
info->Version = local_movie.Version; info->Version = local_movie.Version;
@ -1035,9 +1061,10 @@ int S9xMovieGetInfo (const char *filename, struct MovieInfo *info)
strncpy(info->ROMName, local_movie.ROMName, 23); strncpy(info->ROMName, local_movie.ROMName, 23);
fclose(fd); fclose(fd);
if ((fd = fopen(filename, "r+")) == NULL)
if (access(filename, W_OK))
info->ReadOnly = true; info->ReadOnly = true;
else
fclose(fd);
return (SUCCESS); return (SUCCESS);
} }
@ -1117,7 +1144,7 @@ void S9xMovieUpdateOnReset (void)
void S9xMovieInit (void) void S9xMovieInit (void)
{ {
ZeroMemory(&Movie, sizeof(Movie)); memset(&Movie, 0, sizeof(Movie));
Movie.State = MOVIE_STATE_NONE; Movie.State = MOVIE_STATE_NONE;
} }

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in
@ -184,10 +199,8 @@
#define MOVIE_OPT_NOSAVEDATA (1 << 2) #define MOVIE_OPT_NOSAVEDATA (1 << 2)
#define MOVIE_SYNC_DATA_EXISTS 0x01 #define MOVIE_SYNC_DATA_EXISTS 0x01
#define MOVIE_SYNC_OBSOLETE 0x02 #define MOVIE_SYNC_OBSOLETE 0x02
#define MOVIE_SYNC_LEFTRIGHT 0x04
#define MOVIE_SYNC_VOLUMEENVX 0x08 #define MOVIE_SYNC_VOLUMEENVX 0x08
#define MOVIE_SYNC_FAKEMUTE 0x10 #define MOVIE_SYNC_FAKEMUTE 0x10
#define MOVIE_SYNC_SYNCSOUND 0x20
#define MOVIE_SYNC_HASROMINFO 0x40 #define MOVIE_SYNC_HASROMINFO 0x40
#define MOVIE_SYNC_NOCPUSHUTDOWN 0x80 #define MOVIE_SYNC_NOCPUSHUTDOWN 0x80
#define MOVIE_MAX_METADATA 512 #define MOVIE_MAX_METADATA 512

View File

@ -22,10 +22,12 @@
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2016 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2011 - 2016 Hans-Kristian Arntzen, (c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis Daniel De Matteis
(Under no circumstances will commercial rights be given) (Under no circumstances will commercial rights be given)
@ -138,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2016 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -146,14 +148,14 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2016 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2011 zones (c) Copyright 2001 - 2011 zones
Libretro port Libretro port
(c) Copyright 2011 - 2016 Hans-Kristian Arntzen, (c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis Daniel De Matteis
(Under no circumstances will commercial rights be given) (Under no circumstances will commercial rights be given)
@ -190,12 +192,13 @@
Nintendo Co., Limited and its subsidiary companies. Nintendo Co., Limited and its subsidiary companies.
***********************************************************************************/ ***********************************************************************************/
#include "msu1.h" #include "snes9x.h"
#include "display.h"
#include "filebrowser.h"
#include "memmap.h" #include "memmap.h"
#include "snes9xgx.h" #include "display.h"
#include "msu1.h"
#include "apu/bapu/dsp/blargg_endian.h" #include "apu/bapu/dsp/blargg_endian.h"
#include <fstream>
#include <sys/stat.h>
STREAM dataStream = NULL; STREAM dataStream = NULL;
STREAM audioStream = NULL; STREAM audioStream = NULL;
@ -241,7 +244,7 @@ static int unzFindExtension(unzFile &file, const char *ext, bool restart = TRUE,
STREAM S9xMSU1OpenFile(const char *msu_ext, bool skip_unpacked) STREAM S9xMSU1OpenFile(const char *msu_ext, bool skip_unpacked)
{ {
char filename[MAXPATHLEN]; char filename[1024];
sprintf(filename, "%s%s%s", Memory.ROMFilePath, Memory.ROMFilename, msu_ext); sprintf(filename, "%s%s%s", Memory.ROMFilePath, Memory.ROMFilename, msu_ext);
STREAM file = 0; STREAM file = 0;
@ -257,10 +260,15 @@ STREAM S9xMSU1OpenFile(const char *msu_ext, bool skip_unpacked)
// look for msu1 pack file in the rom or patch dir if msu data file not found in rom dir // look for msu1 pack file in the rom or patch dir if msu data file not found in rom dir
if (!file) if (!file)
{ {
char zip_filename[MAXPATHLEN]; const char *zip_filename = S9xGetFilename(".msu1", ROMFILENAME_DIR);
sprintf(zip_filename, "%s%s.msu1", Memory.ROMFilePath, Memory.ROMFilename);
unzFile unzFile = unzOpen(zip_filename); unzFile unzFile = unzOpen(zip_filename);
if (!unzFile)
{
zip_filename = S9xGetFilename(".msu1", PATCH_DIR);
unzFile = unzOpen(zip_filename);
}
if (unzFile) if (unzFile)
{ {
int port = unzFindExtension(unzFile, msu_ext, true, true, true); int port = unzFindExtension(unzFile, msu_ext, true, true, true);
@ -381,7 +389,6 @@ void S9xMSU1DeInit(void)
AudioClose(); AudioClose();
} }
bool S9xMSU1ROMExists(void) bool S9xMSU1ROMExists(void)
{ {
STREAM s = S9xMSU1OpenFile(".msu"); STREAM s = S9xMSU1OpenFile(".msu");
@ -391,9 +398,15 @@ bool S9xMSU1ROMExists(void)
return true; return true;
} }
#ifdef UNZIP_SUPPORT #ifdef UNZIP_SUPPORT
char fname[MAXPATHLEN]; char drive[_MAX_DRIVE + 1], dir[_MAX_DIR + 1], def[_MAX_FNAME + 1], ext[_MAX_EXT + 1];
sprintf(fname, "%s%s.msu1", Memory.ROMFilePath, Memory.ROMFilename); _splitpath(Memory.ROMFilename, drive, dir, def, ext);
unzFile unzFile = unzOpen(fname); if (!strcasecmp(ext, ".msu1"))
return true;
unzFile unzFile = unzOpen(S9xGetFilename(".msu1", ROMFILENAME_DIR));
if(!unzFile)
unzFile = unzOpen(S9xGetFilename(".msu1", PATCH_DIR));
if (unzFile) if (unzFile)
{ {
@ -422,6 +435,7 @@ void S9xMSU1Generate(size_t sample_count)
*left = ((int32)(int16)GET_LE16(left) * MSU1.MSU1_VOLUME / 255); *left = ((int32)(int16)GET_LE16(left) * MSU1.MSU1_VOLUME / 255);
*right = ((int32)(int16)GET_LE16(right) * MSU1.MSU1_VOLUME / 255); *right = ((int32)(int16)GET_LE16(right) * MSU1.MSU1_VOLUME / 255);
*(bufPos++) = *left; *(bufPos++) = *left;
*(bufPos++) = *right; *(bufPos++) = *right;
MSU1.MSU1_AUDIO_POS += 4; MSU1.MSU1_AUDIO_POS += 4;

View File

@ -22,10 +22,12 @@
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2016 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2011 - 2016 Hans-Kristian Arntzen, (c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis Daniel De Matteis
(Under no circumstances will commercial rights be given) (Under no circumstances will commercial rights be given)
@ -138,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2016 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -146,14 +148,14 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2016 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2011 zones (c) Copyright 2001 - 2011 zones
Libretro port Libretro port
(c) Copyright 2011 - 2016 Hans-Kristian Arntzen, (c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis Daniel De Matteis
(Under no circumstances will commercial rights be given) (Under no circumstances will commercial rights be given)
@ -193,8 +195,6 @@
#ifndef _MSU1_H_ #ifndef _MSU1_H_
#define _MSU1_H_ #define _MSU1_H_
#include "snes9x.h" #include "snes9x.h"
#include <stdint.h>
#include <sys/stat.h>
#define MSU1_REVISION 0x02 #define MSU1_REVISION 0x02

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in
@ -218,70 +233,70 @@ static const int16 ST010_SinTable[256] =
static const uint8 ST010_ArcTan[32][32] = static const uint8 ST010_ArcTan[32][32] =
{ {
{ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 }, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
{ 0x80, 0xa0, 0xad, 0xb3, 0xb6, 0xb8, 0xb9, 0xba, 0xbb, 0xbb, 0xbc, 0xbc, 0xbd, 0xbd, 0xbd, 0xbd, { 0x40, 0x20, 0x13, 0x0D, 0x0A, 0x08, 0x07, 0x06, 0x05, 0x05, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03,
0xbd, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbf, 0xbf, 0xbf, 0xbf }, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01 },
{ 0x80, 0x93, 0xa0, 0xa8, 0xad, 0xb0, 0xb3, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xb9, 0xba, 0xba, 0xbb, { 0x40, 0x2D, 0x20, 0x18, 0x13, 0x10, 0x0D, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x07, 0x06, 0x06, 0x05,
0xbb, 0xbb, 0xbb, 0xbc, 0xbc, 0xbc, 0xbc, 0xbc, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd }, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03 },
{ 0x80, 0x8d, 0x98, 0xa0, 0xa6, 0xaa, 0xad, 0xb0, 0xb1, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb7, 0xb8, { 0x40, 0x33, 0x28, 0x20, 0x1A, 0x16, 0x13, 0x10, 0x0F, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x09, 0x08,
0xb8, 0xb9, 0xb9, 0xba, 0xba, 0xba, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbc, 0xbc, 0xbc, 0xbc }, 0x08, 0x07, 0x07, 0x06, 0x06, 0x06, 0x06, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04 },
{ 0x80, 0x8a, 0x93, 0x9a, 0xa0, 0xa5, 0xa8, 0xab, 0xad, 0xaf, 0xb0, 0xb2, 0xb3, 0xb4, 0xb5, 0xb5, { 0x40, 0x36, 0x2D, 0x26, 0x20, 0x1B, 0x18, 0x15, 0x13, 0x11, 0x10, 0x0E, 0x0D, 0x0C, 0x0B, 0x0B,
0xb6, 0xb7, 0xb7, 0xb8, 0xb8, 0xb8, 0xb9, 0xb9, 0xb9, 0xba, 0xba, 0xba, 0xba, 0xba, 0xbb, 0xbb }, 0x0A, 0x09, 0x09, 0x08, 0x08, 0x08, 0x07, 0x07, 0x07, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x05 },
{ 0x80, 0x88, 0x90, 0x96, 0x9b, 0xa0, 0xa4, 0xa7, 0xa9, 0xab, 0xad, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, { 0x40, 0x38, 0x30, 0x2A, 0x25, 0x20, 0x1C, 0x19, 0x17, 0x15, 0x13, 0x11, 0x10, 0x0F, 0x0E, 0x0D,
0xb4, 0xb4, 0xb5, 0xb6, 0xb6, 0xb6, 0xb7, 0xb7, 0xb8, 0xb8, 0xb8, 0xb9, 0xb9, 0xb9, 0xb9, 0xb9 }, 0x0C, 0x0C, 0x0B, 0x0A, 0x0A, 0x0A, 0x09, 0x09, 0x08, 0x08, 0x08, 0x07, 0x07, 0x07, 0x07, 0x07 },
{ 0x80, 0x87, 0x8d, 0x93, 0x98, 0x9c, 0xa0, 0xa3, 0xa6, 0xa8, 0xaa, 0xac, 0xad, 0xae, 0xb0, 0xb0, { 0x40, 0x39, 0x33, 0x2D, 0x28, 0x24, 0x20, 0x1D, 0x1A, 0x18, 0x16, 0x14, 0x13, 0x12, 0x10, 0x10,
0xb1, 0xb2, 0xb3, 0xb4, 0xb4, 0xb5, 0xb5, 0xb6, 0xb6, 0xb6, 0xb7, 0xb7, 0xb7, 0xb8, 0xb8, 0xb8 }, 0x0F, 0x0E, 0x0D, 0x0C, 0x0C, 0x0B, 0x0B, 0x0A, 0x0A, 0x0A, 0x09, 0x09, 0x09, 0x08, 0x08, 0x08 },
{ 0x80, 0x86, 0x8b, 0x90, 0x95, 0x99, 0x9d, 0xa0, 0xa3, 0xa5, 0xa7, 0xa9, 0xaa, 0xac, 0xad, 0xae, { 0x40, 0x3A, 0x35, 0x30, 0x2B, 0x27, 0x23, 0x20, 0x1D, 0x1B, 0x19, 0x17, 0x16, 0x14, 0x13, 0x12,
0xaf, 0xb0, 0xb1, 0xb2, 0xb2, 0xb3, 0xb3, 0xb4, 0xb4, 0xb5, 0xb5, 0xb6, 0xb6, 0xb6, 0xb7, 0xb7 }, 0x11, 0x10, 0x0F, 0x0E, 0x0E, 0x0D, 0x0D, 0x0C, 0x0C, 0x0B, 0x0B, 0x0A, 0x0A, 0x0A, 0x09, 0x09 },
{ 0x80, 0x85, 0x8a, 0x8f, 0x93, 0x97, 0x9a, 0x9d, 0xa0, 0xa2, 0xa5, 0xa6, 0xa8, 0xaa, 0xab, 0xac, { 0x40, 0x3B, 0x36, 0x31, 0x2D, 0x29, 0x26, 0x23, 0x20, 0x1E, 0x1B, 0x1A, 0x18, 0x16, 0x15, 0x14,
0xad, 0xae, 0xaf, 0xb0, 0xb0, 0xb1, 0xb2, 0xb2, 0xb3, 0xb3, 0xb4, 0xb4, 0xb5, 0xb5, 0xb5, 0xb5 }, 0x13, 0x12, 0x11, 0x10, 0x10, 0x0F, 0x0E, 0x0E, 0x0D, 0x0D, 0x0C, 0x0C, 0x0B, 0x0B, 0x0B, 0x0A },
{ 0x80, 0x85, 0x89, 0x8d, 0x91, 0x95, 0x98, 0x9b, 0x9e, 0xa0, 0xa0, 0xa4, 0xa6, 0xa7, 0xa9, 0xaa, { 0x40, 0x3B, 0x37, 0x33, 0x2F, 0x2B, 0x28, 0x25, 0x22, 0x20, 0x1E, 0x1C, 0x1A, 0x19, 0x17, 0x16,
0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb0, 0xb1, 0xb1, 0xb2, 0xb2, 0xb3, 0xb3, 0xb4, 0xb4, 0xb4 }, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, 0x10, 0x0F, 0x0F, 0x0E, 0x0E, 0x0D, 0x0D, 0x0C, 0x0C, 0x0C },
{ 0x80, 0x84, 0x88, 0x8c, 0x90, 0x93, 0x96, 0x99, 0x9b, 0x9e, 0xa0, 0xa2, 0xa4, 0xa5, 0xa7, 0xa8, { 0x40, 0x3C, 0x38, 0x34, 0x30, 0x2D, 0x2A, 0x27, 0x25, 0x20, 0x20, 0x1E, 0x1C, 0x1B, 0x19, 0x18,
0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xaf, 0xb0, 0xb0, 0xb1, 0xb2, 0xb2, 0xb2, 0xb3, 0xb3 }, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x11, 0x10, 0x10, 0x0F, 0x0E, 0x0E, 0x0E, 0x0D, 0x0D },
{ 0x80, 0x84, 0x87, 0x8b, 0x8e, 0x91, 0x94, 0x97, 0x9a, 0x9c, 0x9e, 0xa0, 0xa2, 0xa3, 0xa5, 0xa6, { 0x40, 0x3C, 0x39, 0x35, 0x32, 0x2F, 0x2C, 0x29, 0x26, 0x24, 0x22, 0x20, 0x1E, 0x1D, 0x1B, 0x1A,
0xa7, 0xa9, 0xaa, 0xab, 0xac, 0xac, 0xad, 0xae, 0xae, 0xaf, 0xb0, 0xb0, 0xb1, 0xb1, 0xb2, 0xb2 }, 0x19, 0x17, 0x16, 0x15, 0x14, 0x14, 0x13, 0x12, 0x12, 0x11, 0x10, 0x10, 0x0F, 0x0F, 0x0E, 0x0E },
{ 0x80, 0x83, 0x87, 0x8a, 0x8d, 0x90, 0x93, 0x96, 0x98, 0x9a, 0x9c, 0x9e, 0xa0, 0xa2, 0xa3, 0xa5, { 0x40, 0x3D, 0x39, 0x36, 0x33, 0x30, 0x2D, 0x2A, 0x28, 0x26, 0x24, 0x22, 0x20, 0x1E, 0x1D, 0x1B,
0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xac, 0xad, 0xae, 0xae, 0xaf, 0xb0, 0xb0, 0xb0, 0xb1 }, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x14, 0x14, 0x13, 0x12, 0x12, 0x11, 0x10, 0x10, 0x10, 0x0F },
{ 0x80, 0x83, 0x86, 0x89, 0x8c, 0x8f, 0x92, 0x94, 0x96, 0x99, 0x9b, 0x9d, 0x9e, 0xa0, 0xa2, 0xa3, { 0x40, 0x3D, 0x3A, 0x37, 0x34, 0x31, 0x2E, 0x2C, 0x2A, 0x27, 0x25, 0x23, 0x22, 0x20, 0x1E, 0x1D,
0xa4, 0xa5, 0xa7, 0xa8, 0xa9, 0xa9, 0xaa, 0xab, 0xac, 0xac, 0xad, 0xae, 0xae, 0xaf, 0xaf, 0xb0 }, 0x1C, 0x1B, 0x19, 0x18, 0x17, 0x17, 0x16, 0x15, 0x14, 0x14, 0x13, 0x12, 0x12, 0x11, 0x11, 0x10 },
{ 0x80, 0x83, 0x86, 0x89, 0x8b, 0x8e, 0x90, 0x93, 0x95, 0x97, 0x99, 0x9b, 0x9d, 0x9e, 0xa0, 0xa1, { 0x40, 0x3D, 0x3A, 0x37, 0x35, 0x32, 0x30, 0x2D, 0x2B, 0x29, 0x27, 0x25, 0x23, 0x22, 0x20, 0x1F,
0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xaa, 0xab, 0xac, 0xad, 0xad, 0xae, 0xae, 0xaf }, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x16, 0x15, 0x14, 0x13, 0x13, 0x12, 0x12, 0x11 },
{ 0x80, 0x83, 0x85, 0x88, 0x8b, 0x8d, 0x90, 0x92, 0x94, 0x96, 0x98, 0x9a, 0x9b, 0x9d, 0x9f, 0xa0, { 0x40, 0x3D, 0x3B, 0x38, 0x35, 0x33, 0x30, 0x2E, 0x2C, 0x2A, 0x28, 0x26, 0x25, 0x23, 0x21, 0x20,
0xa1, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa8, 0xa9, 0xaa, 0xab, 0xab, 0xac, 0xad, 0xad, 0xae }, 0x1F, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x18, 0x17, 0x16, 0x15, 0x15, 0x14, 0x13, 0x13, 0x12 },
{ 0x80, 0x83, 0x85, 0x88, 0x8a, 0x8c, 0x8f, 0x91, 0x93, 0x95, 0x97, 0x99, 0x9a, 0x9c, 0x9d, 0x9f, { 0x40, 0x3D, 0x3B, 0x38, 0x36, 0x34, 0x31, 0x2F, 0x2D, 0x2B, 0x29, 0x27, 0x26, 0x24, 0x23, 0x21,
0xa0, 0xa1, 0xa2, 0xa3, 0xa5, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xaa, 0xab, 0xab, 0xac, 0xad }, 0x20, 0x1F, 0x1E, 0x1D, 0x1B, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16, 0x16, 0x15, 0x15, 0x14, 0x13 },
{ 0x80, 0x82, 0x85, 0x87, 0x89, 0x8c, 0x8e, 0x90, 0x92, 0x94, 0x96, 0x97, 0x99, 0x9b, 0x9c, 0x9d, { 0x40, 0x3E, 0x3B, 0x39, 0x37, 0x34, 0x32, 0x30, 0x2E, 0x2C, 0x2A, 0x29, 0x27, 0x25, 0x24, 0x23,
0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa8, 0xa9, 0xaa, 0xaa, 0xab, 0xac }, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x18, 0x17, 0x16, 0x16, 0x15, 0x14 },
{ 0x80, 0x82, 0x85, 0x87, 0x89, 0x8b, 0x8d, 0x8f, 0x91, 0x93, 0x95, 0x96, 0x98, 0x99, 0x9b, 0x9c, { 0x40, 0x3E, 0x3B, 0x39, 0x37, 0x35, 0x33, 0x31, 0x2F, 0x2D, 0x2B, 0x2A, 0x28, 0x27, 0x25, 0x24,
0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa7, 0xa8, 0xa9, 0xa9, 0xaa, 0xab }, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x19, 0x18, 0x17, 0x17, 0x16, 0x15 },
{ 0x80, 0x82, 0x84, 0x86, 0x88, 0x8a, 0x8c, 0x8e, 0x90, 0x92, 0x94, 0x95, 0x97, 0x98, 0x9a, 0x9b, { 0x40, 0x3E, 0x3C, 0x3A, 0x38, 0x36, 0x34, 0x32, 0x30, 0x2E, 0x2C, 0x2B, 0x29, 0x28, 0x26, 0x25,
0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa6, 0xa7, 0xa8, 0xa8, 0xa9, 0xaa }, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x1A, 0x19, 0x18, 0x18, 0x17, 0x16 },
{ 0x80, 0x82, 0x84, 0x86, 0x88, 0x8a, 0x8c, 0x8e, 0x90, 0x91, 0x93, 0x94, 0x96, 0x97, 0x99, 0x9a, { 0x40, 0x3E, 0x3C, 0x3A, 0x38, 0x36, 0x34, 0x32, 0x30, 0x2F, 0x2D, 0x2C, 0x2A, 0x29, 0x27, 0x26,
0x9b, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa5, 0xa6, 0xa7, 0xa7, 0xa8, 0xa9 }, 0x25, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1B, 0x1A, 0x19, 0x19, 0x18, 0x17 },
{ 0x80, 0x82, 0x84, 0x86, 0x88, 0x8a, 0x8b, 0x8d, 0x8f, 0x90, 0x92, 0x94, 0x95, 0x97, 0x98, 0x99, { 0x40, 0x3E, 0x3C, 0x3A, 0x38, 0x36, 0x35, 0x33, 0x31, 0x30, 0x2E, 0x2C, 0x2B, 0x29, 0x28, 0x27,
0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa4, 0xa5, 0xa6, 0xa6, 0xa7, 0xa8 }, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1C, 0x1B, 0x1A, 0x1A, 0x19, 0x18 },
{ 0x80, 0x82, 0x84, 0x86, 0x87, 0x89, 0x8b, 0x8d, 0x8e, 0x90, 0x91, 0x93, 0x94, 0x96, 0x97, 0x98, { 0x40, 0x3E, 0x3C, 0x3A, 0x39, 0x37, 0x35, 0x33, 0x32, 0x30, 0x2F, 0x2D, 0x2C, 0x2A, 0x29, 0x28,
0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa3, 0xa4, 0xa5, 0xa6, 0xa6, 0xa7 }, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1D, 0x1C, 0x1B, 0x1A, 0x1A, 0x19 },
{ 0x80, 0x82, 0x84, 0x85, 0x87, 0x89, 0x8a, 0x8c, 0x8e, 0x8f, 0x91, 0x92, 0x94, 0x95, 0x96, 0x98, { 0x40, 0x3E, 0x3C, 0x3B, 0x39, 0x37, 0x36, 0x34, 0x32, 0x31, 0x2F, 0x2E, 0x2C, 0x2B, 0x2A, 0x28,
0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa2, 0xa3, 0xa4, 0xa5, 0xa5, 0xa6 }, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1E, 0x1D, 0x1C, 0x1B, 0x1B, 0x1A },
{ 0x80, 0x82, 0x83, 0x85, 0x87, 0x88, 0x8a, 0x8c, 0x8d, 0x8f, 0x90, 0x92, 0x93, 0x94, 0x96, 0x97, { 0x40, 0x3E, 0x3D, 0x3B, 0x39, 0x38, 0x36, 0x34, 0x33, 0x31, 0x30, 0x2E, 0x2D, 0x2C, 0x2A, 0x29,
0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa2, 0xa3, 0xa4, 0xa5, 0xa5 }, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1E, 0x1D, 0x1C, 0x1B, 0x1B },
{ 0x80, 0x82, 0x83, 0x85, 0x86, 0x88, 0x8a, 0x8b, 0x8d, 0x8e, 0x90, 0x91, 0x92, 0x94, 0x95, 0x96, { 0x40, 0x3E, 0x3D, 0x3B, 0x3A, 0x38, 0x36, 0x35, 0x33, 0x32, 0x30, 0x2F, 0x2E, 0x2C, 0x2B, 0x2A,
0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa2, 0xa3, 0xa4, 0xa4 }, 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1E, 0x1D, 0x1C, 0x1C },
{ 0x80, 0x82, 0x83, 0x85, 0x86, 0x88, 0x89, 0x8b, 0x8c, 0x8e, 0x8f, 0x90, 0x92, 0x93, 0x94, 0x95, { 0x40, 0x3E, 0x3D, 0x3B, 0x3A, 0x38, 0x37, 0x35, 0x34, 0x32, 0x31, 0x30, 0x2E, 0x2D, 0x2C, 0x2B,
0x96, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa2, 0xa3, 0xa4 }, 0x2A, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1E, 0x1D, 0x1C },
{ 0x80, 0x82, 0x83, 0x85, 0x86, 0x87, 0x89, 0x8a, 0x8c, 0x8d, 0x8e, 0x90, 0x91, 0x92, 0x93, 0x95, { 0x40, 0x3E, 0x3D, 0x3B, 0x3A, 0x39, 0x37, 0x36, 0x34, 0x33, 0x32, 0x30, 0x2F, 0x2E, 0x2D, 0x2B,
0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9e, 0x9f, 0xa0, 0xa1, 0xa1, 0xa2, 0xa3 }, 0x2A, 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x22, 0x21, 0x20, 0x1F, 0x1F, 0x1E, 0x1D },
{ 0x80, 0x81, 0x83, 0x84, 0x86, 0x87, 0x89, 0x8a, 0x8b, 0x8d, 0x8e, 0x8f, 0x90, 0x92, 0x93, 0x94, { 0x40, 0x3F, 0x3D, 0x3C, 0x3A, 0x39, 0x37, 0x36, 0x35, 0x33, 0x32, 0x31, 0x30, 0x2E, 0x2D, 0x2C,
0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9e, 0x9f, 0xa0, 0xa1, 0xa1, 0xa2 }, 0x2B, 0x2A, 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x22, 0x21, 0x20, 0x1F, 0x1F, 0x1E },
{ 0x80, 0x81, 0x83, 0x84, 0x86, 0x87, 0x88, 0x8a, 0x8b, 0x8c, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, { 0x40, 0x3F, 0x3D, 0x3C, 0x3A, 0x39, 0x38, 0x36, 0x35, 0x34, 0x32, 0x31, 0x30, 0x2F, 0x2E, 0x2D,
0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0x9f, 0xa0, 0xa1, 0xa1 }, 0x2B, 0x2A, 0x29, 0x28, 0x27, 0x26, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x21, 0x20, 0x1F, 0x1F },
{ 0x80, 0x81, 0x83, 0x84, 0x85, 0x87, 0x88, 0x89, 0x8b, 0x8c, 0x8d, 0x8e, 0x90, 0x91, 0x92, 0x93, { 0x40, 0x3F, 0x3D, 0x3C, 0x3B, 0x39, 0x38, 0x37, 0x35, 0x34, 0x33, 0x32, 0x30, 0x2F, 0x2E, 0x2D,
0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0x9f, 0xa0, 0xa1 }, 0x2C, 0x2B, 0x2A, 0x29, 0x28, 0x27, 0x26, 0x25, 0x25, 0x24, 0x23, 0x22, 0x21, 0x21, 0x20, 0x1F },
{ 0x80, 0x81, 0x83, 0x84, 0x85, 0x87, 0x88, 0x89, 0x8a, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, { 0x40, 0x3F, 0x3D, 0x3C, 0x3B, 0x39, 0x38, 0x37, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, 0x2F, 0x2E,
0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9c, 0x9d, 0x9e, 0x9f, 0x9f, 0xa0 } 0x2D, 0x2C, 0x2B, 0x2A, 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x24, 0x23, 0x22, 0x21, 0x21, 0x20 }
}; };
// Mode 7 scaling constants for all raster lines // Mode 7 scaling constants for all raster lines
@ -316,6 +331,7 @@ static const int16 ST010_M7Scale[176] =
#endif #endif
#define ST010_WORD(offset) (Memory.SRAM[offset + 1] << 8) | Memory.SRAM[offset] #define ST010_WORD(offset) (Memory.SRAM[offset + 1] << 8) | Memory.SRAM[offset]
#define ST010_DWORD(offset) (Memory.SRAM[offset + 3] << 24) | (Memory.SRAM[offset + 2] << 16) | (Memory.SRAM[offset + 1] << 8) | Memory.SRAM[offset]
static int16 ST010_Sin (int16 Theta) static int16 ST010_Sin (int16 Theta)
@ -328,23 +344,21 @@ static int16 ST010_Cos (int16 Theta)
return (ST010_SinTable[((Theta + 0x4000) >> 8) & 0xff]); return (ST010_SinTable[((Theta + 0x4000) >> 8) & 0xff]);
} }
static void ST010_OP01 (int16 x0, int16 y0, int16 &x1, int16 &y1, int16 &Quadrant, int16 &Theta) void ST010_Compass(int16 x0, int16 y0, int16 &x1, int16 &y1, int16 &Quadrant, int16 &Theta)
{ {
if ((x0 < 0) && (y0 < 0)) if ((x0 <= 0) && (y0 < 0))
{ {
x1 = -x0; x1 = -x0;
y1 = -y0; y1 = -y0;
Quadrant = -0x8000; Quadrant = -0x8000;
} }
else else if (x0 < 0)
if (x0 < 0)
{ {
x1 = y0; x1 = y0;
y1 = -x0; y1 = -x0;
Quadrant = -0x4000; Quadrant = -0x4000;
} }
else else if (y0 < 0)
if (y0 < 0)
{ {
x1 = -y0; x1 = -y0;
y1 = x0; y1 = x0;
@ -359,16 +373,14 @@ static void ST010_OP01 (int16 x0, int16 y0, int16 &x1, int16 &y1, int16 &Quadran
while ((x1 > 0x1f) || (y1 > 0x1f)) while ((x1 > 0x1f) || (y1 > 0x1f))
{ {
if (x1 > 1) if (x1 > 1) x1 >>= 1;
x1 >>= 1; if (y1 > 1) y1 >>= 1;
if (y1 > 1)
y1 >>= 1;
} }
if (y1 == 0) Theta = ST010_ArcTan[x1 & 0x1f][y1 & 0x1f] << 8;
Quadrant += 0x4000; Theta = (Theta | Quadrant) ^ 0x8000;
Theta = (ST010_ArcTan[y1][x1] << 8) ^ Quadrant; if ((x0 == 0) && (y0 < 0)) Quadrant = 0x4000;
} }
static void ST010_Scale (int16 Multiplier, int16 X0, int16 Y0, int32 &X1, int32 &Y1) static void ST010_Scale (int16 Multiplier, int16 X0, int16 Y0, int32 &X1, int32 &Y1)
@ -421,17 +433,108 @@ static void ST010_SortDrivers (uint16 Positions, uint16 Places[32], uint16 Drive
} }
} }
/* static void ST010_Raster(int16 Theta)
static void SETA_Distance (int16 Y0, int16 X0, int16 &Distance)
{ {
if (X0 < 0) int16 data;
X0 = -X0; int offset = 0;
if (Y0 < 0)
Y0 = -Y0;
Distance = ((X0 * 0x7af0) + 0x4000) >> 15; for (int i = 0; i < 176; i++)
{
data = ST010_M7Scale[i] * ST010_Cos(Theta) >> 15;
Memory.SRAM[0x00f0 + offset] = data;
Memory.SRAM[0x00f1 + offset] = data >> 8;
Memory.SRAM[0x0510 + offset] = data;
Memory.SRAM[0x0511 + offset] = data >> 8;
data = ST010_M7Scale[i] * ST010_Sin(Theta) >> 15;
Memory.SRAM[0x0250 + offset] = data;
Memory.SRAM[0x0251 + offset] = data >> 8;
if (data) data = ~data;
Memory.SRAM[0x03b0 + offset] = data;
Memory.SRAM[0x03b1 + offset] = data >> 8;
offset += 2;
}
}
static void ST010_Distance(int16 x0, int16 y0, int16 &Distance)
{
int32 Product;
x0 = (x0 < 0) ? -x0 : x0;
y0 = (y0 < 0) ? -y0 : y0;
if((uint16) x0 >= ((uint16) y0))
Product = ((x0 * 0x3d78 << 1) + (y0 * 0x1976 << 1)) << 1;
else
Product = ((y0 * 0x3d78 << 1) + (x0 * 0x1976 << 1)) << 1;
Distance = (Product + 0x8000) >> 16;
}
static void ST010_Navigation(int16 &MaxX, int16 &MaxY, int32 &x0, int32 &y0, int16 &Theta0, int16 &Theta1, int16 &x1, int16 &y1, uint16 &Radius, uint16 Increment, uint16 MaxRadius, int16 &Compass, int16 &Flags, int16 NewMaxX, int16 NewMaxY)
{
int16 dummy1,dummy2,dummy3;
uint16 utemp16;
int32 temp32;
x1 = MaxX - (x0 >> 16);
y1 = MaxY - (y0 >> 16);
ST010_Compass(x1, y1, dummy1, dummy2, dummy3, Theta1);
Theta1 -= Theta0;
if (Theta1 & 0xff00)
Theta0 += (Theta1 & 0x8000) ? 0xfd80 : 0x0280;
// compiler notice: -0x8000 ==> +0x8000
utemp16 = ((Theta1 < 0) ? (int16) -Theta1 : Theta1) >> 4;
if (utemp16 < 0x0100)
{
temp32 = Radius + Increment;
Radius = (temp32 >= MaxRadius) ? MaxRadius : (uint16) temp32;
}
else
{
temp32 = Radius - utemp16;
Radius = (temp32 <= 0) ? 0 : (uint16) temp32;
}
x0 -= ((ST010_Sin(Theta0) >> 5) * (Radius >> 8)) << 1;
y0 -= ((ST010_Cos(Theta0) >> 5) * (Radius >> 8)) << 1;
x0 &= 0x1fffffff;
y0 &= 0x1fffffff;
int16 MaxRadiusX, MaxRadiusY;
if (Compass & 0x8000)
{
MaxRadiusX = 0x0008;
MaxRadiusY = 0x0080;
}
else
{
MaxRadiusX = 0x0080;
MaxRadiusY = 0x0008;
}
if ((abs(x1) < MaxRadiusX) && (abs(y1) < MaxRadiusY))
{
MaxX = NewMaxX;
MaxY = NewMaxY & 0x0fff;
Compass = (NewMaxY & 0x8000) ? 0xffff : 0x0000;
Flags |= 0x0008;
}
} }
*/
uint8 S9xGetST010 (uint32 Address) uint8 S9xGetST010 (uint32 Address)
{ {
@ -471,16 +574,32 @@ void S9xSetST010 (uint32 Address, uint8 Byte)
{ {
switch (ST010.op_reg) switch (ST010.op_reg)
{ {
// Heading
case 0x01:
{
Memory.SRAM[0x0006] = Memory.SRAM[0x0002];
Memory.SRAM[0x0007] = Memory.SRAM[0x0003];
#ifdef FAST_LSB_WORD_ACCESS
ST010_Compass(*(int16 *) &Memory.SRAM[0x0000], *(int16 *) &Memory.SRAM[0x0002], (int16 &) Memory.SRAM[0x0000], (int16 &) Memory.SRAM[0x0002], (int16 &) Memory.SRAM[0x0004], (int16 &) Memory.SRAM[0x0010]);
#else
int16 x1, y1, Quadrant, Theta;
ST010_Compass(ST010_WORD(0x0000), ST010_WORD(0x0002), x1, y1, Quadrant, Theta);
Memory.SRAM[0x0000] = (uint8) (x1);
Memory.SRAM[0x0001] = (uint8) (x1 >> 8);
Memory.SRAM[0x0002] = (uint8) (y1);
Memory.SRAM[0x0003] = (uint8) (y1 >> 8);
Memory.SRAM[0x0004] = (uint8) (Quadrant);
Memory.SRAM[0x0005] = (uint8) (Quadrant >> 8);
Memory.SRAM[0x0010] = (uint8) (Theta);
Memory.SRAM[0x0011] = (uint8) (Theta >> 8);
#endif
break;
}
// Sorts Driver Placements // Sorts Driver Placements
//
// Input
// 0x0024-0x0025 : Positions
// 0x0040-0x007f : Places
// 0x0080-0x00ff : Drivers
// Output
// 0x0040-0x007f : Places
// 0x0080-0x00ff : Drivers
//
case 0x02: case 0x02:
{ {
#ifdef FAST_LSB_WORD_ACCESS #ifdef FAST_LSB_WORD_ACCESS
@ -513,15 +632,6 @@ void S9xSetST010 (uint32 Address, uint8 Byte)
} }
// Two Dimensional Coordinate Scale // Two Dimensional Coordinate Scale
//
// Input
// 0x0000-0x0001 : X0 (signed)
// 0x0002-0x0003 : Y0 (signed)
// 0x0004-0x0005 : Multiplier (signed)
// Output
// 0x0010-0x0013 : X1 (signed)
// 0x0014-0x0017 : Y1 (signed)
//
case 0x03: case 0x03:
{ {
#ifdef FAST_LSB_WORD_ACCESS #ifdef FAST_LSB_WORD_ACCESS
@ -543,14 +653,74 @@ void S9xSetST010 (uint32 Address, uint8 Byte)
break; break;
} }
// calculate the vector length of (x, y)
case 0x04:
{
#ifdef FAST_LSB_WORD_ACCESS
ST010_Distance(*(int16 *) &Memory.SRAM[0x0000], *(int16 *) &Memory.SRAM[0x0002], (int16 &) Memory.SRAM[0x0010]);
#else
int16 square;
ST010_Distance(ST010_WORD(0x0000), ST010_WORD(0x0002), square);
Memory.SRAM[0x10] = (uint8) (square);
Memory.SRAM[0x11] = (uint8) (square >> 8);
#endif
break;
}
// calculate AI orientation based on specific guidelines
case 0x05:
{
#ifdef FAST_LSB_WORD_ACCESS
ST010_Navigation((int16 &) Memory.SRAM[0x00c0], (int16 &) Memory.SRAM[0x00c2], (int32 &) Memory.SRAM[0x00c4], (int32 &) Memory.SRAM[0x00c8], (int16 &) Memory.SRAM[0x00cc], (int16 &) Memory.SRAM[0x00ce], (int16 &) Memory.SRAM[0x00d0], (int16 &) Memory.SRAM[0x00d2], (uint16 &) Memory.SRAM[0x00d4], *(uint16 *) &Memory.SRAM[0x00d6], *(uint16 *) &Memory.SRAM[0x00d8], (int16 &) Memory.SRAM[0x00da], (int16 &) Memory.SRAM[0x00dc], *(int16 *) &Memory.SRAM[0x00de], *(int16 *) &Memory.SRAM[0x00e0]);
#else
int32 x0,y0;
int16 MaxX,MaxY,Theta0,Theta1,x1,y1,Compass,Flags;
uint16 Radius;
MaxX = ST010_WORD(0x00c0);
MaxY = ST010_WORD(0x00c2);
x0 = ST010_DWORD(0x00c4);
y0 = ST010_DWORD(0x00c8);
Theta0 = ST010_WORD(0x00cc);
Radius = ST010_WORD(0x00d4);
Compass = ST010_WORD(0x00da);
Flags = ST010_WORD(0x00dc);
ST010_Navigation(MaxX, MaxY, x0, y0, Theta0, Theta1, x1, y1, Radius, ST010_WORD(0x00d6), ST010_WORD(0x00d8), Compass, Flags, ST010_WORD(0x00de), ST010_WORD(0x00e0));
Memory.SRAM[0x00c0] = (uint8) (MaxX);
Memory.SRAM[0x00c1] = (uint8) (MaxX >> 8);
Memory.SRAM[0x00c2] = (uint8) (MaxY);
Memory.SRAM[0x00c3] = (uint8) (MaxY >> 8);
Memory.SRAM[0x00c4] = (uint8) (x0);
Memory.SRAM[0x00c5] = (uint8) (x0 >> 8);
Memory.SRAM[0x00c6] = (uint8) (x0 >> 16);
Memory.SRAM[0x00c7] = (uint8) (x0 >> 24);
Memory.SRAM[0x00c8] = (uint8) (y0);
Memory.SRAM[0x00c9] = (uint8) (y0 >> 8);
Memory.SRAM[0x00ca] = (uint8) (y0 >> 16);
Memory.SRAM[0x00cb] = (uint8) (y0 >> 24);
Memory.SRAM[0x00cc] = (uint8) (Theta0);
Memory.SRAM[0x00cd] = (uint8) (Theta0 >> 8);
Memory.SRAM[0x00ce] = (uint8) (Theta1);
Memory.SRAM[0x00cf] = (uint8) (Theta1 >> 8);
Memory.SRAM[0x00d0] = (uint8) (x1);
Memory.SRAM[0x00d1] = (uint8) (x1 >> 8);
Memory.SRAM[0x00d2] = (uint8) (y1);
Memory.SRAM[0x00d3] = (uint8) (y1 >> 8);
Memory.SRAM[0x00d4] = (uint8) (Radius);
Memory.SRAM[0x00d5] = (uint8) (Radius >> 8);
Memory.SRAM[0x00da] = (uint8) (Compass);
Memory.SRAM[0x00db] = (uint8) (Compass >> 8);
Memory.SRAM[0x00dc] = (uint8) (Flags);
Memory.SRAM[0x00dd] = (uint8) (Flags >> 8);
#endif
break;
}
// 16-bit Multiplication // 16-bit Multiplication
//
// Input
// 0x0000-0x0001 : Multiplcand (signed)
// 0x0002-0x0003 : Multiplier (signed)
// Output
// 0x0010-0x0013 : Product (signed)
//
case 0x06: case 0x06:
{ {
#ifdef FAST_LSB_WORD_ACCESS #ifdef FAST_LSB_WORD_ACCESS
@ -569,45 +739,13 @@ void S9xSetST010 (uint32 Address, uint8 Byte)
} }
// Mode 7 Raster Data Calculation // Mode 7 Raster Data Calculation
//
// Input
// 0x0000-0x0001 : Angle (signed)
// Output
// 0x00f0-0x024f : Mode 7 Matrix A
// 0x0250-0x03af : Mode 7 Matrix B
// 0x03b0-0x050f : Mode 7 Matrix C
// 0x0510-0x066f : Mode 7 Matrix D
//
case 0x07: case 0x07:
{ {
int16 data; #ifdef FAST_LSB_WORD_ACCESS
int32 offset = 0; ST010_Raster(*(int16 *) &Memory.SRAM[0x0000]);
int16 Theta = ST010_WORD(0x0000); #else
ST010_Raster(ST010_WORD(0x0000));
for (int32 line = 0; line < 176; line++) #endif
{
// Calculate Mode 7 Matrix A/D data
data = ST010_M7Scale[line] * ST010_Cos(Theta) >> 15;
Memory.SRAM[0x00f0 + offset] = (uint8) (data);
Memory.SRAM[0x00f1 + offset] = (uint8) (data >> 8);
Memory.SRAM[0x0510 + offset] = (uint8) (data);
Memory.SRAM[0x0511 + offset] = (uint8) (data >> 8);
// Calculate Mode 7 Matrix B/C data
data = ST010_M7Scale[line] * ST010_Sin(Theta) >> 15;
Memory.SRAM[0x0250 + offset] = (uint8) (data);
Memory.SRAM[0x0251 + offset] = (uint8) (data >> 8);
if (data)
data = ~data;
Memory.SRAM[0x03b0 + offset] = (uint8) (data);
Memory.SRAM[0x03b1 + offset] = (uint8) (data >> 8);
offset += 2;
}
// Shift Angle for use with Lookup table // Shift Angle for use with Lookup table
Memory.SRAM[0x00] = Memory.SRAM[0x01]; Memory.SRAM[0x00] = Memory.SRAM[0x01];
@ -617,15 +755,6 @@ void S9xSetST010 (uint32 Address, uint8 Byte)
} }
// Two dimensional Coordinate Rotation // Two dimensional Coordinate Rotation
//
// Input
// 0x0000-0x0001 : X0 (signed)
// 0x0002-0x0003 : Y0 (signed)
// 0x0004-0x0005 : Angle (signed)
// Output
// 0x0010-0x0011 : X1 (signed)
// 0x0012-0x0013 : Y1 (signed)
//
case 0x08: case 0x08:
{ {
#ifdef FAST_LSB_WORD_ACCESS #ifdef FAST_LSB_WORD_ACCESS
@ -643,212 +772,6 @@ void S9xSetST010 (uint32 Address, uint8 Byte)
break; break;
} }
// Input
// 0x0000-0x0001 : DX (signed)
// 0x0002-0x0003 : DY (signed)
// Output
// 0x0010-0x0011 : Angle (signed)
//
case 0x01:
{
Memory.SRAM[0x0006] = Memory.SRAM[0x0002];
Memory.SRAM[0x0007] = Memory.SRAM[0x0003];
#ifdef FAST_LSB_WORD_ACCESS
ST010_OP01(*(int16 *) &Memory.SRAM[0x0000], *(int16 *) &Memory.SRAM[0x0002], (int16 &) Memory.SRAM[0x0000], (int16 &) Memory.SRAM[0x0002], (int16 &) Memory.SRAM[0x0004], (int16 &) Memory.SRAM[0x0010]);
#else
int16 x1, y1, Quadrant, Theta;
ST010_OP01(ST010_WORD(0x0000), ST010_WORD(0x0002), x1, y1, Quadrant, Theta);
Memory.SRAM[0x0000] = (uint8) (x1);
Memory.SRAM[0x0001] = (uint8) (x1 >> 8);
Memory.SRAM[0x0002] = (uint8) (y1);
Memory.SRAM[0x0003] = (uint8) (y1 >> 8);
Memory.SRAM[0x0004] = (uint8) (Quadrant);
Memory.SRAM[0x0005] = (uint8) (Quadrant >> 8);
Memory.SRAM[0x0010] = (uint8) (Theta);
Memory.SRAM[0x0011] = (uint8) (Theta >> 8);
#endif
break;
}
// calculate the vector length of (x, y)
case 0x04:
{
int16 square, x, y;
#ifdef FAST_LSB_WORD_ACCESS
x = *((int16 *) Memory.SRAM);
y = *((int16 *) &Memory.SRAM[2]);
#else
x = Memory.SRAM[0] | (Memory.SRAM[1] << 8);
y = Memory.SRAM[2] | (Memory.SRAM[3] << 8);
#endif
square = (int16) sqrt((double) (y * y + x * x));
//SETA_Distance(x, y, square);
#ifdef FAST_LSB_WORD_ACCESS
*((int16 *) &Memory.SRAM[0x10]) = square;
#else
Memory.SRAM[0x10] = (uint8) (square);
Memory.SRAM[0x11] = (uint8) (square >> 8);
#endif
break;
}
// calculate AI orientation based on specific guidelines
case 0x05:
{
int32 dx, dy;
int16 a1, b1, c1;
uint16 o1;
bool wrap = false;
// target (x, y) coordinates
int16 ypos_max = ST010_WORD(0x00C0);
int16 xpos_max = ST010_WORD(0x00C2);
// current coordinates and direction
int32 ypos = Memory.SRAM[0xC4] | (Memory.SRAM[0xC5] << 8) | (Memory.SRAM[0xC6] << 16) | (Memory.SRAM[0xC7] << 24);
int32 xpos = Memory.SRAM[0xC8] | (Memory.SRAM[0xC9] << 8) | (Memory.SRAM[0xCA] << 16) | (Memory.SRAM[0xCB] << 24);
uint16 rot = Memory.SRAM[0xCC] | (Memory.SRAM[0xCD] << 8);
// physics
uint16 speed = ST010_WORD(0x00D4);
uint16 accel = ST010_WORD(0x00D6);
uint16 speed_max = ST010_WORD(0x00D8);
// special condition acknowledgment
int16 system = ST010_WORD(0x00DA);
int16 flags = ST010_WORD(0x00DC);
// new target coordinates
int16 ypos_new = ST010_WORD(0x00DE);
int16 xpos_new = ST010_WORD(0x00E0);
// mask upper bit
xpos_new &= 0x7FFF;
// get the current distance
dx = xpos_max - (xpos >> 16);
dy = ypos_max - (ypos >> 16);
// quirk: clear and move in9
Memory.SRAM[0xD2] = 0xFF;
Memory.SRAM[0xD3] = 0xFF;
Memory.SRAM[0xDA] = 0;
Memory.SRAM[0xDB] = 0;
// grab the target angle
ST010_OP01(dy, dx, a1, b1, c1, (int16 &) o1);
// check for wrapping
//if ((o1 < 0x6000 && rot > 0xA000) || (rot < 0x6000 && o1 > 0xA000))
//if (o1 < rot)
if (abs(o1 - rot) > 0x8000)
{
o1 += 0x8000;
rot += 0x8000;
wrap = true;
}
//o1 = 0x0000;
//rot = 0xFF00;
uint16 old_speed;
old_speed = speed;
// special case
if (abs(o1 - rot) == 0x8000)
speed = 0x100;
// slow down for sharp curves
else
if (abs(o1 - rot) >= 0x1000)
{
uint32 slow = abs(o1 - rot);
slow >>= 4; // scaling
speed -= slow;
}
// otherwise accelerate
else
{
speed += accel;
if (speed > speed_max)
{
// clip speed
speed = speed_max;
}
}
// prevent negative/positive overflow
if (abs(old_speed - speed) > 0x8000)
{
if (old_speed < speed)
speed = 0;
else
speed = 0xff00;
}
// adjust direction by so many degrees
// be careful of negative adjustments
if ((o1 > rot && (o1 - rot) > 0x80) || (o1 < rot && (rot - o1) >= 0x80))
{
if (o1 < rot)
rot -= 0x280;
else
if (o1 > rot)
rot += 0x280;
}
// turn off wrapping
if (wrap)
rot -= 0x8000;
// now check the distances (store for later)
dx = (xpos_max << 16) - xpos;
dy = (ypos_max << 16) - ypos;
dx >>= 16;
dy >>= 16;
// if we're in so many units of the target, signal it
if ((system && (dy <= 6 && dy >= -8) && (dx <= 126 && dx >= -128)) || (!system && (dx <= 6 && dx >= -8) && (dy <= 126 && dy >= -128)))
{
// announce our new destination and flag it
xpos_max = xpos_new & 0x7FFF;
ypos_max = ypos_new;
flags |= 0x08;
}
// update position
xpos -= (ST010_Cos(rot) * 0x400 >> 15) * (speed >> 8) << 1;
ypos -= (ST010_Sin(rot) * 0x400 >> 15) * (speed >> 8) << 1;
// quirk: mask upper byte
xpos &= 0x1FFFFFFF;
ypos &= 0x1FFFFFFF;
Memory.SRAM[0x00C0] = (uint8) (ypos_max);
Memory.SRAM[0x00C1] = (uint8) (ypos_max >> 8);
Memory.SRAM[0x00C2] = (uint8) (xpos_max);
Memory.SRAM[0x00C3] = (uint8) (xpos_max >> 8);
Memory.SRAM[0x00C4] = (uint8) (ypos);
Memory.SRAM[0x00C5] = (uint8) (ypos >> 8);
Memory.SRAM[0x00C6] = (uint8) (ypos >> 16);
Memory.SRAM[0x00C7] = (uint8) (ypos >> 24);
Memory.SRAM[0x00C8] = (uint8) (xpos);
Memory.SRAM[0x00C9] = (uint8) (xpos >> 8);
Memory.SRAM[0x00CA] = (uint8) (xpos >> 16);
Memory.SRAM[0x00CB] = (uint8) (xpos >> 24);
Memory.SRAM[0x00CC] = (uint8) (rot);
Memory.SRAM[0x00CD] = (uint8) (rot >> 8);
Memory.SRAM[0x00D4] = (uint8) (speed);
Memory.SRAM[0x00D5] = (uint8) (speed >> 8);
Memory.SRAM[0x00DC] = (uint8) (flags);
Memory.SRAM[0x00DD] = (uint8) (flags >> 8);
break;
}
default: default:
#ifdef DEBUGGER #ifdef DEBUGGER
printf("Unknown Op\n"); printf("Unknown Op\n");

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -42,7 +42,7 @@ void SPC7110Decomp::write(uint8 data) {
} }
uint8 SPC7110Decomp::dataread() { uint8 SPC7110Decomp::dataread() {
unsigned size = memory_cartrom_size() - 0x100000; unsigned size = memory_cartrom_size() > 0x500000 ? memory_cartrom_size() - 0x200000 : memory_cartrom_size() - 0x100000;
while(decomp_offset >= size) decomp_offset -= size; while(decomp_offset >= size) decomp_offset -= size;
return memory_cartrom_read(0x100000 + decomp_offset++); return memory_cartrom_read(0x100000 + decomp_offset++);
} }
@ -498,7 +498,7 @@ void SPC7110Decomp::reset() {
} }
SPC7110Decomp::SPC7110Decomp() { SPC7110Decomp::SPC7110Decomp() {
decomp_buffer = new uint8_t[decomp_buffer_size]; decomp_buffer = new uint8[decomp_buffer_size];
reset(); reset();
//initialize reverse morton lookup tables //initialize reverse morton lookup tables

View File

@ -91,7 +91,7 @@ void SPC7110::reset() {
} }
unsigned SPC7110::datarom_addr(unsigned addr) { unsigned SPC7110::datarom_addr(unsigned addr) {
unsigned size = memory_cartrom_size() - 0x100000; unsigned size = memory_cartrom_size() > 0x500000 ? memory_cartrom_size() - 0x200000 : memory_cartrom_size() - 0x100000;
while(addr >= size) addr -= size; while(addr >= size) addr -= size;
return addr + 0x100000; return addr + 0x100000;
} }

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in

View File

@ -17,13 +17,20 @@
(c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net), (c) Copyright 2002 - 2010 Brad Jorsch (anomie@users.sourceforge.net),
Nach (n-a-c-h@users.sourceforge.net), Nach (n-a-c-h@users.sourceforge.net),
zones (kasumitokoduck@yahoo.com)
(c) Copyright 2002 - 2011 zones (kasumitokoduck@yahoo.com)
(c) Copyright 2006 - 2007 nitsuja (c) Copyright 2006 - 2007 nitsuja
(c) Copyright 2009 - 2010 BearOso, (c) Copyright 2009 - 2018 BearOso,
OV2 OV2
(c) Copyright 2017 qwertymodo
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
BS-X C emulator code BS-X C emulator code
(c) Copyright 2005 - 2006 Dreamer Nom, (c) Copyright 2005 - 2006 Dreamer Nom,
@ -117,6 +124,9 @@
Sound emulator code used in 1.52+ Sound emulator code used in 1.52+
(c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com) (c) Copyright 2004 - 2007 Shay Green (gblargg@gmail.com)
S-SMP emulator code used in 1.54+
(c) Copyright 2016 byuu
SH assembler code partly based on x86 assembler code SH assembler code partly based on x86 assembler code
(c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se) (c) Copyright 2002 - 2004 Marcus Comstedt (marcus@mc.pp.se)
@ -130,7 +140,7 @@
(c) Copyright 2006 - 2007 Shay Green (c) Copyright 2006 - 2007 Shay Green
GTK+ GUI code GTK+ GUI code
(c) Copyright 2004 - 2010 BearOso (c) Copyright 2004 - 2018 BearOso
Win32 GUI code Win32 GUI code
(c) Copyright 2003 - 2006 blip, (c) Copyright 2003 - 2006 blip,
@ -138,11 +148,16 @@
Matthew Kendora, Matthew Kendora,
Nach, Nach,
nitsuja nitsuja
(c) Copyright 2009 - 2010 OV2 (c) Copyright 2009 - 2018 OV2
Mac OS GUI code Mac OS GUI code
(c) Copyright 1998 - 2001 John Stiles (c) Copyright 1998 - 2001 John Stiles
(c) Copyright 2001 - 2010 zones (c) Copyright 2001 - 2011 zones
Libretro port
(c) Copyright 2011 - 2017 Hans-Kristian Arntzen,
Daniel De Matteis
(Under no circumstances will commercial rights be given)
Specific ports contains the works of other authors. See headers in Specific ports contains the works of other authors. See headers in