update 0.8.0
This commit is contained in:
parent
6c1dd199b1
commit
eda41a625b
20 changed files with 9833 additions and 4280 deletions
209
sae/constants.js
209
sae/constants.js
|
|
@ -9,7 +9,7 @@
|
|||
**************************************************************************/
|
||||
|
||||
const SAEV_Version = 0;
|
||||
const SAEV_Revision = 7;
|
||||
const SAEV_Revision = 8;
|
||||
const SAEV_Revision_Sub = 0;
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
|
@ -19,6 +19,15 @@ const SAEV_Null = null;
|
|||
const SAEV_True = true;
|
||||
const SAEV_False = false;
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
/* info */
|
||||
|
||||
const SAEI_Audio_Webkit = 1;
|
||||
const SAEI_Audio_Mozilla = 2;
|
||||
|
||||
const SAEI_Video_Canvas2D = 1;
|
||||
const SAEI_Video_WebGL = 2;
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
/* cpu */
|
||||
|
||||
|
|
@ -29,11 +38,18 @@ const SAEV_Config_CPU_Speed_Original = 0;
|
|||
/* chipset */
|
||||
|
||||
const SAEV_Config_Chipset_Type_OCS = 1;
|
||||
const SAEV_Config_Chipset_Type_ECS = 2;
|
||||
const SAEV_Config_Chipset_Type_ECS_AGNUS = 2;
|
||||
const SAEV_Config_Chipset_Type_ECS_DENISE = 3;
|
||||
|
||||
const SAEV_Config_Chipset_Mask_OCS = 0;
|
||||
const SAEV_Config_Chipset_Mask_ECS_AGNUS = 1;
|
||||
const SAEV_Config_Chipset_Mask_ECS_DENISE = 1 | 2;
|
||||
|
||||
|
||||
const SAEV_Config_Chipset_ColLevel_None = 0;
|
||||
const SAEV_Config_Chipset_ColLevel_Sprite_Sprite = 1;
|
||||
const SAEV_Config_Chipset_ColLevel_Sprite_Playfield = 2;
|
||||
const SAEV_Config_Chipset_ColLevel_Full = 3;
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
/* ram */
|
||||
|
|
@ -158,10 +174,10 @@ var BUG = null;
|
|||
|
||||
var AMIGA = null;
|
||||
|
||||
const CMD_STOP = 0;
|
||||
const CMD_CYCLE = 1;
|
||||
const CMD_PAUSE = 2;
|
||||
const CMD_IDLE = 3;
|
||||
const ST_STOP = 0;
|
||||
const ST_CYCLE = 1;
|
||||
const ST_PAUSE = 2;
|
||||
const ST_IDLE = 3;
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
/* events */
|
||||
|
|
@ -171,51 +187,18 @@ const EV_AUDIO = 1;
|
|||
const EV_MISC = 2;
|
||||
const EV_HSYNC = 3;
|
||||
const EV_MAX = 4;
|
||||
//const EV_COPPER = ;
|
||||
//const EV_BLITTER = ;
|
||||
//const EV_RENDER = ;
|
||||
|
||||
const EV2_BLITTER = 0;
|
||||
const EV2_DISK = 1;
|
||||
const EV2_MISC = 2;
|
||||
const EV2_MAX = 12;
|
||||
const EV2_DMAL = 2;
|
||||
const EV2_MISC = 3;
|
||||
const EV2_MAX = 3 + 10;
|
||||
|
||||
const CYCLE_UNIT = 512;
|
||||
const CYCLE_UNIT_INV = 1.0 / CYCLE_UNIT; /* mul is always faster than div */
|
||||
|
||||
const CYCLE_MAX = 0xffffffff * CYCLE_UNIT;
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
/* cia */
|
||||
|
||||
const CIA_A = 1;
|
||||
const CIA_B = 2;
|
||||
|
||||
const ECLOCK_DATA_CYCLE = 4;
|
||||
const ECLOCK_WAIT_CYCLE = 6;
|
||||
|
||||
const DIV10 = ((ECLOCK_DATA_CYCLE + ECLOCK_WAIT_CYCLE) * CYCLE_UNIT) >> 1;
|
||||
|
||||
const CIA_RETHINK_DELAY = (CYCLE_UNIT << 1) + (CYCLE_UNIT >> 1);
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
/* config */
|
||||
|
||||
//OCS
|
||||
const AGNUS_8361 = 1; /* Amiga 1000 NTSC */
|
||||
const AGNUS_8367 = 2; /* Amiga 1000 PAL */
|
||||
const AGNUS_8370 = 3; /* OCS NTSC */
|
||||
const AGNUS_8371 = 4; /* OCS PAL */
|
||||
//ECS
|
||||
const AGNUS_8372 = 5; /* ECS */
|
||||
//AGA
|
||||
const AGNUS_8374 = 6; /* AGA */
|
||||
|
||||
const DENISE_8362 = 1; /* OCS */
|
||||
const DENISE_8373 = 2; /* ECS */
|
||||
|
||||
const PAULA_8364 = 1;
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
/* cpu */
|
||||
|
||||
|
|
@ -227,9 +210,7 @@ const SPCFLAG_TRACE = 64;
|
|||
const SPCFLAG_DOTRACE = 128;
|
||||
const SPCFLAG_DOINT = 256;
|
||||
const SPCFLAG_BLTNASTY = 512;
|
||||
//const SPCFLAG_EXEC = 1024;
|
||||
//const SPCFLAG_ACTION_REPLAY = 2048;
|
||||
//const SPCFLAG_TRAP = 4096;
|
||||
const SPCFLAG_TRAP = 1024;
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
/* amiga */
|
||||
|
|
@ -272,25 +253,9 @@ const DMAF_SETCLR = 1 << 15;
|
|||
|
||||
const INT_PROCESSING_DELAY = 3 * CYCLE_UNIT;
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
/* copper */
|
||||
|
||||
/*const COP_STOP = 0;
|
||||
const COP_READ = 1;
|
||||
const COP_MOVE = 2;
|
||||
const COP_WAIT = 3;
|
||||
const COP_SKIP = 4;*/
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
/* blitter */
|
||||
|
||||
/*const BLT_STOP = 0;
|
||||
const BLT_INIT = 1;
|
||||
const BLT_READ = 2;
|
||||
const BLT_WORK = 3;
|
||||
const BLT_WRITE = 4;
|
||||
const BLT_NEXT = 5;*/
|
||||
|
||||
const BLT_done = 0;
|
||||
const BLT_init = 1;
|
||||
const BLT_read = 2;
|
||||
|
|
@ -302,16 +267,124 @@ const BLT_next = 5;
|
|||
/* video */
|
||||
|
||||
const VIDEO_WIDTH = 720; /* == 360*2 */
|
||||
const VIDEO_HEIGHT = 576; /* == 288*2 */
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
/* playfield */
|
||||
|
||||
const MAX_FRAMESKIP_COUNT = 4;
|
||||
const VIDEO_HEIGHT = 568; /* == 284*2 */
|
||||
const VIDEO_DEPTH = 32;
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
/* audio */
|
||||
|
||||
const PERIOD_MIN = 4;
|
||||
const PERIOD_MIN_NONCE = 60;
|
||||
const PERIOD_MAX = 0xffffffff;
|
||||
const PERIOD_MAX = 0xffffffff * CYCLE_UNIT;
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
/* playfield, sprites */
|
||||
|
||||
const CUSTOM_SIMPLE = 0;
|
||||
const SMART_UPDATE = 0;
|
||||
|
||||
const MAXHPOS = 227;
|
||||
const MAXHPOS_PAL = 227;
|
||||
const MAXHPOS_NTSC = 227;
|
||||
const MAXVPOS = 312;
|
||||
const MAXVPOS_PAL = 312;
|
||||
const MAXVPOS_NTSC = 262;
|
||||
const VBLANK_ENDLINE_PAL = 26;
|
||||
const VBLANK_ENDLINE_NTSC = 21;
|
||||
const VBLANK_SPRITE_PAL = 25;
|
||||
const VBLANK_SPRITE_NTSC = 20;
|
||||
const VBLANK_HZ_PAL = 50;
|
||||
const VBLANK_HZ_NTSC = 60;
|
||||
const EQU_ENDLINE_PAL = 8;
|
||||
const EQU_ENDLINE_NTSC = 10;
|
||||
|
||||
const CSMASK_ECS_AGNUS = 1;
|
||||
const CSMASK_ECS_DENISE = 2;
|
||||
const CSMASK_AGA = 4;
|
||||
const CSMASK_MASK = (CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE | CSMASK_AGA);
|
||||
|
||||
const CHIPSET_CLOCK_PAL = 3546895;
|
||||
const CHIPSET_CLOCK_NTSC = 3579545;
|
||||
|
||||
const RES_LORES = 0;
|
||||
const RES_HIRES = 1;
|
||||
const RES_SUPERHIRES = 2;
|
||||
const RES_MAX = 2;
|
||||
|
||||
const VRES_NONDOUBLE = 0;
|
||||
const VRES_DOUBLE = 1;
|
||||
const VRES_QUAD = 2;
|
||||
const VRES_MAX = 1;
|
||||
|
||||
const DIW_WAITING_START = 0;
|
||||
const DIW_WAITING_STOP = 1;
|
||||
|
||||
const LINE_UNDECIDED = 1;
|
||||
const LINE_DECIDED = 2;
|
||||
const LINE_DECIDED_DOUBLE = 3;
|
||||
const LINE_AS_PREVIOUS = 4;
|
||||
const LINE_BLACK = 5;
|
||||
const LINE_REMEMBERED_AS_BLACK = 6;
|
||||
const LINE_DONE = 7;
|
||||
const LINE_DONE_AS_PREVIOUS = 8;
|
||||
const LINE_REMEMBERED_AS_PREVIOUS = 9;
|
||||
|
||||
const LOF_TOGGLES_NEEDED = 4;
|
||||
const NLACE_CNT_NEEDED = 50;
|
||||
|
||||
const HARD_DDF_STOP = 0xd4;
|
||||
const HARD_DDF_START = 0x18;
|
||||
|
||||
const MAX_PLANES = 6; /* 8 = AGA */
|
||||
|
||||
const AMIGA_WIDTH_MAX = 752 / 2;
|
||||
const AMIGA_HEIGHT_MAX = 574 / 2;
|
||||
|
||||
const DIW_DDF_OFFSET = 1;
|
||||
const HBLANK_OFFSET = 9;
|
||||
const DISPLAY_LEFT_SHIFT = 0x38;
|
||||
|
||||
const NLN_NORMAL = 0;
|
||||
const NLN_DOUBLED = 1;
|
||||
const NLN_UPPER = 2;
|
||||
const NLN_LOWER = 3;
|
||||
const NLN_NBLACK = 4;
|
||||
|
||||
const PLF_IDLE = 0;
|
||||
const PLF_START = 1;
|
||||
const PLF_ACTIVE = 2;
|
||||
const PLF_PASSED_STOP = 3;
|
||||
const PLF_PASSED_STOP2 = 4;
|
||||
const PLF_END = 5;
|
||||
|
||||
const FETCH_NOT_STARTED = 0;
|
||||
const FETCH_STARTED = 1;
|
||||
const FETCH_WAS_PLANE0 = 2;
|
||||
|
||||
const COLOR_TABLE_SIZE = (MAXVPOS + 2) * 2;
|
||||
const COLOR_CHANGE_BRDBLANK = 0x80000000;
|
||||
|
||||
const BPLCON_DENISE_DELAY = 1;
|
||||
|
||||
const SPRITE_DEBUG = 0;
|
||||
const SPRITE_DEBUG_MINY = 0x0;
|
||||
const SPRITE_DEBUG_MAXY = 0x100;
|
||||
const SPR0_HPOS = 0x15;
|
||||
const MAX_SPRITES = 8;
|
||||
//const AUTOSCALE_SPRITES = 1;
|
||||
//const SPRBORDER = 0;
|
||||
|
||||
const MAX_PIXELS_PER_LINE = 1760;
|
||||
|
||||
const MAX_SPR_PIXELS = (((MAXVPOS + 1) * 2 + 1) * MAX_PIXELS_PER_LINE);
|
||||
const MAX_REG_CHANGE = ((MAXVPOS + 1) * 2 * MAXHPOS);
|
||||
|
||||
const MAX_STOP = 30000;
|
||||
const NO_BLOCK = -3;
|
||||
|
||||
const FRAMES_UNTIL_RES_SWITCH = 1;
|
||||
|
||||
const MAX_WORDS_PER_LINE = 100;
|
||||
|
||||
const DO_SPRITES = 1;
|
||||
const FAST_COLORS = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue