1 /***************************************************************************
3 * ZXEmuT -- ZX Spectrum Emulator with Tcl scripting
5 * Copyright (C) 2012-2022 Ketmar Dark <ketmar@ketmar.no-ip.org>
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, version 3 of the License ONLY.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 **************************************************************************/
23 // WARNING! keep in sync with `ZX_MACHINE_XXX` enum in "emuvars.h"!
24 const ZXBasicMachineInfo basicMachineInfo
[ZX_MACHINE_MAX
] = {
26 { // 224 per line, 69888 per frame
39 .topleftpixts
= 14336,
49 .usePlus3Contention
= 0,
54 { // 228 per line, 70908 per frame
67 .topleftpixts
= 14362,
77 .usePlus3Contention
= 0,
82 { // 228 per line, 70908 per frame
95 .topleftpixts
= 14362,
105 .usePlus3Contention
= 0,
110 { // 228 per line, 70908 per frame
111 .modelname
= "plus2a",
123 //.topleftpixts = 14365,
124 .topleftpixts
= 14362,
134 .usePlus3Contention
= 1,
139 { // 228 per line, 70908 per frame
140 .modelname
= "plus3",
152 //.topleftpixts = 14365,
153 .topleftpixts
= 14362,
163 .usePlus3Contention
= 1,
168 { // 228 per line, 71680 per frame
169 .modelname
= "pentagon",
181 .topleftpixts
= 17988,
191 .usePlus3Contention
= 0,
196 { // 228 per line, 69888 per frame
197 .modelname
= "scorpion",
200 .romPages
= 3, // page 4: TR-DOS
209 .topleftpixts
= 14336,
219 .usePlus3Contention
= 0,
226 void fillMachineInfo (ZXMachineInfo
*mi
, const ZXBasicMachineInfo
*bmi
) {
227 mi
->modelname
= bmi
->modelname
;
228 mi
->cpuSpeed
= bmi
->cpuSpeed
;
229 mi
->aySpeed
= bmi
->aySpeed
;
230 mi
->romPages
= bmi
->romPages
;
231 mi
->leftBorder
= bmi
->leftBorder
;
232 mi
->hscreen
= bmi
->hscreen
;
233 mi
->rightBorder
= bmi
->rightBorder
;
234 mi
->hretrace
= bmi
->hretrace
;
235 mi
->topBorder
= bmi
->topBorder
;
236 mi
->vscreen
= bmi
->vscreen
;
237 mi
->bottomBorder
= bmi
->bottomBorder
;
238 mi
->vretrace
= bmi
->vretrace
;
239 mi
->topleftpixts
= bmi
->topleftpixts
;
240 mi
->intrlen
= bmi
->intrlen
;
241 mi
->port7ffd
= bmi
->port7ffd
;
242 mi
->port1ffd
= bmi
->port1ffd
;
243 mi
->evenM1
= bmi
->evenM1
;
244 mi
->haveSnow
= bmi
->haveSnow
;
245 mi
->floatingBus
= bmi
->floatingBus
;
246 mi
->contention
= mi
->origContention
= bmi
->contention
;
247 mi
->iocontention
= mi
->origIOContention
= bmi
->iocontention
;
248 mi
->genuine
= bmi
->genuine
;
249 mi
->usePlus3Contention
= bmi
->usePlus3Contention
;
250 mi
->p3dos
= bmi
->p3dos
;
251 mi
->port7ffDbug
= bmi
->port7ffDbug
;
253 mi
->linesperframe
= mi
->topBorder
+mi
->vscreen
+mi
->bottomBorder
+mi
->vretrace
;
254 mi
->tsperline
= mi
->leftBorder
+mi
->hscreen
+mi
->rightBorder
+mi
->hretrace
;
255 mi
->tsperframe
= mi
->tsperline
*mi
->linesperframe
;
256 mi
->tsdrawstart
= mi
->topleftpixts
-(mi
->tsperline
*mi
->topBorder
);