1 /***************************************************************************
3 * ZXEmuT -- ZX Spectrum Emulator with Tcl scripting
5 * Copyright (C) 2012-2020 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 **************************************************************************/
20 static const int16_t pattern_edge
[] = {
25 0x3E, -32666, // LD A,xx
26 0xD3, 0xFE, // OUT (#FE),A
27 0, 10, 0xCD, 0xE7, 0x05, // CALL LD-EDGE1
28 0, 22, 0xCD, 0xE3, 0x05, // CALL LD-EDGE2
30 0, 31, 0x069C, // LD B,#9C
31 0, 38, 0x3EC6, // LD A,#C6
32 0, 46, 0x06C9, // LD B,#C9
33 0, 54, 0xFE, 0xD4, // CP #D4
34 0, 79, 0x06B2, // LD B,#B2
35 0, 88, 0x3EBD, // LD A,#BD
36 0, 115, 0xED, 0x56, // IM 1
41 0x20, -32666, // JR NZ, ...
50 static int do_edge (void) {
51 const tape_loader_info_t loader_info
= {
60 return emuTapeDoFlashLoadEx(&loader_info
);
64 ////////////////////////////////////////////////////////////////////////////////
65 __attribute__((constructor
)) static void fl_loader_ctor_edge (void) {
66 const fl_loader_info_t nfo
= {
68 .pattern
=pattern_edge
,
73 fl_register_loader(&nfo
);