mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-05 04:15:05 +00:00
ab969c1da0
pretty much copy-paste from YM2610B code next up: even more blatant copy-paste in 2608
45 lines
1.4 KiB
C
45 lines
1.4 KiB
C
/**
|
|
* Furnace Tracker - multi-system chiptune tracker
|
|
* Copyright (C) 2021-2022 tildearrow and contributors
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
*/
|
|
|
|
static unsigned short opOffs[4]={
|
|
0x00, 0x04, 0x08, 0x0c
|
|
};
|
|
static bool isOutput[8][4]={
|
|
// 1 3 2 4
|
|
{false,false,false,true},
|
|
{false,false,false,true},
|
|
{false,false,false,true},
|
|
{false,false,false,true},
|
|
{false,false,true ,true},
|
|
{false,true ,true ,true},
|
|
{false,true ,true ,true},
|
|
{true ,true ,true ,true},
|
|
};
|
|
static unsigned char dtTable[8]={
|
|
7,6,5,0,1,2,3,4
|
|
};
|
|
|
|
static int orderedOps[4]={
|
|
0,2,1,3
|
|
};
|
|
|
|
#define rWrite(a,v) if (!skipRegisterWrites) {pendingWrites[a]=v;}
|
|
#define immWrite(a,v) if (!skipRegisterWrites) {writes.emplace(a,v); if (dumpWrites) {addWrite(a,v);} }
|
|
|
|
#define CHIP_FREQBASE 4720270
|