1 /* snap_accessors.c: simple accessor functions for libspectrum_snap
2 Copyright (c) 2003-2009 Philip Kendall
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
18 Author contact information:
19
20 E-mail: philip-fuse@shadowmagic.org.uk
21
22 */
23
24 /* NB: this file is autogenerated from snap_accessors.txt by accessor.pl */
25
26 #include <config.h>
27
28 #include "internals.h"
29
30 struct libspectrum_snap {
31
32 /* Which machine are we using here? */
33 libspectrum_machine machine;
34
35 /* Registers and the like */
36 libspectrum_byte a;
37 libspectrum_byte f;
38 libspectrum_word bc;
39 libspectrum_word de;
40 libspectrum_word hl;
41 libspectrum_byte a_;
42 libspectrum_byte f_;
43 libspectrum_word bc_;
44 libspectrum_word de_;
45 libspectrum_word hl_;
46 libspectrum_word ix;
47 libspectrum_word iy;
48 libspectrum_byte i;
49 libspectrum_byte r;
50 libspectrum_word sp;
51 libspectrum_word pc;
52 libspectrum_word memptr;
53 libspectrum_byte iff1;
54 libspectrum_byte iff2;
55 libspectrum_byte im;
56 libspectrum_dword tstates;
57 int halted; /* Is the Z80 currently HALTed? */
58 int last_instruction_ei; /* Was the last instruction an EI? */
59 int last_instruction_set_f; /* Did the last instruction set Flags? */
60
61 /* Custom ROM */
62 int custom_rom;
63 size_t custom_rom_pages;
64 libspectrum_byte* roms[ 4 ];
65 size_t rom_length[ 4 ];
66
67 /* RAM */
68 libspectrum_byte* pages[ SNAPSHOT_RAM_PAGES ];
69
70 /* Data from .slt files */
71 libspectrum_byte* slt[ SNAPSHOT_SLT_PAGES ]; /* Level data */
72 size_t slt_length[ SNAPSHOT_SLT_PAGES ]; /* Length of each level */
73 libspectrum_byte* slt_screen; /* Loading screen */
74 int slt_screen_level; /* The id of the loading screen. Used AFAIK */
75
76 /* Peripheral status */
77 libspectrum_byte out_ula;
78 libspectrum_byte out_128_memoryport;
79 libspectrum_byte out_plus3_memoryport; /* Used for both the +3's and the Scorpion's 0x1ffd port */
80 libspectrum_byte out_ay_registerport;
81 libspectrum_byte ay_registers[ 16 ];
82
83 /* Timex-specific bits */
84 libspectrum_byte out_scld_hsr;
85 libspectrum_byte out_scld_dec;
86
87 /* Interface 1 status */
88 int interface1_active;
89 int interface1_paged;
90 int interface1_drive_count;
91 int interface1_custom_rom;
92 libspectrum_byte* interface1_rom[1];
93 size_t interface1_rom_length[1]; /* Length of the ROM */
94
95 /* Betadisk status */
96 int beta_active;
97 int beta_paged;
98 int beta_autoboot;
99 int beta_drive_count;
100 int beta_custom_rom;
101 int beta_direction; /* FDC seek direction (hubwards/rimwards) */
102 libspectrum_byte beta_system;
103 libspectrum_byte beta_track;
104 libspectrum_byte beta_sector;
105 libspectrum_byte beta_data;
106 libspectrum_byte beta_status;
107 libspectrum_byte* beta_rom[1];
108
109 /* Plus D status */
110 int plusd_active;
111 int plusd_paged;
112 int plusd_drive_count;
113 int plusd_custom_rom;
114 int plusd_direction; /* FDC seek direction (hubwards/rimwards) */
115 libspectrum_byte plusd_control;
116 libspectrum_byte plusd_track;
117 libspectrum_byte plusd_sector;
118 libspectrum_byte plusd_data;
119 libspectrum_byte plusd_status;
120 libspectrum_byte* plusd_rom[1];
121 libspectrum_byte* plusd_ram[1];
122
123 /* Opus Discovery status */
124 int opus_active;
125 int opus_paged;
126 int opus_drive_count;
127 int opus_custom_rom;
128 int opus_direction; /* FDC seek direction (hubwards/rimwards) */
129 libspectrum_byte opus_track;
130 libspectrum_byte opus_sector;
131 libspectrum_byte opus_data;
132 libspectrum_byte opus_status;
133 libspectrum_byte opus_data_reg_a;
134 libspectrum_byte opus_data_dir_a;
135 libspectrum_byte opus_control_a;
136 libspectrum_byte opus_data_reg_b;
137 libspectrum_byte opus_data_dir_b;
138 libspectrum_byte opus_control_b;
139 libspectrum_byte* opus_rom[1];
140 libspectrum_byte* opus_ram[1];
141
142 /* ZXATASP status */
143 int zxatasp_active;
144 int zxatasp_upload;
145 int zxatasp_writeprotect;
146 libspectrum_byte zxatasp_port_a;
147 libspectrum_byte zxatasp_port_b;
148 libspectrum_byte zxatasp_port_c;
149 libspectrum_byte zxatasp_control;
150 size_t zxatasp_pages;
151 size_t zxatasp_current_page;
152 libspectrum_byte* zxatasp_ram[ SNAPSHOT_ZXATASP_PAGES ];
153
154 /* ZXCF status */
155 int zxcf_active;
156 int zxcf_upload;
157 libspectrum_byte zxcf_memctl;
158 size_t zxcf_pages;
159 libspectrum_byte* zxcf_ram[ SNAPSHOT_ZXCF_PAGES ];
160
161 /* Interface 2 cartridge */
162 int interface2_active;
163 libspectrum_byte* interface2_rom[1];
164
165 /* Timex Dock cartridge */
166 int dock_active;
167 libspectrum_byte exrom_ram[ SNAPSHOT_DOCK_EXROM_PAGES ];
168 libspectrum_byte* exrom_cart[ SNAPSHOT_DOCK_EXROM_PAGES ];
169 libspectrum_byte dock_ram[ SNAPSHOT_DOCK_EXROM_PAGES ];
170 libspectrum_byte* dock_cart[ SNAPSHOT_DOCK_EXROM_PAGES ];
171
172 /* Keyboard emulation */
173 int issue2;
174
175 /* Joystick emulation */
176 size_t joystick_active_count;
177 libspectrum_joystick joystick_list[ SNAPSHOT_JOYSTICKS ];
178 int joystick_inputs[ SNAPSHOT_JOYSTICKS ];
179
180 /* Kempston mouse status */
181 int kempston_mouse_active;
182
183 /* Simple 8-bit IDE status */
184 int simpleide_active;
185
186 /* DivIDE status */
187 int divide_active;
188 int divide_eprom_writeprotect;
189 int divide_paged;
190 libspectrum_byte divide_control;
191 size_t divide_pages;
192 libspectrum_byte* divide_eprom[1];
193 libspectrum_byte* divide_ram[ SNAPSHOT_DIVIDE_PAGES ];
194
195 /* DivMMC status */
196 int divmmc_active;
197 int divmmc_eprom_writeprotect;
198 int divmmc_paged;
199 libspectrum_byte divmmc_control;
200 size_t divmmc_pages;
201 libspectrum_byte* divmmc_eprom[1];
202 libspectrum_byte* divmmc_ram[ SNAPSHOT_DIVMMC_PAGES ];
203
204 /* Fuller box status */
205 int fuller_box_active;
206
207 /* Melodik status */
208 int melodik_active;
209
210 /* Cheetah SpecDrum status */
211 int specdrum_active;
212 libspectrum_signed_byte specdrum_dac;
213
214 /* Spectranet status */
215 int spectranet_active;
216 int spectranet_paged;
217 int spectranet_paged_via_io;
218 int spectranet_nmi_flipflop;
219 int spectranet_programmable_trap_active;
220 int spectranet_programmable_trap_msb;
221 int spectranet_all_traps_disabled;
222 int spectranet_rst8_trap_disabled;
223 int spectranet_deny_downstream_a15;
224 int spectranet_page_a;
225 int spectranet_page_b;
226 libspectrum_word spectranet_programmable_trap;
227 libspectrum_byte* spectranet_w5100[1];
228 libspectrum_byte* spectranet_flash[1];
229 libspectrum_byte* spectranet_ram[1];
230
231 /* Timings emulation */
232 int late_timings;
233
234 /* Printer emulation */
235 int zx_printer_active;
236
237 /* uSource emulation */
238 int usource_active;
239 int usource_paged;
240 int usource_custom_rom;
241 libspectrum_byte* usource_rom[1];
242 size_t usource_rom_length[1]; /* Length of the ROM */
243
244 /* DISCiPLE emulation */
245 int disciple_active;
246 int disciple_paged;
247 int disciple_inhibit_button;
248 int disciple_drive_count;
249 int disciple_custom_rom;
250 int disciple_direction;
251 libspectrum_byte disciple_control;
252 libspectrum_byte disciple_track;
253 libspectrum_byte disciple_sector;
254 libspectrum_byte disciple_data;
255 libspectrum_byte disciple_status;
256 libspectrum_byte* disciple_rom[1];
257 size_t disciple_rom_length[1];
258 libspectrum_byte* disciple_ram[1];
259
260 /* Didaktik 80 MDOS 1 emulation */
261 int didaktik80_active;
262 int didaktik80_paged;
263 int didaktik80_drive_count;
264 int didaktik80_custom_rom;
265 int didaktik80_direction;
266 libspectrum_byte didaktik80_aux;
267 libspectrum_byte didaktik80_track;
268 libspectrum_byte didaktik80_sector;
269 libspectrum_byte didaktik80_data;
270 libspectrum_byte didaktik80_status;
271 libspectrum_byte* didaktik80_rom[1];
272 size_t didaktik80_rom_length[1];
273 libspectrum_byte* didaktik80_ram[1];
274
275 /* Covox status */
276 int covox_active;
277 libspectrum_byte covox_dac;
278
279 /* ULAplus emulation */
280 int ulaplus_active;
281 int ulaplus_palette_enabled;
282 libspectrum_byte ulaplus_current_register;
283 libspectrum_byte* ulaplus_palette[1];
284 libspectrum_byte ulaplus_ff_register;
285
286 /* Multiface One/128/3 emulation */
287 int multiface_active;
288 int multiface_paged;
289 int multiface_model_one;
290 int multiface_model_128;
291 int multiface_model_3;
292 int multiface_disabled;
293 int multiface_software_lockout;
294 int multiface_red_button_disabled;
295 libspectrum_byte* multiface_ram[1];
296 size_t multiface_ram_length[1];
297
298 /* ZXMMC status */
299 int zxmmc_active;
300
301 /* TTX2000S status */
302 int ttx2000s_active;
303 };
304
305 /* Initialise a libspectrum_snap structure */
306 libspectrum_snap*
libspectrum_snap_alloc(void)307 libspectrum_snap_alloc( void )
308 {
309 libspectrum_snap* snap;
310 size_t i;
311
312 snap = libspectrum_new( libspectrum_snap, 1 );
313
314 /* Which machine are we using here? */
315 libspectrum_snap_set_machine( snap, LIBSPECTRUM_MACHINE_UNKNOWN );
316
317 /* Registers and the like */
318 libspectrum_snap_set_a( snap, 0 );
319 libspectrum_snap_set_f( snap, 0 );
320 libspectrum_snap_set_bc( snap, 0 );
321 libspectrum_snap_set_de( snap, 0 );
322 libspectrum_snap_set_hl( snap, 0 );
323 libspectrum_snap_set_a_( snap, 0 );
324 libspectrum_snap_set_f_( snap, 0 );
325 libspectrum_snap_set_bc_( snap, 0 );
326 libspectrum_snap_set_de_( snap, 0 );
327 libspectrum_snap_set_hl_( snap, 0 );
328 libspectrum_snap_set_ix( snap, 0 );
329 libspectrum_snap_set_iy( snap, 0 );
330 libspectrum_snap_set_i( snap, 0 );
331 libspectrum_snap_set_r( snap, 0 );
332 libspectrum_snap_set_sp( snap, 0 );
333 libspectrum_snap_set_pc( snap, 0 );
334 libspectrum_snap_set_memptr( snap, 0 );
335 libspectrum_snap_set_iff1( snap, 1 );
336 libspectrum_snap_set_iff2( snap, 1 );
337 libspectrum_snap_set_im( snap, 1 );
338 libspectrum_snap_set_tstates( snap, 69664 );
339 libspectrum_snap_set_halted( snap, 0 );
340 libspectrum_snap_set_last_instruction_ei( snap, 0 );
341 libspectrum_snap_set_last_instruction_set_f( snap, 0 );
342
343 /* Custom ROM */
344 libspectrum_snap_set_custom_rom( snap, 0 );
345 libspectrum_snap_set_custom_rom_pages( snap, 0 );
346 for( i = 0; i < 4; i++ )
347 libspectrum_snap_set_roms( snap, i, NULL );
348 for( i = 0; i < 4; i++ )
349 libspectrum_snap_set_rom_length( snap, i, 0 );
350
351 /* RAM */
352 for( i = 0; i < SNAPSHOT_RAM_PAGES; i++ )
353 libspectrum_snap_set_pages( snap, i, NULL );
354
355 /* Data from .slt files */
356 for( i = 0; i < SNAPSHOT_SLT_PAGES; i++ )
357 libspectrum_snap_set_slt( snap, i, NULL );
358 for( i = 0; i < SNAPSHOT_SLT_PAGES; i++ )
359 libspectrum_snap_set_slt_length( snap, i, 0 );
360 libspectrum_snap_set_slt_screen( snap, NULL );
361 libspectrum_snap_set_slt_screen_level( snap, 0 );
362
363 /* Peripheral status */
364 libspectrum_snap_set_out_ula( snap, 0 );
365 libspectrum_snap_set_out_128_memoryport( snap, 0x07 );
366 libspectrum_snap_set_out_plus3_memoryport( snap, 0x08 );
367 libspectrum_snap_set_out_ay_registerport( snap, 0x0e );
368 for( i = 0; i < 16; i++ )
369 libspectrum_snap_set_ay_registers( snap, i, 0 );
370
371 /* Timex-specific bits */
372 libspectrum_snap_set_out_scld_hsr( snap, 0 );
373 libspectrum_snap_set_out_scld_dec( snap, 0 );
374
375 /* Interface 1 status */
376 libspectrum_snap_set_interface1_active( snap, 0 );
377 libspectrum_snap_set_interface1_paged( snap, 0 );
378 libspectrum_snap_set_interface1_drive_count( snap, 0 );
379 libspectrum_snap_set_interface1_custom_rom( snap, 0 );
380 libspectrum_snap_set_interface1_rom( snap, 0, NULL );
381 libspectrum_snap_set_interface1_rom_length( snap, 0, 0 );
382
383 /* Betadisk status */
384 libspectrum_snap_set_beta_active( snap, 0 );
385 libspectrum_snap_set_beta_paged( snap, 0 );
386 libspectrum_snap_set_beta_autoboot( snap, 0 );
387 libspectrum_snap_set_beta_drive_count( snap, 0 );
388 libspectrum_snap_set_beta_custom_rom( snap, 0 );
389 libspectrum_snap_set_beta_direction( snap, 0 );
390 libspectrum_snap_set_beta_system( snap, 0 );
391 libspectrum_snap_set_beta_track( snap, 0 );
392 libspectrum_snap_set_beta_sector( snap, 0 );
393 libspectrum_snap_set_beta_data( snap, 0 );
394 libspectrum_snap_set_beta_status( snap, 0 );
395 libspectrum_snap_set_beta_rom( snap, 0, NULL );
396
397 /* Plus D status */
398 libspectrum_snap_set_plusd_active( snap, 0 );
399 libspectrum_snap_set_plusd_paged( snap, 0 );
400 libspectrum_snap_set_plusd_drive_count( snap, 0 );
401 libspectrum_snap_set_plusd_custom_rom( snap, 0 );
402 libspectrum_snap_set_plusd_direction( snap, 0 );
403 libspectrum_snap_set_plusd_control( snap, 0 );
404 libspectrum_snap_set_plusd_track( snap, 0 );
405 libspectrum_snap_set_plusd_sector( snap, 0 );
406 libspectrum_snap_set_plusd_data( snap, 0 );
407 libspectrum_snap_set_plusd_status( snap, 0 );
408 libspectrum_snap_set_plusd_rom( snap, 0, NULL );
409 libspectrum_snap_set_plusd_ram( snap, 0, NULL );
410
411 /* Opus Discovery status */
412 libspectrum_snap_set_opus_active( snap, 0 );
413 libspectrum_snap_set_opus_paged( snap, 0 );
414 libspectrum_snap_set_opus_drive_count( snap, 0 );
415 libspectrum_snap_set_opus_custom_rom( snap, 0 );
416 libspectrum_snap_set_opus_direction( snap, 0 );
417 libspectrum_snap_set_opus_track( snap, 0 );
418 libspectrum_snap_set_opus_sector( snap, 0 );
419 libspectrum_snap_set_opus_data( snap, 0 );
420 libspectrum_snap_set_opus_status( snap, 0 );
421 libspectrum_snap_set_opus_data_reg_a( snap, 0 );
422 libspectrum_snap_set_opus_data_dir_a( snap, 0 );
423 libspectrum_snap_set_opus_control_a( snap, 0 );
424 libspectrum_snap_set_opus_data_reg_b( snap, 0 );
425 libspectrum_snap_set_opus_data_dir_b( snap, 0 );
426 libspectrum_snap_set_opus_control_b( snap, 0 );
427 libspectrum_snap_set_opus_rom( snap, 0, NULL );
428 libspectrum_snap_set_opus_ram( snap, 0, NULL );
429
430 /* ZXATASP status */
431 libspectrum_snap_set_zxatasp_active( snap, 0 );
432 libspectrum_snap_set_zxatasp_upload( snap, 0 );
433 libspectrum_snap_set_zxatasp_writeprotect( snap, 0 );
434 libspectrum_snap_set_zxatasp_port_a( snap, 0 );
435 libspectrum_snap_set_zxatasp_port_b( snap, 0 );
436 libspectrum_snap_set_zxatasp_port_c( snap, 0 );
437 libspectrum_snap_set_zxatasp_control( snap, 0 );
438 libspectrum_snap_set_zxatasp_pages( snap, 0 );
439 libspectrum_snap_set_zxatasp_current_page( snap, 0 );
440 for( i = 0; i < SNAPSHOT_ZXATASP_PAGES; i++ )
441 libspectrum_snap_set_zxatasp_ram( snap, i, NULL );
442
443 /* ZXCF status */
444 libspectrum_snap_set_zxcf_active( snap, 0 );
445 libspectrum_snap_set_zxcf_upload( snap, 0 );
446 libspectrum_snap_set_zxcf_memctl( snap, 0 );
447 libspectrum_snap_set_zxcf_pages( snap, 0 );
448 for( i = 0; i < SNAPSHOT_ZXCF_PAGES; i++ )
449 libspectrum_snap_set_zxcf_ram( snap, i, NULL );
450
451 /* Interface 2 cartridge */
452 libspectrum_snap_set_interface2_active( snap, 0 );
453 libspectrum_snap_set_interface2_rom( snap, 0, NULL );
454
455 /* Timex Dock cartridge */
456 libspectrum_snap_set_dock_active( snap, 0 );
457 for( i = 0; i < SNAPSHOT_DOCK_EXROM_PAGES; i++ )
458 libspectrum_snap_set_exrom_ram( snap, i, 0 );
459 for( i = 0; i < SNAPSHOT_DOCK_EXROM_PAGES; i++ )
460 libspectrum_snap_set_exrom_cart( snap, i, NULL );
461 for( i = 0; i < SNAPSHOT_DOCK_EXROM_PAGES; i++ )
462 libspectrum_snap_set_dock_ram( snap, i, 0 );
463 for( i = 0; i < SNAPSHOT_DOCK_EXROM_PAGES; i++ )
464 libspectrum_snap_set_dock_cart( snap, i, NULL );
465
466 /* Keyboard emulation */
467 libspectrum_snap_set_issue2( snap, 0 );
468
469 /* Joystick emulation */
470 libspectrum_snap_set_joystick_active_count( snap, 0 );
471 for( i = 0; i < SNAPSHOT_JOYSTICKS; i++ )
472 libspectrum_snap_set_joystick_list( snap, i, LIBSPECTRUM_JOYSTICK_NONE );
473 for( i = 0; i < SNAPSHOT_JOYSTICKS; i++ )
474 libspectrum_snap_set_joystick_inputs( snap, i, 0 );
475
476 /* Kempston mouse status */
477 libspectrum_snap_set_kempston_mouse_active( snap, 0 );
478
479 /* Simple 8-bit IDE status */
480 libspectrum_snap_set_simpleide_active( snap, 0 );
481
482 /* DivIDE status */
483 libspectrum_snap_set_divide_active( snap, 0 );
484 libspectrum_snap_set_divide_eprom_writeprotect( snap, 0 );
485 libspectrum_snap_set_divide_paged( snap, 0 );
486 libspectrum_snap_set_divide_control( snap, 0 );
487 libspectrum_snap_set_divide_pages( snap, 0 );
488 libspectrum_snap_set_divide_eprom( snap, 0, NULL );
489 for( i = 0; i < SNAPSHOT_DIVIDE_PAGES; i++ )
490 libspectrum_snap_set_divide_ram( snap, i, NULL );
491
492 /* DivMMC status */
493 libspectrum_snap_set_divmmc_active( snap, 0 );
494 libspectrum_snap_set_divmmc_eprom_writeprotect( snap, 0 );
495 libspectrum_snap_set_divmmc_paged( snap, 0 );
496 libspectrum_snap_set_divmmc_control( snap, 0 );
497 libspectrum_snap_set_divmmc_pages( snap, 0 );
498 libspectrum_snap_set_divmmc_eprom( snap, 0, NULL );
499 for( i = 0; i < SNAPSHOT_DIVMMC_PAGES; i++ )
500 libspectrum_snap_set_divmmc_ram( snap, i, NULL );
501
502 /* Fuller box status */
503 libspectrum_snap_set_fuller_box_active( snap, 0 );
504
505 /* Melodik status */
506 libspectrum_snap_set_melodik_active( snap, 0 );
507
508 /* Cheetah SpecDrum status */
509 libspectrum_snap_set_specdrum_active( snap, 0 );
510 libspectrum_snap_set_specdrum_dac( snap, 0 );
511
512 /* Spectranet status */
513 libspectrum_snap_set_spectranet_active( snap, 0 );
514 libspectrum_snap_set_spectranet_paged( snap, 0 );
515 libspectrum_snap_set_spectranet_paged_via_io( snap, 0 );
516 libspectrum_snap_set_spectranet_nmi_flipflop( snap, 0 );
517 libspectrum_snap_set_spectranet_programmable_trap_active( snap, 0 );
518 libspectrum_snap_set_spectranet_programmable_trap_msb( snap, 0 );
519 libspectrum_snap_set_spectranet_all_traps_disabled( snap, 0 );
520 libspectrum_snap_set_spectranet_rst8_trap_disabled( snap, 0 );
521 libspectrum_snap_set_spectranet_deny_downstream_a15( snap, 0 );
522 libspectrum_snap_set_spectranet_page_a( snap, 0 );
523 libspectrum_snap_set_spectranet_page_b( snap, 0 );
524 libspectrum_snap_set_spectranet_programmable_trap( snap, 0 );
525 libspectrum_snap_set_spectranet_w5100( snap, 0, NULL );
526 libspectrum_snap_set_spectranet_flash( snap, 0, NULL );
527 libspectrum_snap_set_spectranet_ram( snap, 0, NULL );
528
529 /* Timings emulation */
530 libspectrum_snap_set_late_timings( snap, 0 );
531
532 /* Printer emulation */
533 libspectrum_snap_set_zx_printer_active( snap, 0 );
534
535 /* uSource emulation */
536 libspectrum_snap_set_usource_active( snap, 0 );
537 libspectrum_snap_set_usource_paged( snap, 0 );
538 libspectrum_snap_set_usource_custom_rom( snap, 0 );
539 libspectrum_snap_set_usource_rom( snap, 0, NULL );
540 libspectrum_snap_set_usource_rom_length( snap, 0, 0 );
541
542 /* DISCiPLE emulation */
543 libspectrum_snap_set_disciple_active( snap, 0 );
544 libspectrum_snap_set_disciple_paged( snap, 0 );
545 libspectrum_snap_set_disciple_inhibit_button( snap, 0 );
546 libspectrum_snap_set_disciple_drive_count( snap, 0 );
547 libspectrum_snap_set_disciple_custom_rom( snap, 0 );
548 libspectrum_snap_set_disciple_direction( snap, 0 );
549 libspectrum_snap_set_disciple_control( snap, 0 );
550 libspectrum_snap_set_disciple_track( snap, 0 );
551 libspectrum_snap_set_disciple_sector( snap, 0 );
552 libspectrum_snap_set_disciple_data( snap, 0 );
553 libspectrum_snap_set_disciple_status( snap, 0 );
554 libspectrum_snap_set_disciple_rom( snap, 0, NULL );
555 libspectrum_snap_set_disciple_rom_length( snap, 0, 0 );
556 libspectrum_snap_set_disciple_ram( snap, 0, NULL );
557
558 /* Didaktik 80 MDOS 1 emulation */
559 libspectrum_snap_set_didaktik80_active( snap, 0 );
560 libspectrum_snap_set_didaktik80_paged( snap, 0 );
561 libspectrum_snap_set_didaktik80_drive_count( snap, 0 );
562 libspectrum_snap_set_didaktik80_custom_rom( snap, 0 );
563 libspectrum_snap_set_didaktik80_direction( snap, 0 );
564 libspectrum_snap_set_didaktik80_aux( snap, 0 );
565 libspectrum_snap_set_didaktik80_track( snap, 0 );
566 libspectrum_snap_set_didaktik80_sector( snap, 0 );
567 libspectrum_snap_set_didaktik80_data( snap, 0 );
568 libspectrum_snap_set_didaktik80_status( snap, 0 );
569 libspectrum_snap_set_didaktik80_rom( snap, 0, NULL );
570 libspectrum_snap_set_didaktik80_rom_length( snap, 0, 0 );
571 libspectrum_snap_set_didaktik80_ram( snap, 0, NULL );
572
573 /* Covox status */
574 libspectrum_snap_set_covox_active( snap, 0 );
575 libspectrum_snap_set_covox_dac( snap, 0 );
576
577 /* ULAplus emulation */
578 libspectrum_snap_set_ulaplus_active( snap, 0 );
579 libspectrum_snap_set_ulaplus_palette_enabled( snap, 0 );
580 libspectrum_snap_set_ulaplus_current_register( snap, 0 );
581 libspectrum_snap_set_ulaplus_palette( snap, 0, NULL );
582 libspectrum_snap_set_ulaplus_ff_register( snap, 0 );
583
584 /* Multiface One/128/3 emulation */
585 libspectrum_snap_set_multiface_active( snap, 0 );
586 libspectrum_snap_set_multiface_paged( snap, 0 );
587 libspectrum_snap_set_multiface_model_one( snap, 0 );
588 libspectrum_snap_set_multiface_model_128( snap, 0 );
589 libspectrum_snap_set_multiface_model_3( snap, 0 );
590 libspectrum_snap_set_multiface_disabled( snap, 0 );
591 libspectrum_snap_set_multiface_software_lockout( snap, 0 );
592 libspectrum_snap_set_multiface_red_button_disabled( snap, 0 );
593 libspectrum_snap_set_multiface_ram( snap, 0, NULL );
594 libspectrum_snap_set_multiface_ram_length( snap, 0, 0 );
595
596 /* ZXMMC status */
597 libspectrum_snap_set_zxmmc_active( snap, 0 );
598
599 /* TTX2000S status */
600 libspectrum_snap_set_ttx2000s_active( snap, 0 );
601
602 return snap;
603 }
604
605 /* Free all memory used by a libspectrum_snap structure (destructor...) */
606 libspectrum_error
libspectrum_snap_free(libspectrum_snap * snap)607 libspectrum_snap_free( libspectrum_snap *snap )
608 {
609 size_t i;
610
611 for( i = 0; i < 4; i++ )
612 libspectrum_free( libspectrum_snap_roms( snap, i ) );
613
614 for( i = 0; i < SNAPSHOT_RAM_PAGES; i++ )
615 libspectrum_free( libspectrum_snap_pages( snap, i ) );
616
617 for( i = 0; i < SNAPSHOT_SLT_PAGES; i++ )
618 libspectrum_free( libspectrum_snap_slt( snap, i ) );
619 libspectrum_free( libspectrum_snap_slt_screen( snap ) );
620
621 libspectrum_free( libspectrum_snap_interface1_rom( snap, 0 ) );
622
623 libspectrum_free( libspectrum_snap_beta_rom( snap, 0 ) );
624
625 libspectrum_free( libspectrum_snap_plusd_rom( snap, 0 ) );
626 libspectrum_free( libspectrum_snap_plusd_ram( snap, 0 ) );
627
628 libspectrum_free( libspectrum_snap_opus_rom( snap, 0 ) );
629 libspectrum_free( libspectrum_snap_opus_ram( snap, 0 ) );
630
631 for( i = 0; i < SNAPSHOT_ZXATASP_PAGES; i++ )
632 libspectrum_free( libspectrum_snap_zxatasp_ram( snap, i ) );
633
634 for( i = 0; i < SNAPSHOT_ZXCF_PAGES; i++ )
635 libspectrum_free( libspectrum_snap_zxcf_ram( snap, i ) );
636
637 libspectrum_free( libspectrum_snap_interface2_rom( snap, 0 ) );
638
639 for( i = 0; i < SNAPSHOT_DOCK_EXROM_PAGES; i++ )
640 libspectrum_free( libspectrum_snap_exrom_cart( snap, i ) );
641 for( i = 0; i < SNAPSHOT_DOCK_EXROM_PAGES; i++ )
642 libspectrum_free( libspectrum_snap_dock_cart( snap, i ) );
643
644 libspectrum_free( libspectrum_snap_divide_eprom( snap, 0 ) );
645 for( i = 0; i < SNAPSHOT_DIVIDE_PAGES; i++ )
646 libspectrum_free( libspectrum_snap_divide_ram( snap, i ) );
647
648 libspectrum_free( libspectrum_snap_divmmc_eprom( snap, 0 ) );
649 for( i = 0; i < SNAPSHOT_DIVMMC_PAGES; i++ )
650 libspectrum_free( libspectrum_snap_divmmc_ram( snap, i ) );
651
652 libspectrum_free( libspectrum_snap_spectranet_w5100( snap, 0 ) );
653 libspectrum_free( libspectrum_snap_spectranet_flash( snap, 0 ) );
654 libspectrum_free( libspectrum_snap_spectranet_ram( snap, 0 ) );
655
656 libspectrum_free( libspectrum_snap_usource_rom( snap, 0 ) );
657
658 libspectrum_free( libspectrum_snap_disciple_rom( snap, 0 ) );
659 libspectrum_free( libspectrum_snap_disciple_ram( snap, 0 ) );
660
661 libspectrum_free( libspectrum_snap_didaktik80_rom( snap, 0 ) );
662 libspectrum_free( libspectrum_snap_didaktik80_ram( snap, 0 ) );
663
664 libspectrum_free( libspectrum_snap_ulaplus_palette( snap, 0 ) );
665
666 libspectrum_free( libspectrum_snap_multiface_ram( snap, 0 ) );
667
668 libspectrum_free( snap );
669
670 return LIBSPECTRUM_ERROR_NONE;
671 }
672
673
674 libspectrum_machine
libspectrum_snap_machine(libspectrum_snap * snap)675 libspectrum_snap_machine( libspectrum_snap *snap )
676 {
677 return snap->machine;
678 }
679
680 void
libspectrum_snap_set_machine(libspectrum_snap * snap,libspectrum_machine machine)681 libspectrum_snap_set_machine( libspectrum_snap *snap, libspectrum_machine machine )
682 {
683 snap->machine = machine;
684 }
685
686 libspectrum_byte
libspectrum_snap_a(libspectrum_snap * snap)687 libspectrum_snap_a( libspectrum_snap *snap )
688 {
689 return snap->a;
690 }
691
692 void
libspectrum_snap_set_a(libspectrum_snap * snap,libspectrum_byte a)693 libspectrum_snap_set_a( libspectrum_snap *snap, libspectrum_byte a )
694 {
695 snap->a = a;
696 }
697
698 libspectrum_byte
libspectrum_snap_f(libspectrum_snap * snap)699 libspectrum_snap_f( libspectrum_snap *snap )
700 {
701 return snap->f;
702 }
703
704 void
libspectrum_snap_set_f(libspectrum_snap * snap,libspectrum_byte f)705 libspectrum_snap_set_f( libspectrum_snap *snap, libspectrum_byte f )
706 {
707 snap->f = f;
708 }
709
710 libspectrum_word
libspectrum_snap_bc(libspectrum_snap * snap)711 libspectrum_snap_bc( libspectrum_snap *snap )
712 {
713 return snap->bc;
714 }
715
716 void
libspectrum_snap_set_bc(libspectrum_snap * snap,libspectrum_word bc)717 libspectrum_snap_set_bc( libspectrum_snap *snap, libspectrum_word bc )
718 {
719 snap->bc = bc;
720 }
721
722 libspectrum_word
libspectrum_snap_de(libspectrum_snap * snap)723 libspectrum_snap_de( libspectrum_snap *snap )
724 {
725 return snap->de;
726 }
727
728 void
libspectrum_snap_set_de(libspectrum_snap * snap,libspectrum_word de)729 libspectrum_snap_set_de( libspectrum_snap *snap, libspectrum_word de )
730 {
731 snap->de = de;
732 }
733
734 libspectrum_word
libspectrum_snap_hl(libspectrum_snap * snap)735 libspectrum_snap_hl( libspectrum_snap *snap )
736 {
737 return snap->hl;
738 }
739
740 void
libspectrum_snap_set_hl(libspectrum_snap * snap,libspectrum_word hl)741 libspectrum_snap_set_hl( libspectrum_snap *snap, libspectrum_word hl )
742 {
743 snap->hl = hl;
744 }
745
746 libspectrum_byte
libspectrum_snap_a_(libspectrum_snap * snap)747 libspectrum_snap_a_( libspectrum_snap *snap )
748 {
749 return snap->a_;
750 }
751
752 void
libspectrum_snap_set_a_(libspectrum_snap * snap,libspectrum_byte a_)753 libspectrum_snap_set_a_( libspectrum_snap *snap, libspectrum_byte a_ )
754 {
755 snap->a_ = a_;
756 }
757
758 libspectrum_byte
libspectrum_snap_f_(libspectrum_snap * snap)759 libspectrum_snap_f_( libspectrum_snap *snap )
760 {
761 return snap->f_;
762 }
763
764 void
libspectrum_snap_set_f_(libspectrum_snap * snap,libspectrum_byte f_)765 libspectrum_snap_set_f_( libspectrum_snap *snap, libspectrum_byte f_ )
766 {
767 snap->f_ = f_;
768 }
769
770 libspectrum_word
libspectrum_snap_bc_(libspectrum_snap * snap)771 libspectrum_snap_bc_( libspectrum_snap *snap )
772 {
773 return snap->bc_;
774 }
775
776 void
libspectrum_snap_set_bc_(libspectrum_snap * snap,libspectrum_word bc_)777 libspectrum_snap_set_bc_( libspectrum_snap *snap, libspectrum_word bc_ )
778 {
779 snap->bc_ = bc_;
780 }
781
782 libspectrum_word
libspectrum_snap_de_(libspectrum_snap * snap)783 libspectrum_snap_de_( libspectrum_snap *snap )
784 {
785 return snap->de_;
786 }
787
788 void
libspectrum_snap_set_de_(libspectrum_snap * snap,libspectrum_word de_)789 libspectrum_snap_set_de_( libspectrum_snap *snap, libspectrum_word de_ )
790 {
791 snap->de_ = de_;
792 }
793
794 libspectrum_word
libspectrum_snap_hl_(libspectrum_snap * snap)795 libspectrum_snap_hl_( libspectrum_snap *snap )
796 {
797 return snap->hl_;
798 }
799
800 void
libspectrum_snap_set_hl_(libspectrum_snap * snap,libspectrum_word hl_)801 libspectrum_snap_set_hl_( libspectrum_snap *snap, libspectrum_word hl_ )
802 {
803 snap->hl_ = hl_;
804 }
805
806 libspectrum_word
libspectrum_snap_ix(libspectrum_snap * snap)807 libspectrum_snap_ix( libspectrum_snap *snap )
808 {
809 return snap->ix;
810 }
811
812 void
libspectrum_snap_set_ix(libspectrum_snap * snap,libspectrum_word ix)813 libspectrum_snap_set_ix( libspectrum_snap *snap, libspectrum_word ix )
814 {
815 snap->ix = ix;
816 }
817
818 libspectrum_word
libspectrum_snap_iy(libspectrum_snap * snap)819 libspectrum_snap_iy( libspectrum_snap *snap )
820 {
821 return snap->iy;
822 }
823
824 void
libspectrum_snap_set_iy(libspectrum_snap * snap,libspectrum_word iy)825 libspectrum_snap_set_iy( libspectrum_snap *snap, libspectrum_word iy )
826 {
827 snap->iy = iy;
828 }
829
830 libspectrum_byte
libspectrum_snap_i(libspectrum_snap * snap)831 libspectrum_snap_i( libspectrum_snap *snap )
832 {
833 return snap->i;
834 }
835
836 void
libspectrum_snap_set_i(libspectrum_snap * snap,libspectrum_byte i)837 libspectrum_snap_set_i( libspectrum_snap *snap, libspectrum_byte i )
838 {
839 snap->i = i;
840 }
841
842 libspectrum_byte
libspectrum_snap_r(libspectrum_snap * snap)843 libspectrum_snap_r( libspectrum_snap *snap )
844 {
845 return snap->r;
846 }
847
848 void
libspectrum_snap_set_r(libspectrum_snap * snap,libspectrum_byte r)849 libspectrum_snap_set_r( libspectrum_snap *snap, libspectrum_byte r )
850 {
851 snap->r = r;
852 }
853
854 libspectrum_word
libspectrum_snap_sp(libspectrum_snap * snap)855 libspectrum_snap_sp( libspectrum_snap *snap )
856 {
857 return snap->sp;
858 }
859
860 void
libspectrum_snap_set_sp(libspectrum_snap * snap,libspectrum_word sp)861 libspectrum_snap_set_sp( libspectrum_snap *snap, libspectrum_word sp )
862 {
863 snap->sp = sp;
864 }
865
866 libspectrum_word
libspectrum_snap_pc(libspectrum_snap * snap)867 libspectrum_snap_pc( libspectrum_snap *snap )
868 {
869 return snap->pc;
870 }
871
872 void
libspectrum_snap_set_pc(libspectrum_snap * snap,libspectrum_word pc)873 libspectrum_snap_set_pc( libspectrum_snap *snap, libspectrum_word pc )
874 {
875 snap->pc = pc;
876 }
877
878 libspectrum_word
libspectrum_snap_memptr(libspectrum_snap * snap)879 libspectrum_snap_memptr( libspectrum_snap *snap )
880 {
881 return snap->memptr;
882 }
883
884 void
libspectrum_snap_set_memptr(libspectrum_snap * snap,libspectrum_word memptr)885 libspectrum_snap_set_memptr( libspectrum_snap *snap, libspectrum_word memptr )
886 {
887 snap->memptr = memptr;
888 }
889
890 libspectrum_byte
libspectrum_snap_iff1(libspectrum_snap * snap)891 libspectrum_snap_iff1( libspectrum_snap *snap )
892 {
893 return snap->iff1;
894 }
895
896 void
libspectrum_snap_set_iff1(libspectrum_snap * snap,libspectrum_byte iff1)897 libspectrum_snap_set_iff1( libspectrum_snap *snap, libspectrum_byte iff1 )
898 {
899 snap->iff1 = iff1;
900 }
901
902 libspectrum_byte
libspectrum_snap_iff2(libspectrum_snap * snap)903 libspectrum_snap_iff2( libspectrum_snap *snap )
904 {
905 return snap->iff2;
906 }
907
908 void
libspectrum_snap_set_iff2(libspectrum_snap * snap,libspectrum_byte iff2)909 libspectrum_snap_set_iff2( libspectrum_snap *snap, libspectrum_byte iff2 )
910 {
911 snap->iff2 = iff2;
912 }
913
914 libspectrum_byte
libspectrum_snap_im(libspectrum_snap * snap)915 libspectrum_snap_im( libspectrum_snap *snap )
916 {
917 return snap->im;
918 }
919
920 void
libspectrum_snap_set_im(libspectrum_snap * snap,libspectrum_byte im)921 libspectrum_snap_set_im( libspectrum_snap *snap, libspectrum_byte im )
922 {
923 snap->im = im;
924 }
925
926 libspectrum_dword
libspectrum_snap_tstates(libspectrum_snap * snap)927 libspectrum_snap_tstates( libspectrum_snap *snap )
928 {
929 return snap->tstates;
930 }
931
932 void
libspectrum_snap_set_tstates(libspectrum_snap * snap,libspectrum_dword tstates)933 libspectrum_snap_set_tstates( libspectrum_snap *snap, libspectrum_dword tstates )
934 {
935 snap->tstates = tstates;
936 }
937
938 int
libspectrum_snap_halted(libspectrum_snap * snap)939 libspectrum_snap_halted( libspectrum_snap *snap )
940 {
941 return snap->halted;
942 }
943
944 void
libspectrum_snap_set_halted(libspectrum_snap * snap,int halted)945 libspectrum_snap_set_halted( libspectrum_snap *snap, int halted )
946 {
947 snap->halted = halted;
948 }
949
950 int
libspectrum_snap_last_instruction_ei(libspectrum_snap * snap)951 libspectrum_snap_last_instruction_ei( libspectrum_snap *snap )
952 {
953 return snap->last_instruction_ei;
954 }
955
956 void
libspectrum_snap_set_last_instruction_ei(libspectrum_snap * snap,int last_instruction_ei)957 libspectrum_snap_set_last_instruction_ei( libspectrum_snap *snap, int last_instruction_ei )
958 {
959 snap->last_instruction_ei = last_instruction_ei;
960 }
961
962 int
libspectrum_snap_last_instruction_set_f(libspectrum_snap * snap)963 libspectrum_snap_last_instruction_set_f( libspectrum_snap *snap )
964 {
965 return snap->last_instruction_set_f;
966 }
967
968 void
libspectrum_snap_set_last_instruction_set_f(libspectrum_snap * snap,int last_instruction_set_f)969 libspectrum_snap_set_last_instruction_set_f( libspectrum_snap *snap, int last_instruction_set_f )
970 {
971 snap->last_instruction_set_f = last_instruction_set_f;
972 }
973
974 int
libspectrum_snap_custom_rom(libspectrum_snap * snap)975 libspectrum_snap_custom_rom( libspectrum_snap *snap )
976 {
977 return snap->custom_rom;
978 }
979
980 void
libspectrum_snap_set_custom_rom(libspectrum_snap * snap,int custom_rom)981 libspectrum_snap_set_custom_rom( libspectrum_snap *snap, int custom_rom )
982 {
983 snap->custom_rom = custom_rom;
984 }
985
986 size_t
libspectrum_snap_custom_rom_pages(libspectrum_snap * snap)987 libspectrum_snap_custom_rom_pages( libspectrum_snap *snap )
988 {
989 return snap->custom_rom_pages;
990 }
991
992 void
libspectrum_snap_set_custom_rom_pages(libspectrum_snap * snap,size_t custom_rom_pages)993 libspectrum_snap_set_custom_rom_pages( libspectrum_snap *snap, size_t custom_rom_pages )
994 {
995 snap->custom_rom_pages = custom_rom_pages;
996 }
997
998 libspectrum_byte*
libspectrum_snap_roms(libspectrum_snap * snap,int idx)999 libspectrum_snap_roms( libspectrum_snap *snap, int idx )
1000 {
1001 return snap->roms[idx];
1002 }
1003
1004 void
libspectrum_snap_set_roms(libspectrum_snap * snap,int idx,libspectrum_byte * roms)1005 libspectrum_snap_set_roms( libspectrum_snap *snap, int idx, libspectrum_byte* roms )
1006 {
1007 snap->roms[idx] = roms;
1008 }
1009
1010 size_t
libspectrum_snap_rom_length(libspectrum_snap * snap,int idx)1011 libspectrum_snap_rom_length( libspectrum_snap *snap, int idx )
1012 {
1013 return snap->rom_length[idx];
1014 }
1015
1016 void
libspectrum_snap_set_rom_length(libspectrum_snap * snap,int idx,size_t rom_length)1017 libspectrum_snap_set_rom_length( libspectrum_snap *snap, int idx, size_t rom_length )
1018 {
1019 snap->rom_length[idx] = rom_length;
1020 }
1021
1022 libspectrum_byte*
libspectrum_snap_pages(libspectrum_snap * snap,int idx)1023 libspectrum_snap_pages( libspectrum_snap *snap, int idx )
1024 {
1025 return snap->pages[idx];
1026 }
1027
1028 void
libspectrum_snap_set_pages(libspectrum_snap * snap,int idx,libspectrum_byte * pages)1029 libspectrum_snap_set_pages( libspectrum_snap *snap, int idx, libspectrum_byte* pages )
1030 {
1031 snap->pages[idx] = pages;
1032 }
1033
1034 libspectrum_byte*
libspectrum_snap_slt(libspectrum_snap * snap,int idx)1035 libspectrum_snap_slt( libspectrum_snap *snap, int idx )
1036 {
1037 return snap->slt[idx];
1038 }
1039
1040 void
libspectrum_snap_set_slt(libspectrum_snap * snap,int idx,libspectrum_byte * slt)1041 libspectrum_snap_set_slt( libspectrum_snap *snap, int idx, libspectrum_byte* slt )
1042 {
1043 snap->slt[idx] = slt;
1044 }
1045
1046 size_t
libspectrum_snap_slt_length(libspectrum_snap * snap,int idx)1047 libspectrum_snap_slt_length( libspectrum_snap *snap, int idx )
1048 {
1049 return snap->slt_length[idx];
1050 }
1051
1052 void
libspectrum_snap_set_slt_length(libspectrum_snap * snap,int idx,size_t slt_length)1053 libspectrum_snap_set_slt_length( libspectrum_snap *snap, int idx, size_t slt_length )
1054 {
1055 snap->slt_length[idx] = slt_length;
1056 }
1057
1058 libspectrum_byte*
libspectrum_snap_slt_screen(libspectrum_snap * snap)1059 libspectrum_snap_slt_screen( libspectrum_snap *snap )
1060 {
1061 return snap->slt_screen;
1062 }
1063
1064 void
libspectrum_snap_set_slt_screen(libspectrum_snap * snap,libspectrum_byte * slt_screen)1065 libspectrum_snap_set_slt_screen( libspectrum_snap *snap, libspectrum_byte* slt_screen )
1066 {
1067 snap->slt_screen = slt_screen;
1068 }
1069
1070 int
libspectrum_snap_slt_screen_level(libspectrum_snap * snap)1071 libspectrum_snap_slt_screen_level( libspectrum_snap *snap )
1072 {
1073 return snap->slt_screen_level;
1074 }
1075
1076 void
libspectrum_snap_set_slt_screen_level(libspectrum_snap * snap,int slt_screen_level)1077 libspectrum_snap_set_slt_screen_level( libspectrum_snap *snap, int slt_screen_level )
1078 {
1079 snap->slt_screen_level = slt_screen_level;
1080 }
1081
1082 libspectrum_byte
libspectrum_snap_out_ula(libspectrum_snap * snap)1083 libspectrum_snap_out_ula( libspectrum_snap *snap )
1084 {
1085 return snap->out_ula;
1086 }
1087
1088 void
libspectrum_snap_set_out_ula(libspectrum_snap * snap,libspectrum_byte out_ula)1089 libspectrum_snap_set_out_ula( libspectrum_snap *snap, libspectrum_byte out_ula )
1090 {
1091 snap->out_ula = out_ula;
1092 }
1093
1094 libspectrum_byte
libspectrum_snap_out_128_memoryport(libspectrum_snap * snap)1095 libspectrum_snap_out_128_memoryport( libspectrum_snap *snap )
1096 {
1097 return snap->out_128_memoryport;
1098 }
1099
1100 void
libspectrum_snap_set_out_128_memoryport(libspectrum_snap * snap,libspectrum_byte out_128_memoryport)1101 libspectrum_snap_set_out_128_memoryport( libspectrum_snap *snap, libspectrum_byte out_128_memoryport )
1102 {
1103 snap->out_128_memoryport = out_128_memoryport;
1104 }
1105
1106 libspectrum_byte
libspectrum_snap_out_plus3_memoryport(libspectrum_snap * snap)1107 libspectrum_snap_out_plus3_memoryport( libspectrum_snap *snap )
1108 {
1109 return snap->out_plus3_memoryport;
1110 }
1111
1112 void
libspectrum_snap_set_out_plus3_memoryport(libspectrum_snap * snap,libspectrum_byte out_plus3_memoryport)1113 libspectrum_snap_set_out_plus3_memoryport( libspectrum_snap *snap, libspectrum_byte out_plus3_memoryport )
1114 {
1115 snap->out_plus3_memoryport = out_plus3_memoryport;
1116 }
1117
1118 libspectrum_byte
libspectrum_snap_out_ay_registerport(libspectrum_snap * snap)1119 libspectrum_snap_out_ay_registerport( libspectrum_snap *snap )
1120 {
1121 return snap->out_ay_registerport;
1122 }
1123
1124 void
libspectrum_snap_set_out_ay_registerport(libspectrum_snap * snap,libspectrum_byte out_ay_registerport)1125 libspectrum_snap_set_out_ay_registerport( libspectrum_snap *snap, libspectrum_byte out_ay_registerport )
1126 {
1127 snap->out_ay_registerport = out_ay_registerport;
1128 }
1129
1130 libspectrum_byte
libspectrum_snap_ay_registers(libspectrum_snap * snap,int idx)1131 libspectrum_snap_ay_registers( libspectrum_snap *snap, int idx )
1132 {
1133 return snap->ay_registers[idx];
1134 }
1135
1136 void
libspectrum_snap_set_ay_registers(libspectrum_snap * snap,int idx,libspectrum_byte ay_registers)1137 libspectrum_snap_set_ay_registers( libspectrum_snap *snap, int idx, libspectrum_byte ay_registers )
1138 {
1139 snap->ay_registers[idx] = ay_registers;
1140 }
1141
1142 libspectrum_byte
libspectrum_snap_out_scld_hsr(libspectrum_snap * snap)1143 libspectrum_snap_out_scld_hsr( libspectrum_snap *snap )
1144 {
1145 return snap->out_scld_hsr;
1146 }
1147
1148 void
libspectrum_snap_set_out_scld_hsr(libspectrum_snap * snap,libspectrum_byte out_scld_hsr)1149 libspectrum_snap_set_out_scld_hsr( libspectrum_snap *snap, libspectrum_byte out_scld_hsr )
1150 {
1151 snap->out_scld_hsr = out_scld_hsr;
1152 }
1153
1154 libspectrum_byte
libspectrum_snap_out_scld_dec(libspectrum_snap * snap)1155 libspectrum_snap_out_scld_dec( libspectrum_snap *snap )
1156 {
1157 return snap->out_scld_dec;
1158 }
1159
1160 void
libspectrum_snap_set_out_scld_dec(libspectrum_snap * snap,libspectrum_byte out_scld_dec)1161 libspectrum_snap_set_out_scld_dec( libspectrum_snap *snap, libspectrum_byte out_scld_dec )
1162 {
1163 snap->out_scld_dec = out_scld_dec;
1164 }
1165
1166 int
libspectrum_snap_interface1_active(libspectrum_snap * snap)1167 libspectrum_snap_interface1_active( libspectrum_snap *snap )
1168 {
1169 return snap->interface1_active;
1170 }
1171
1172 void
libspectrum_snap_set_interface1_active(libspectrum_snap * snap,int interface1_active)1173 libspectrum_snap_set_interface1_active( libspectrum_snap *snap, int interface1_active )
1174 {
1175 snap->interface1_active = interface1_active;
1176 }
1177
1178 int
libspectrum_snap_interface1_paged(libspectrum_snap * snap)1179 libspectrum_snap_interface1_paged( libspectrum_snap *snap )
1180 {
1181 return snap->interface1_paged;
1182 }
1183
1184 void
libspectrum_snap_set_interface1_paged(libspectrum_snap * snap,int interface1_paged)1185 libspectrum_snap_set_interface1_paged( libspectrum_snap *snap, int interface1_paged )
1186 {
1187 snap->interface1_paged = interface1_paged;
1188 }
1189
1190 int
libspectrum_snap_interface1_drive_count(libspectrum_snap * snap)1191 libspectrum_snap_interface1_drive_count( libspectrum_snap *snap )
1192 {
1193 return snap->interface1_drive_count;
1194 }
1195
1196 void
libspectrum_snap_set_interface1_drive_count(libspectrum_snap * snap,int interface1_drive_count)1197 libspectrum_snap_set_interface1_drive_count( libspectrum_snap *snap, int interface1_drive_count )
1198 {
1199 snap->interface1_drive_count = interface1_drive_count;
1200 }
1201
1202 int
libspectrum_snap_interface1_custom_rom(libspectrum_snap * snap)1203 libspectrum_snap_interface1_custom_rom( libspectrum_snap *snap )
1204 {
1205 return snap->interface1_custom_rom;
1206 }
1207
1208 void
libspectrum_snap_set_interface1_custom_rom(libspectrum_snap * snap,int interface1_custom_rom)1209 libspectrum_snap_set_interface1_custom_rom( libspectrum_snap *snap, int interface1_custom_rom )
1210 {
1211 snap->interface1_custom_rom = interface1_custom_rom;
1212 }
1213
1214 libspectrum_byte*
libspectrum_snap_interface1_rom(libspectrum_snap * snap,int idx)1215 libspectrum_snap_interface1_rom( libspectrum_snap *snap, int idx )
1216 {
1217 return snap->interface1_rom[idx];
1218 }
1219
1220 void
libspectrum_snap_set_interface1_rom(libspectrum_snap * snap,int idx,libspectrum_byte * interface1_rom)1221 libspectrum_snap_set_interface1_rom( libspectrum_snap *snap, int idx, libspectrum_byte* interface1_rom )
1222 {
1223 snap->interface1_rom[idx] = interface1_rom;
1224 }
1225
1226 size_t
libspectrum_snap_interface1_rom_length(libspectrum_snap * snap,int idx)1227 libspectrum_snap_interface1_rom_length( libspectrum_snap *snap, int idx )
1228 {
1229 return snap->interface1_rom_length[idx];
1230 }
1231
1232 void
libspectrum_snap_set_interface1_rom_length(libspectrum_snap * snap,int idx,size_t interface1_rom_length)1233 libspectrum_snap_set_interface1_rom_length( libspectrum_snap *snap, int idx, size_t interface1_rom_length )
1234 {
1235 snap->interface1_rom_length[idx] = interface1_rom_length;
1236 }
1237
1238 int
libspectrum_snap_beta_active(libspectrum_snap * snap)1239 libspectrum_snap_beta_active( libspectrum_snap *snap )
1240 {
1241 return snap->beta_active;
1242 }
1243
1244 void
libspectrum_snap_set_beta_active(libspectrum_snap * snap,int beta_active)1245 libspectrum_snap_set_beta_active( libspectrum_snap *snap, int beta_active )
1246 {
1247 snap->beta_active = beta_active;
1248 }
1249
1250 int
libspectrum_snap_beta_paged(libspectrum_snap * snap)1251 libspectrum_snap_beta_paged( libspectrum_snap *snap )
1252 {
1253 return snap->beta_paged;
1254 }
1255
1256 void
libspectrum_snap_set_beta_paged(libspectrum_snap * snap,int beta_paged)1257 libspectrum_snap_set_beta_paged( libspectrum_snap *snap, int beta_paged )
1258 {
1259 snap->beta_paged = beta_paged;
1260 }
1261
1262 int
libspectrum_snap_beta_autoboot(libspectrum_snap * snap)1263 libspectrum_snap_beta_autoboot( libspectrum_snap *snap )
1264 {
1265 return snap->beta_autoboot;
1266 }
1267
1268 void
libspectrum_snap_set_beta_autoboot(libspectrum_snap * snap,int beta_autoboot)1269 libspectrum_snap_set_beta_autoboot( libspectrum_snap *snap, int beta_autoboot )
1270 {
1271 snap->beta_autoboot = beta_autoboot;
1272 }
1273
1274 int
libspectrum_snap_beta_drive_count(libspectrum_snap * snap)1275 libspectrum_snap_beta_drive_count( libspectrum_snap *snap )
1276 {
1277 return snap->beta_drive_count;
1278 }
1279
1280 void
libspectrum_snap_set_beta_drive_count(libspectrum_snap * snap,int beta_drive_count)1281 libspectrum_snap_set_beta_drive_count( libspectrum_snap *snap, int beta_drive_count )
1282 {
1283 snap->beta_drive_count = beta_drive_count;
1284 }
1285
1286 int
libspectrum_snap_beta_custom_rom(libspectrum_snap * snap)1287 libspectrum_snap_beta_custom_rom( libspectrum_snap *snap )
1288 {
1289 return snap->beta_custom_rom;
1290 }
1291
1292 void
libspectrum_snap_set_beta_custom_rom(libspectrum_snap * snap,int beta_custom_rom)1293 libspectrum_snap_set_beta_custom_rom( libspectrum_snap *snap, int beta_custom_rom )
1294 {
1295 snap->beta_custom_rom = beta_custom_rom;
1296 }
1297
1298 int
libspectrum_snap_beta_direction(libspectrum_snap * snap)1299 libspectrum_snap_beta_direction( libspectrum_snap *snap )
1300 {
1301 return snap->beta_direction;
1302 }
1303
1304 void
libspectrum_snap_set_beta_direction(libspectrum_snap * snap,int beta_direction)1305 libspectrum_snap_set_beta_direction( libspectrum_snap *snap, int beta_direction )
1306 {
1307 snap->beta_direction = beta_direction;
1308 }
1309
1310 libspectrum_byte
libspectrum_snap_beta_system(libspectrum_snap * snap)1311 libspectrum_snap_beta_system( libspectrum_snap *snap )
1312 {
1313 return snap->beta_system;
1314 }
1315
1316 void
libspectrum_snap_set_beta_system(libspectrum_snap * snap,libspectrum_byte beta_system)1317 libspectrum_snap_set_beta_system( libspectrum_snap *snap, libspectrum_byte beta_system )
1318 {
1319 snap->beta_system = beta_system;
1320 }
1321
1322 libspectrum_byte
libspectrum_snap_beta_track(libspectrum_snap * snap)1323 libspectrum_snap_beta_track( libspectrum_snap *snap )
1324 {
1325 return snap->beta_track;
1326 }
1327
1328 void
libspectrum_snap_set_beta_track(libspectrum_snap * snap,libspectrum_byte beta_track)1329 libspectrum_snap_set_beta_track( libspectrum_snap *snap, libspectrum_byte beta_track )
1330 {
1331 snap->beta_track = beta_track;
1332 }
1333
1334 libspectrum_byte
libspectrum_snap_beta_sector(libspectrum_snap * snap)1335 libspectrum_snap_beta_sector( libspectrum_snap *snap )
1336 {
1337 return snap->beta_sector;
1338 }
1339
1340 void
libspectrum_snap_set_beta_sector(libspectrum_snap * snap,libspectrum_byte beta_sector)1341 libspectrum_snap_set_beta_sector( libspectrum_snap *snap, libspectrum_byte beta_sector )
1342 {
1343 snap->beta_sector = beta_sector;
1344 }
1345
1346 libspectrum_byte
libspectrum_snap_beta_data(libspectrum_snap * snap)1347 libspectrum_snap_beta_data( libspectrum_snap *snap )
1348 {
1349 return snap->beta_data;
1350 }
1351
1352 void
libspectrum_snap_set_beta_data(libspectrum_snap * snap,libspectrum_byte beta_data)1353 libspectrum_snap_set_beta_data( libspectrum_snap *snap, libspectrum_byte beta_data )
1354 {
1355 snap->beta_data = beta_data;
1356 }
1357
1358 libspectrum_byte
libspectrum_snap_beta_status(libspectrum_snap * snap)1359 libspectrum_snap_beta_status( libspectrum_snap *snap )
1360 {
1361 return snap->beta_status;
1362 }
1363
1364 void
libspectrum_snap_set_beta_status(libspectrum_snap * snap,libspectrum_byte beta_status)1365 libspectrum_snap_set_beta_status( libspectrum_snap *snap, libspectrum_byte beta_status )
1366 {
1367 snap->beta_status = beta_status;
1368 }
1369
1370 libspectrum_byte*
libspectrum_snap_beta_rom(libspectrum_snap * snap,int idx)1371 libspectrum_snap_beta_rom( libspectrum_snap *snap, int idx )
1372 {
1373 return snap->beta_rom[idx];
1374 }
1375
1376 void
libspectrum_snap_set_beta_rom(libspectrum_snap * snap,int idx,libspectrum_byte * beta_rom)1377 libspectrum_snap_set_beta_rom( libspectrum_snap *snap, int idx, libspectrum_byte* beta_rom )
1378 {
1379 snap->beta_rom[idx] = beta_rom;
1380 }
1381
1382 int
libspectrum_snap_plusd_active(libspectrum_snap * snap)1383 libspectrum_snap_plusd_active( libspectrum_snap *snap )
1384 {
1385 return snap->plusd_active;
1386 }
1387
1388 void
libspectrum_snap_set_plusd_active(libspectrum_snap * snap,int plusd_active)1389 libspectrum_snap_set_plusd_active( libspectrum_snap *snap, int plusd_active )
1390 {
1391 snap->plusd_active = plusd_active;
1392 }
1393
1394 int
libspectrum_snap_plusd_paged(libspectrum_snap * snap)1395 libspectrum_snap_plusd_paged( libspectrum_snap *snap )
1396 {
1397 return snap->plusd_paged;
1398 }
1399
1400 void
libspectrum_snap_set_plusd_paged(libspectrum_snap * snap,int plusd_paged)1401 libspectrum_snap_set_plusd_paged( libspectrum_snap *snap, int plusd_paged )
1402 {
1403 snap->plusd_paged = plusd_paged;
1404 }
1405
1406 int
libspectrum_snap_plusd_drive_count(libspectrum_snap * snap)1407 libspectrum_snap_plusd_drive_count( libspectrum_snap *snap )
1408 {
1409 return snap->plusd_drive_count;
1410 }
1411
1412 void
libspectrum_snap_set_plusd_drive_count(libspectrum_snap * snap,int plusd_drive_count)1413 libspectrum_snap_set_plusd_drive_count( libspectrum_snap *snap, int plusd_drive_count )
1414 {
1415 snap->plusd_drive_count = plusd_drive_count;
1416 }
1417
1418 int
libspectrum_snap_plusd_custom_rom(libspectrum_snap * snap)1419 libspectrum_snap_plusd_custom_rom( libspectrum_snap *snap )
1420 {
1421 return snap->plusd_custom_rom;
1422 }
1423
1424 void
libspectrum_snap_set_plusd_custom_rom(libspectrum_snap * snap,int plusd_custom_rom)1425 libspectrum_snap_set_plusd_custom_rom( libspectrum_snap *snap, int plusd_custom_rom )
1426 {
1427 snap->plusd_custom_rom = plusd_custom_rom;
1428 }
1429
1430 int
libspectrum_snap_plusd_direction(libspectrum_snap * snap)1431 libspectrum_snap_plusd_direction( libspectrum_snap *snap )
1432 {
1433 return snap->plusd_direction;
1434 }
1435
1436 void
libspectrum_snap_set_plusd_direction(libspectrum_snap * snap,int plusd_direction)1437 libspectrum_snap_set_plusd_direction( libspectrum_snap *snap, int plusd_direction )
1438 {
1439 snap->plusd_direction = plusd_direction;
1440 }
1441
1442 libspectrum_byte
libspectrum_snap_plusd_control(libspectrum_snap * snap)1443 libspectrum_snap_plusd_control( libspectrum_snap *snap )
1444 {
1445 return snap->plusd_control;
1446 }
1447
1448 void
libspectrum_snap_set_plusd_control(libspectrum_snap * snap,libspectrum_byte plusd_control)1449 libspectrum_snap_set_plusd_control( libspectrum_snap *snap, libspectrum_byte plusd_control )
1450 {
1451 snap->plusd_control = plusd_control;
1452 }
1453
1454 libspectrum_byte
libspectrum_snap_plusd_track(libspectrum_snap * snap)1455 libspectrum_snap_plusd_track( libspectrum_snap *snap )
1456 {
1457 return snap->plusd_track;
1458 }
1459
1460 void
libspectrum_snap_set_plusd_track(libspectrum_snap * snap,libspectrum_byte plusd_track)1461 libspectrum_snap_set_plusd_track( libspectrum_snap *snap, libspectrum_byte plusd_track )
1462 {
1463 snap->plusd_track = plusd_track;
1464 }
1465
1466 libspectrum_byte
libspectrum_snap_plusd_sector(libspectrum_snap * snap)1467 libspectrum_snap_plusd_sector( libspectrum_snap *snap )
1468 {
1469 return snap->plusd_sector;
1470 }
1471
1472 void
libspectrum_snap_set_plusd_sector(libspectrum_snap * snap,libspectrum_byte plusd_sector)1473 libspectrum_snap_set_plusd_sector( libspectrum_snap *snap, libspectrum_byte plusd_sector )
1474 {
1475 snap->plusd_sector = plusd_sector;
1476 }
1477
1478 libspectrum_byte
libspectrum_snap_plusd_data(libspectrum_snap * snap)1479 libspectrum_snap_plusd_data( libspectrum_snap *snap )
1480 {
1481 return snap->plusd_data;
1482 }
1483
1484 void
libspectrum_snap_set_plusd_data(libspectrum_snap * snap,libspectrum_byte plusd_data)1485 libspectrum_snap_set_plusd_data( libspectrum_snap *snap, libspectrum_byte plusd_data )
1486 {
1487 snap->plusd_data = plusd_data;
1488 }
1489
1490 libspectrum_byte
libspectrum_snap_plusd_status(libspectrum_snap * snap)1491 libspectrum_snap_plusd_status( libspectrum_snap *snap )
1492 {
1493 return snap->plusd_status;
1494 }
1495
1496 void
libspectrum_snap_set_plusd_status(libspectrum_snap * snap,libspectrum_byte plusd_status)1497 libspectrum_snap_set_plusd_status( libspectrum_snap *snap, libspectrum_byte plusd_status )
1498 {
1499 snap->plusd_status = plusd_status;
1500 }
1501
1502 libspectrum_byte*
libspectrum_snap_plusd_rom(libspectrum_snap * snap,int idx)1503 libspectrum_snap_plusd_rom( libspectrum_snap *snap, int idx )
1504 {
1505 return snap->plusd_rom[idx];
1506 }
1507
1508 void
libspectrum_snap_set_plusd_rom(libspectrum_snap * snap,int idx,libspectrum_byte * plusd_rom)1509 libspectrum_snap_set_plusd_rom( libspectrum_snap *snap, int idx, libspectrum_byte* plusd_rom )
1510 {
1511 snap->plusd_rom[idx] = plusd_rom;
1512 }
1513
1514 libspectrum_byte*
libspectrum_snap_plusd_ram(libspectrum_snap * snap,int idx)1515 libspectrum_snap_plusd_ram( libspectrum_snap *snap, int idx )
1516 {
1517 return snap->plusd_ram[idx];
1518 }
1519
1520 void
libspectrum_snap_set_plusd_ram(libspectrum_snap * snap,int idx,libspectrum_byte * plusd_ram)1521 libspectrum_snap_set_plusd_ram( libspectrum_snap *snap, int idx, libspectrum_byte* plusd_ram )
1522 {
1523 snap->plusd_ram[idx] = plusd_ram;
1524 }
1525
1526 int
libspectrum_snap_opus_active(libspectrum_snap * snap)1527 libspectrum_snap_opus_active( libspectrum_snap *snap )
1528 {
1529 return snap->opus_active;
1530 }
1531
1532 void
libspectrum_snap_set_opus_active(libspectrum_snap * snap,int opus_active)1533 libspectrum_snap_set_opus_active( libspectrum_snap *snap, int opus_active )
1534 {
1535 snap->opus_active = opus_active;
1536 }
1537
1538 int
libspectrum_snap_opus_paged(libspectrum_snap * snap)1539 libspectrum_snap_opus_paged( libspectrum_snap *snap )
1540 {
1541 return snap->opus_paged;
1542 }
1543
1544 void
libspectrum_snap_set_opus_paged(libspectrum_snap * snap,int opus_paged)1545 libspectrum_snap_set_opus_paged( libspectrum_snap *snap, int opus_paged )
1546 {
1547 snap->opus_paged = opus_paged;
1548 }
1549
1550 int
libspectrum_snap_opus_drive_count(libspectrum_snap * snap)1551 libspectrum_snap_opus_drive_count( libspectrum_snap *snap )
1552 {
1553 return snap->opus_drive_count;
1554 }
1555
1556 void
libspectrum_snap_set_opus_drive_count(libspectrum_snap * snap,int opus_drive_count)1557 libspectrum_snap_set_opus_drive_count( libspectrum_snap *snap, int opus_drive_count )
1558 {
1559 snap->opus_drive_count = opus_drive_count;
1560 }
1561
1562 int
libspectrum_snap_opus_custom_rom(libspectrum_snap * snap)1563 libspectrum_snap_opus_custom_rom( libspectrum_snap *snap )
1564 {
1565 return snap->opus_custom_rom;
1566 }
1567
1568 void
libspectrum_snap_set_opus_custom_rom(libspectrum_snap * snap,int opus_custom_rom)1569 libspectrum_snap_set_opus_custom_rom( libspectrum_snap *snap, int opus_custom_rom )
1570 {
1571 snap->opus_custom_rom = opus_custom_rom;
1572 }
1573
1574 int
libspectrum_snap_opus_direction(libspectrum_snap * snap)1575 libspectrum_snap_opus_direction( libspectrum_snap *snap )
1576 {
1577 return snap->opus_direction;
1578 }
1579
1580 void
libspectrum_snap_set_opus_direction(libspectrum_snap * snap,int opus_direction)1581 libspectrum_snap_set_opus_direction( libspectrum_snap *snap, int opus_direction )
1582 {
1583 snap->opus_direction = opus_direction;
1584 }
1585
1586 libspectrum_byte
libspectrum_snap_opus_track(libspectrum_snap * snap)1587 libspectrum_snap_opus_track( libspectrum_snap *snap )
1588 {
1589 return snap->opus_track;
1590 }
1591
1592 void
libspectrum_snap_set_opus_track(libspectrum_snap * snap,libspectrum_byte opus_track)1593 libspectrum_snap_set_opus_track( libspectrum_snap *snap, libspectrum_byte opus_track )
1594 {
1595 snap->opus_track = opus_track;
1596 }
1597
1598 libspectrum_byte
libspectrum_snap_opus_sector(libspectrum_snap * snap)1599 libspectrum_snap_opus_sector( libspectrum_snap *snap )
1600 {
1601 return snap->opus_sector;
1602 }
1603
1604 void
libspectrum_snap_set_opus_sector(libspectrum_snap * snap,libspectrum_byte opus_sector)1605 libspectrum_snap_set_opus_sector( libspectrum_snap *snap, libspectrum_byte opus_sector )
1606 {
1607 snap->opus_sector = opus_sector;
1608 }
1609
1610 libspectrum_byte
libspectrum_snap_opus_data(libspectrum_snap * snap)1611 libspectrum_snap_opus_data( libspectrum_snap *snap )
1612 {
1613 return snap->opus_data;
1614 }
1615
1616 void
libspectrum_snap_set_opus_data(libspectrum_snap * snap,libspectrum_byte opus_data)1617 libspectrum_snap_set_opus_data( libspectrum_snap *snap, libspectrum_byte opus_data )
1618 {
1619 snap->opus_data = opus_data;
1620 }
1621
1622 libspectrum_byte
libspectrum_snap_opus_status(libspectrum_snap * snap)1623 libspectrum_snap_opus_status( libspectrum_snap *snap )
1624 {
1625 return snap->opus_status;
1626 }
1627
1628 void
libspectrum_snap_set_opus_status(libspectrum_snap * snap,libspectrum_byte opus_status)1629 libspectrum_snap_set_opus_status( libspectrum_snap *snap, libspectrum_byte opus_status )
1630 {
1631 snap->opus_status = opus_status;
1632 }
1633
1634 libspectrum_byte
libspectrum_snap_opus_data_reg_a(libspectrum_snap * snap)1635 libspectrum_snap_opus_data_reg_a( libspectrum_snap *snap )
1636 {
1637 return snap->opus_data_reg_a;
1638 }
1639
1640 void
libspectrum_snap_set_opus_data_reg_a(libspectrum_snap * snap,libspectrum_byte opus_data_reg_a)1641 libspectrum_snap_set_opus_data_reg_a( libspectrum_snap *snap, libspectrum_byte opus_data_reg_a )
1642 {
1643 snap->opus_data_reg_a = opus_data_reg_a;
1644 }
1645
1646 libspectrum_byte
libspectrum_snap_opus_data_dir_a(libspectrum_snap * snap)1647 libspectrum_snap_opus_data_dir_a( libspectrum_snap *snap )
1648 {
1649 return snap->opus_data_dir_a;
1650 }
1651
1652 void
libspectrum_snap_set_opus_data_dir_a(libspectrum_snap * snap,libspectrum_byte opus_data_dir_a)1653 libspectrum_snap_set_opus_data_dir_a( libspectrum_snap *snap, libspectrum_byte opus_data_dir_a )
1654 {
1655 snap->opus_data_dir_a = opus_data_dir_a;
1656 }
1657
1658 libspectrum_byte
libspectrum_snap_opus_control_a(libspectrum_snap * snap)1659 libspectrum_snap_opus_control_a( libspectrum_snap *snap )
1660 {
1661 return snap->opus_control_a;
1662 }
1663
1664 void
libspectrum_snap_set_opus_control_a(libspectrum_snap * snap,libspectrum_byte opus_control_a)1665 libspectrum_snap_set_opus_control_a( libspectrum_snap *snap, libspectrum_byte opus_control_a )
1666 {
1667 snap->opus_control_a = opus_control_a;
1668 }
1669
1670 libspectrum_byte
libspectrum_snap_opus_data_reg_b(libspectrum_snap * snap)1671 libspectrum_snap_opus_data_reg_b( libspectrum_snap *snap )
1672 {
1673 return snap->opus_data_reg_b;
1674 }
1675
1676 void
libspectrum_snap_set_opus_data_reg_b(libspectrum_snap * snap,libspectrum_byte opus_data_reg_b)1677 libspectrum_snap_set_opus_data_reg_b( libspectrum_snap *snap, libspectrum_byte opus_data_reg_b )
1678 {
1679 snap->opus_data_reg_b = opus_data_reg_b;
1680 }
1681
1682 libspectrum_byte
libspectrum_snap_opus_data_dir_b(libspectrum_snap * snap)1683 libspectrum_snap_opus_data_dir_b( libspectrum_snap *snap )
1684 {
1685 return snap->opus_data_dir_b;
1686 }
1687
1688 void
libspectrum_snap_set_opus_data_dir_b(libspectrum_snap * snap,libspectrum_byte opus_data_dir_b)1689 libspectrum_snap_set_opus_data_dir_b( libspectrum_snap *snap, libspectrum_byte opus_data_dir_b )
1690 {
1691 snap->opus_data_dir_b = opus_data_dir_b;
1692 }
1693
1694 libspectrum_byte
libspectrum_snap_opus_control_b(libspectrum_snap * snap)1695 libspectrum_snap_opus_control_b( libspectrum_snap *snap )
1696 {
1697 return snap->opus_control_b;
1698 }
1699
1700 void
libspectrum_snap_set_opus_control_b(libspectrum_snap * snap,libspectrum_byte opus_control_b)1701 libspectrum_snap_set_opus_control_b( libspectrum_snap *snap, libspectrum_byte opus_control_b )
1702 {
1703 snap->opus_control_b = opus_control_b;
1704 }
1705
1706 libspectrum_byte*
libspectrum_snap_opus_rom(libspectrum_snap * snap,int idx)1707 libspectrum_snap_opus_rom( libspectrum_snap *snap, int idx )
1708 {
1709 return snap->opus_rom[idx];
1710 }
1711
1712 void
libspectrum_snap_set_opus_rom(libspectrum_snap * snap,int idx,libspectrum_byte * opus_rom)1713 libspectrum_snap_set_opus_rom( libspectrum_snap *snap, int idx, libspectrum_byte* opus_rom )
1714 {
1715 snap->opus_rom[idx] = opus_rom;
1716 }
1717
1718 libspectrum_byte*
libspectrum_snap_opus_ram(libspectrum_snap * snap,int idx)1719 libspectrum_snap_opus_ram( libspectrum_snap *snap, int idx )
1720 {
1721 return snap->opus_ram[idx];
1722 }
1723
1724 void
libspectrum_snap_set_opus_ram(libspectrum_snap * snap,int idx,libspectrum_byte * opus_ram)1725 libspectrum_snap_set_opus_ram( libspectrum_snap *snap, int idx, libspectrum_byte* opus_ram )
1726 {
1727 snap->opus_ram[idx] = opus_ram;
1728 }
1729
1730 int
libspectrum_snap_zxatasp_active(libspectrum_snap * snap)1731 libspectrum_snap_zxatasp_active( libspectrum_snap *snap )
1732 {
1733 return snap->zxatasp_active;
1734 }
1735
1736 void
libspectrum_snap_set_zxatasp_active(libspectrum_snap * snap,int zxatasp_active)1737 libspectrum_snap_set_zxatasp_active( libspectrum_snap *snap, int zxatasp_active )
1738 {
1739 snap->zxatasp_active = zxatasp_active;
1740 }
1741
1742 int
libspectrum_snap_zxatasp_upload(libspectrum_snap * snap)1743 libspectrum_snap_zxatasp_upload( libspectrum_snap *snap )
1744 {
1745 return snap->zxatasp_upload;
1746 }
1747
1748 void
libspectrum_snap_set_zxatasp_upload(libspectrum_snap * snap,int zxatasp_upload)1749 libspectrum_snap_set_zxatasp_upload( libspectrum_snap *snap, int zxatasp_upload )
1750 {
1751 snap->zxatasp_upload = zxatasp_upload;
1752 }
1753
1754 int
libspectrum_snap_zxatasp_writeprotect(libspectrum_snap * snap)1755 libspectrum_snap_zxatasp_writeprotect( libspectrum_snap *snap )
1756 {
1757 return snap->zxatasp_writeprotect;
1758 }
1759
1760 void
libspectrum_snap_set_zxatasp_writeprotect(libspectrum_snap * snap,int zxatasp_writeprotect)1761 libspectrum_snap_set_zxatasp_writeprotect( libspectrum_snap *snap, int zxatasp_writeprotect )
1762 {
1763 snap->zxatasp_writeprotect = zxatasp_writeprotect;
1764 }
1765
1766 libspectrum_byte
libspectrum_snap_zxatasp_port_a(libspectrum_snap * snap)1767 libspectrum_snap_zxatasp_port_a( libspectrum_snap *snap )
1768 {
1769 return snap->zxatasp_port_a;
1770 }
1771
1772 void
libspectrum_snap_set_zxatasp_port_a(libspectrum_snap * snap,libspectrum_byte zxatasp_port_a)1773 libspectrum_snap_set_zxatasp_port_a( libspectrum_snap *snap, libspectrum_byte zxatasp_port_a )
1774 {
1775 snap->zxatasp_port_a = zxatasp_port_a;
1776 }
1777
1778 libspectrum_byte
libspectrum_snap_zxatasp_port_b(libspectrum_snap * snap)1779 libspectrum_snap_zxatasp_port_b( libspectrum_snap *snap )
1780 {
1781 return snap->zxatasp_port_b;
1782 }
1783
1784 void
libspectrum_snap_set_zxatasp_port_b(libspectrum_snap * snap,libspectrum_byte zxatasp_port_b)1785 libspectrum_snap_set_zxatasp_port_b( libspectrum_snap *snap, libspectrum_byte zxatasp_port_b )
1786 {
1787 snap->zxatasp_port_b = zxatasp_port_b;
1788 }
1789
1790 libspectrum_byte
libspectrum_snap_zxatasp_port_c(libspectrum_snap * snap)1791 libspectrum_snap_zxatasp_port_c( libspectrum_snap *snap )
1792 {
1793 return snap->zxatasp_port_c;
1794 }
1795
1796 void
libspectrum_snap_set_zxatasp_port_c(libspectrum_snap * snap,libspectrum_byte zxatasp_port_c)1797 libspectrum_snap_set_zxatasp_port_c( libspectrum_snap *snap, libspectrum_byte zxatasp_port_c )
1798 {
1799 snap->zxatasp_port_c = zxatasp_port_c;
1800 }
1801
1802 libspectrum_byte
libspectrum_snap_zxatasp_control(libspectrum_snap * snap)1803 libspectrum_snap_zxatasp_control( libspectrum_snap *snap )
1804 {
1805 return snap->zxatasp_control;
1806 }
1807
1808 void
libspectrum_snap_set_zxatasp_control(libspectrum_snap * snap,libspectrum_byte zxatasp_control)1809 libspectrum_snap_set_zxatasp_control( libspectrum_snap *snap, libspectrum_byte zxatasp_control )
1810 {
1811 snap->zxatasp_control = zxatasp_control;
1812 }
1813
1814 size_t
libspectrum_snap_zxatasp_pages(libspectrum_snap * snap)1815 libspectrum_snap_zxatasp_pages( libspectrum_snap *snap )
1816 {
1817 return snap->zxatasp_pages;
1818 }
1819
1820 void
libspectrum_snap_set_zxatasp_pages(libspectrum_snap * snap,size_t zxatasp_pages)1821 libspectrum_snap_set_zxatasp_pages( libspectrum_snap *snap, size_t zxatasp_pages )
1822 {
1823 snap->zxatasp_pages = zxatasp_pages;
1824 }
1825
1826 size_t
libspectrum_snap_zxatasp_current_page(libspectrum_snap * snap)1827 libspectrum_snap_zxatasp_current_page( libspectrum_snap *snap )
1828 {
1829 return snap->zxatasp_current_page;
1830 }
1831
1832 void
libspectrum_snap_set_zxatasp_current_page(libspectrum_snap * snap,size_t zxatasp_current_page)1833 libspectrum_snap_set_zxatasp_current_page( libspectrum_snap *snap, size_t zxatasp_current_page )
1834 {
1835 snap->zxatasp_current_page = zxatasp_current_page;
1836 }
1837
1838 libspectrum_byte*
libspectrum_snap_zxatasp_ram(libspectrum_snap * snap,int idx)1839 libspectrum_snap_zxatasp_ram( libspectrum_snap *snap, int idx )
1840 {
1841 return snap->zxatasp_ram[idx];
1842 }
1843
1844 void
libspectrum_snap_set_zxatasp_ram(libspectrum_snap * snap,int idx,libspectrum_byte * zxatasp_ram)1845 libspectrum_snap_set_zxatasp_ram( libspectrum_snap *snap, int idx, libspectrum_byte* zxatasp_ram )
1846 {
1847 snap->zxatasp_ram[idx] = zxatasp_ram;
1848 }
1849
1850 int
libspectrum_snap_zxcf_active(libspectrum_snap * snap)1851 libspectrum_snap_zxcf_active( libspectrum_snap *snap )
1852 {
1853 return snap->zxcf_active;
1854 }
1855
1856 void
libspectrum_snap_set_zxcf_active(libspectrum_snap * snap,int zxcf_active)1857 libspectrum_snap_set_zxcf_active( libspectrum_snap *snap, int zxcf_active )
1858 {
1859 snap->zxcf_active = zxcf_active;
1860 }
1861
1862 int
libspectrum_snap_zxcf_upload(libspectrum_snap * snap)1863 libspectrum_snap_zxcf_upload( libspectrum_snap *snap )
1864 {
1865 return snap->zxcf_upload;
1866 }
1867
1868 void
libspectrum_snap_set_zxcf_upload(libspectrum_snap * snap,int zxcf_upload)1869 libspectrum_snap_set_zxcf_upload( libspectrum_snap *snap, int zxcf_upload )
1870 {
1871 snap->zxcf_upload = zxcf_upload;
1872 }
1873
1874 libspectrum_byte
libspectrum_snap_zxcf_memctl(libspectrum_snap * snap)1875 libspectrum_snap_zxcf_memctl( libspectrum_snap *snap )
1876 {
1877 return snap->zxcf_memctl;
1878 }
1879
1880 void
libspectrum_snap_set_zxcf_memctl(libspectrum_snap * snap,libspectrum_byte zxcf_memctl)1881 libspectrum_snap_set_zxcf_memctl( libspectrum_snap *snap, libspectrum_byte zxcf_memctl )
1882 {
1883 snap->zxcf_memctl = zxcf_memctl;
1884 }
1885
1886 size_t
libspectrum_snap_zxcf_pages(libspectrum_snap * snap)1887 libspectrum_snap_zxcf_pages( libspectrum_snap *snap )
1888 {
1889 return snap->zxcf_pages;
1890 }
1891
1892 void
libspectrum_snap_set_zxcf_pages(libspectrum_snap * snap,size_t zxcf_pages)1893 libspectrum_snap_set_zxcf_pages( libspectrum_snap *snap, size_t zxcf_pages )
1894 {
1895 snap->zxcf_pages = zxcf_pages;
1896 }
1897
1898 libspectrum_byte*
libspectrum_snap_zxcf_ram(libspectrum_snap * snap,int idx)1899 libspectrum_snap_zxcf_ram( libspectrum_snap *snap, int idx )
1900 {
1901 return snap->zxcf_ram[idx];
1902 }
1903
1904 void
libspectrum_snap_set_zxcf_ram(libspectrum_snap * snap,int idx,libspectrum_byte * zxcf_ram)1905 libspectrum_snap_set_zxcf_ram( libspectrum_snap *snap, int idx, libspectrum_byte* zxcf_ram )
1906 {
1907 snap->zxcf_ram[idx] = zxcf_ram;
1908 }
1909
1910 int
libspectrum_snap_interface2_active(libspectrum_snap * snap)1911 libspectrum_snap_interface2_active( libspectrum_snap *snap )
1912 {
1913 return snap->interface2_active;
1914 }
1915
1916 void
libspectrum_snap_set_interface2_active(libspectrum_snap * snap,int interface2_active)1917 libspectrum_snap_set_interface2_active( libspectrum_snap *snap, int interface2_active )
1918 {
1919 snap->interface2_active = interface2_active;
1920 }
1921
1922 libspectrum_byte*
libspectrum_snap_interface2_rom(libspectrum_snap * snap,int idx)1923 libspectrum_snap_interface2_rom( libspectrum_snap *snap, int idx )
1924 {
1925 return snap->interface2_rom[idx];
1926 }
1927
1928 void
libspectrum_snap_set_interface2_rom(libspectrum_snap * snap,int idx,libspectrum_byte * interface2_rom)1929 libspectrum_snap_set_interface2_rom( libspectrum_snap *snap, int idx, libspectrum_byte* interface2_rom )
1930 {
1931 snap->interface2_rom[idx] = interface2_rom;
1932 }
1933
1934 int
libspectrum_snap_dock_active(libspectrum_snap * snap)1935 libspectrum_snap_dock_active( libspectrum_snap *snap )
1936 {
1937 return snap->dock_active;
1938 }
1939
1940 void
libspectrum_snap_set_dock_active(libspectrum_snap * snap,int dock_active)1941 libspectrum_snap_set_dock_active( libspectrum_snap *snap, int dock_active )
1942 {
1943 snap->dock_active = dock_active;
1944 }
1945
1946 libspectrum_byte
libspectrum_snap_exrom_ram(libspectrum_snap * snap,int idx)1947 libspectrum_snap_exrom_ram( libspectrum_snap *snap, int idx )
1948 {
1949 return snap->exrom_ram[idx];
1950 }
1951
1952 void
libspectrum_snap_set_exrom_ram(libspectrum_snap * snap,int idx,libspectrum_byte exrom_ram)1953 libspectrum_snap_set_exrom_ram( libspectrum_snap *snap, int idx, libspectrum_byte exrom_ram )
1954 {
1955 snap->exrom_ram[idx] = exrom_ram;
1956 }
1957
1958 libspectrum_byte*
libspectrum_snap_exrom_cart(libspectrum_snap * snap,int idx)1959 libspectrum_snap_exrom_cart( libspectrum_snap *snap, int idx )
1960 {
1961 return snap->exrom_cart[idx];
1962 }
1963
1964 void
libspectrum_snap_set_exrom_cart(libspectrum_snap * snap,int idx,libspectrum_byte * exrom_cart)1965 libspectrum_snap_set_exrom_cart( libspectrum_snap *snap, int idx, libspectrum_byte* exrom_cart )
1966 {
1967 snap->exrom_cart[idx] = exrom_cart;
1968 }
1969
1970 libspectrum_byte
libspectrum_snap_dock_ram(libspectrum_snap * snap,int idx)1971 libspectrum_snap_dock_ram( libspectrum_snap *snap, int idx )
1972 {
1973 return snap->dock_ram[idx];
1974 }
1975
1976 void
libspectrum_snap_set_dock_ram(libspectrum_snap * snap,int idx,libspectrum_byte dock_ram)1977 libspectrum_snap_set_dock_ram( libspectrum_snap *snap, int idx, libspectrum_byte dock_ram )
1978 {
1979 snap->dock_ram[idx] = dock_ram;
1980 }
1981
1982 libspectrum_byte*
libspectrum_snap_dock_cart(libspectrum_snap * snap,int idx)1983 libspectrum_snap_dock_cart( libspectrum_snap *snap, int idx )
1984 {
1985 return snap->dock_cart[idx];
1986 }
1987
1988 void
libspectrum_snap_set_dock_cart(libspectrum_snap * snap,int idx,libspectrum_byte * dock_cart)1989 libspectrum_snap_set_dock_cart( libspectrum_snap *snap, int idx, libspectrum_byte* dock_cart )
1990 {
1991 snap->dock_cart[idx] = dock_cart;
1992 }
1993
1994 int
libspectrum_snap_issue2(libspectrum_snap * snap)1995 libspectrum_snap_issue2( libspectrum_snap *snap )
1996 {
1997 return snap->issue2;
1998 }
1999
2000 void
libspectrum_snap_set_issue2(libspectrum_snap * snap,int issue2)2001 libspectrum_snap_set_issue2( libspectrum_snap *snap, int issue2 )
2002 {
2003 snap->issue2 = issue2;
2004 }
2005
2006 size_t
libspectrum_snap_joystick_active_count(libspectrum_snap * snap)2007 libspectrum_snap_joystick_active_count( libspectrum_snap *snap )
2008 {
2009 return snap->joystick_active_count;
2010 }
2011
2012 void
libspectrum_snap_set_joystick_active_count(libspectrum_snap * snap,size_t joystick_active_count)2013 libspectrum_snap_set_joystick_active_count( libspectrum_snap *snap, size_t joystick_active_count )
2014 {
2015 snap->joystick_active_count = joystick_active_count;
2016 }
2017
2018 libspectrum_joystick
libspectrum_snap_joystick_list(libspectrum_snap * snap,int idx)2019 libspectrum_snap_joystick_list( libspectrum_snap *snap, int idx )
2020 {
2021 return snap->joystick_list[idx];
2022 }
2023
2024 void
libspectrum_snap_set_joystick_list(libspectrum_snap * snap,int idx,libspectrum_joystick joystick_list)2025 libspectrum_snap_set_joystick_list( libspectrum_snap *snap, int idx, libspectrum_joystick joystick_list )
2026 {
2027 snap->joystick_list[idx] = joystick_list;
2028 }
2029
2030 int
libspectrum_snap_joystick_inputs(libspectrum_snap * snap,int idx)2031 libspectrum_snap_joystick_inputs( libspectrum_snap *snap, int idx )
2032 {
2033 return snap->joystick_inputs[idx];
2034 }
2035
2036 void
libspectrum_snap_set_joystick_inputs(libspectrum_snap * snap,int idx,int joystick_inputs)2037 libspectrum_snap_set_joystick_inputs( libspectrum_snap *snap, int idx, int joystick_inputs )
2038 {
2039 snap->joystick_inputs[idx] = joystick_inputs;
2040 }
2041
2042 int
libspectrum_snap_kempston_mouse_active(libspectrum_snap * snap)2043 libspectrum_snap_kempston_mouse_active( libspectrum_snap *snap )
2044 {
2045 return snap->kempston_mouse_active;
2046 }
2047
2048 void
libspectrum_snap_set_kempston_mouse_active(libspectrum_snap * snap,int kempston_mouse_active)2049 libspectrum_snap_set_kempston_mouse_active( libspectrum_snap *snap, int kempston_mouse_active )
2050 {
2051 snap->kempston_mouse_active = kempston_mouse_active;
2052 }
2053
2054 int
libspectrum_snap_simpleide_active(libspectrum_snap * snap)2055 libspectrum_snap_simpleide_active( libspectrum_snap *snap )
2056 {
2057 return snap->simpleide_active;
2058 }
2059
2060 void
libspectrum_snap_set_simpleide_active(libspectrum_snap * snap,int simpleide_active)2061 libspectrum_snap_set_simpleide_active( libspectrum_snap *snap, int simpleide_active )
2062 {
2063 snap->simpleide_active = simpleide_active;
2064 }
2065
2066 int
libspectrum_snap_divide_active(libspectrum_snap * snap)2067 libspectrum_snap_divide_active( libspectrum_snap *snap )
2068 {
2069 return snap->divide_active;
2070 }
2071
2072 void
libspectrum_snap_set_divide_active(libspectrum_snap * snap,int divide_active)2073 libspectrum_snap_set_divide_active( libspectrum_snap *snap, int divide_active )
2074 {
2075 snap->divide_active = divide_active;
2076 }
2077
2078 int
libspectrum_snap_divide_eprom_writeprotect(libspectrum_snap * snap)2079 libspectrum_snap_divide_eprom_writeprotect( libspectrum_snap *snap )
2080 {
2081 return snap->divide_eprom_writeprotect;
2082 }
2083
2084 void
libspectrum_snap_set_divide_eprom_writeprotect(libspectrum_snap * snap,int divide_eprom_writeprotect)2085 libspectrum_snap_set_divide_eprom_writeprotect( libspectrum_snap *snap, int divide_eprom_writeprotect )
2086 {
2087 snap->divide_eprom_writeprotect = divide_eprom_writeprotect;
2088 }
2089
2090 int
libspectrum_snap_divide_paged(libspectrum_snap * snap)2091 libspectrum_snap_divide_paged( libspectrum_snap *snap )
2092 {
2093 return snap->divide_paged;
2094 }
2095
2096 void
libspectrum_snap_set_divide_paged(libspectrum_snap * snap,int divide_paged)2097 libspectrum_snap_set_divide_paged( libspectrum_snap *snap, int divide_paged )
2098 {
2099 snap->divide_paged = divide_paged;
2100 }
2101
2102 libspectrum_byte
libspectrum_snap_divide_control(libspectrum_snap * snap)2103 libspectrum_snap_divide_control( libspectrum_snap *snap )
2104 {
2105 return snap->divide_control;
2106 }
2107
2108 void
libspectrum_snap_set_divide_control(libspectrum_snap * snap,libspectrum_byte divide_control)2109 libspectrum_snap_set_divide_control( libspectrum_snap *snap, libspectrum_byte divide_control )
2110 {
2111 snap->divide_control = divide_control;
2112 }
2113
2114 size_t
libspectrum_snap_divide_pages(libspectrum_snap * snap)2115 libspectrum_snap_divide_pages( libspectrum_snap *snap )
2116 {
2117 return snap->divide_pages;
2118 }
2119
2120 void
libspectrum_snap_set_divide_pages(libspectrum_snap * snap,size_t divide_pages)2121 libspectrum_snap_set_divide_pages( libspectrum_snap *snap, size_t divide_pages )
2122 {
2123 snap->divide_pages = divide_pages;
2124 }
2125
2126 libspectrum_byte*
libspectrum_snap_divide_eprom(libspectrum_snap * snap,int idx)2127 libspectrum_snap_divide_eprom( libspectrum_snap *snap, int idx )
2128 {
2129 return snap->divide_eprom[idx];
2130 }
2131
2132 void
libspectrum_snap_set_divide_eprom(libspectrum_snap * snap,int idx,libspectrum_byte * divide_eprom)2133 libspectrum_snap_set_divide_eprom( libspectrum_snap *snap, int idx, libspectrum_byte* divide_eprom )
2134 {
2135 snap->divide_eprom[idx] = divide_eprom;
2136 }
2137
2138 libspectrum_byte*
libspectrum_snap_divide_ram(libspectrum_snap * snap,int idx)2139 libspectrum_snap_divide_ram( libspectrum_snap *snap, int idx )
2140 {
2141 return snap->divide_ram[idx];
2142 }
2143
2144 void
libspectrum_snap_set_divide_ram(libspectrum_snap * snap,int idx,libspectrum_byte * divide_ram)2145 libspectrum_snap_set_divide_ram( libspectrum_snap *snap, int idx, libspectrum_byte* divide_ram )
2146 {
2147 snap->divide_ram[idx] = divide_ram;
2148 }
2149
2150 int
libspectrum_snap_divmmc_active(libspectrum_snap * snap)2151 libspectrum_snap_divmmc_active( libspectrum_snap *snap )
2152 {
2153 return snap->divmmc_active;
2154 }
2155
2156 void
libspectrum_snap_set_divmmc_active(libspectrum_snap * snap,int divmmc_active)2157 libspectrum_snap_set_divmmc_active( libspectrum_snap *snap, int divmmc_active )
2158 {
2159 snap->divmmc_active = divmmc_active;
2160 }
2161
2162 int
libspectrum_snap_divmmc_eprom_writeprotect(libspectrum_snap * snap)2163 libspectrum_snap_divmmc_eprom_writeprotect( libspectrum_snap *snap )
2164 {
2165 return snap->divmmc_eprom_writeprotect;
2166 }
2167
2168 void
libspectrum_snap_set_divmmc_eprom_writeprotect(libspectrum_snap * snap,int divmmc_eprom_writeprotect)2169 libspectrum_snap_set_divmmc_eprom_writeprotect( libspectrum_snap *snap, int divmmc_eprom_writeprotect )
2170 {
2171 snap->divmmc_eprom_writeprotect = divmmc_eprom_writeprotect;
2172 }
2173
2174 int
libspectrum_snap_divmmc_paged(libspectrum_snap * snap)2175 libspectrum_snap_divmmc_paged( libspectrum_snap *snap )
2176 {
2177 return snap->divmmc_paged;
2178 }
2179
2180 void
libspectrum_snap_set_divmmc_paged(libspectrum_snap * snap,int divmmc_paged)2181 libspectrum_snap_set_divmmc_paged( libspectrum_snap *snap, int divmmc_paged )
2182 {
2183 snap->divmmc_paged = divmmc_paged;
2184 }
2185
2186 libspectrum_byte
libspectrum_snap_divmmc_control(libspectrum_snap * snap)2187 libspectrum_snap_divmmc_control( libspectrum_snap *snap )
2188 {
2189 return snap->divmmc_control;
2190 }
2191
2192 void
libspectrum_snap_set_divmmc_control(libspectrum_snap * snap,libspectrum_byte divmmc_control)2193 libspectrum_snap_set_divmmc_control( libspectrum_snap *snap, libspectrum_byte divmmc_control )
2194 {
2195 snap->divmmc_control = divmmc_control;
2196 }
2197
2198 size_t
libspectrum_snap_divmmc_pages(libspectrum_snap * snap)2199 libspectrum_snap_divmmc_pages( libspectrum_snap *snap )
2200 {
2201 return snap->divmmc_pages;
2202 }
2203
2204 void
libspectrum_snap_set_divmmc_pages(libspectrum_snap * snap,size_t divmmc_pages)2205 libspectrum_snap_set_divmmc_pages( libspectrum_snap *snap, size_t divmmc_pages )
2206 {
2207 snap->divmmc_pages = divmmc_pages;
2208 }
2209
2210 libspectrum_byte*
libspectrum_snap_divmmc_eprom(libspectrum_snap * snap,int idx)2211 libspectrum_snap_divmmc_eprom( libspectrum_snap *snap, int idx )
2212 {
2213 return snap->divmmc_eprom[idx];
2214 }
2215
2216 void
libspectrum_snap_set_divmmc_eprom(libspectrum_snap * snap,int idx,libspectrum_byte * divmmc_eprom)2217 libspectrum_snap_set_divmmc_eprom( libspectrum_snap *snap, int idx, libspectrum_byte* divmmc_eprom )
2218 {
2219 snap->divmmc_eprom[idx] = divmmc_eprom;
2220 }
2221
2222 libspectrum_byte*
libspectrum_snap_divmmc_ram(libspectrum_snap * snap,int idx)2223 libspectrum_snap_divmmc_ram( libspectrum_snap *snap, int idx )
2224 {
2225 return snap->divmmc_ram[idx];
2226 }
2227
2228 void
libspectrum_snap_set_divmmc_ram(libspectrum_snap * snap,int idx,libspectrum_byte * divmmc_ram)2229 libspectrum_snap_set_divmmc_ram( libspectrum_snap *snap, int idx, libspectrum_byte* divmmc_ram )
2230 {
2231 snap->divmmc_ram[idx] = divmmc_ram;
2232 }
2233
2234 int
libspectrum_snap_fuller_box_active(libspectrum_snap * snap)2235 libspectrum_snap_fuller_box_active( libspectrum_snap *snap )
2236 {
2237 return snap->fuller_box_active;
2238 }
2239
2240 void
libspectrum_snap_set_fuller_box_active(libspectrum_snap * snap,int fuller_box_active)2241 libspectrum_snap_set_fuller_box_active( libspectrum_snap *snap, int fuller_box_active )
2242 {
2243 snap->fuller_box_active = fuller_box_active;
2244 }
2245
2246 int
libspectrum_snap_melodik_active(libspectrum_snap * snap)2247 libspectrum_snap_melodik_active( libspectrum_snap *snap )
2248 {
2249 return snap->melodik_active;
2250 }
2251
2252 void
libspectrum_snap_set_melodik_active(libspectrum_snap * snap,int melodik_active)2253 libspectrum_snap_set_melodik_active( libspectrum_snap *snap, int melodik_active )
2254 {
2255 snap->melodik_active = melodik_active;
2256 }
2257
2258 int
libspectrum_snap_specdrum_active(libspectrum_snap * snap)2259 libspectrum_snap_specdrum_active( libspectrum_snap *snap )
2260 {
2261 return snap->specdrum_active;
2262 }
2263
2264 void
libspectrum_snap_set_specdrum_active(libspectrum_snap * snap,int specdrum_active)2265 libspectrum_snap_set_specdrum_active( libspectrum_snap *snap, int specdrum_active )
2266 {
2267 snap->specdrum_active = specdrum_active;
2268 }
2269
2270 libspectrum_signed_byte
libspectrum_snap_specdrum_dac(libspectrum_snap * snap)2271 libspectrum_snap_specdrum_dac( libspectrum_snap *snap )
2272 {
2273 return snap->specdrum_dac;
2274 }
2275
2276 void
libspectrum_snap_set_specdrum_dac(libspectrum_snap * snap,libspectrum_signed_byte specdrum_dac)2277 libspectrum_snap_set_specdrum_dac( libspectrum_snap *snap, libspectrum_signed_byte specdrum_dac )
2278 {
2279 snap->specdrum_dac = specdrum_dac;
2280 }
2281
2282 int
libspectrum_snap_spectranet_active(libspectrum_snap * snap)2283 libspectrum_snap_spectranet_active( libspectrum_snap *snap )
2284 {
2285 return snap->spectranet_active;
2286 }
2287
2288 void
libspectrum_snap_set_spectranet_active(libspectrum_snap * snap,int spectranet_active)2289 libspectrum_snap_set_spectranet_active( libspectrum_snap *snap, int spectranet_active )
2290 {
2291 snap->spectranet_active = spectranet_active;
2292 }
2293
2294 int
libspectrum_snap_spectranet_paged(libspectrum_snap * snap)2295 libspectrum_snap_spectranet_paged( libspectrum_snap *snap )
2296 {
2297 return snap->spectranet_paged;
2298 }
2299
2300 void
libspectrum_snap_set_spectranet_paged(libspectrum_snap * snap,int spectranet_paged)2301 libspectrum_snap_set_spectranet_paged( libspectrum_snap *snap, int spectranet_paged )
2302 {
2303 snap->spectranet_paged = spectranet_paged;
2304 }
2305
2306 int
libspectrum_snap_spectranet_paged_via_io(libspectrum_snap * snap)2307 libspectrum_snap_spectranet_paged_via_io( libspectrum_snap *snap )
2308 {
2309 return snap->spectranet_paged_via_io;
2310 }
2311
2312 void
libspectrum_snap_set_spectranet_paged_via_io(libspectrum_snap * snap,int spectranet_paged_via_io)2313 libspectrum_snap_set_spectranet_paged_via_io( libspectrum_snap *snap, int spectranet_paged_via_io )
2314 {
2315 snap->spectranet_paged_via_io = spectranet_paged_via_io;
2316 }
2317
2318 int
libspectrum_snap_spectranet_nmi_flipflop(libspectrum_snap * snap)2319 libspectrum_snap_spectranet_nmi_flipflop( libspectrum_snap *snap )
2320 {
2321 return snap->spectranet_nmi_flipflop;
2322 }
2323
2324 void
libspectrum_snap_set_spectranet_nmi_flipflop(libspectrum_snap * snap,int spectranet_nmi_flipflop)2325 libspectrum_snap_set_spectranet_nmi_flipflop( libspectrum_snap *snap, int spectranet_nmi_flipflop )
2326 {
2327 snap->spectranet_nmi_flipflop = spectranet_nmi_flipflop;
2328 }
2329
2330 int
libspectrum_snap_spectranet_programmable_trap_active(libspectrum_snap * snap)2331 libspectrum_snap_spectranet_programmable_trap_active( libspectrum_snap *snap )
2332 {
2333 return snap->spectranet_programmable_trap_active;
2334 }
2335
2336 void
libspectrum_snap_set_spectranet_programmable_trap_active(libspectrum_snap * snap,int spectranet_programmable_trap_active)2337 libspectrum_snap_set_spectranet_programmable_trap_active( libspectrum_snap *snap, int spectranet_programmable_trap_active )
2338 {
2339 snap->spectranet_programmable_trap_active = spectranet_programmable_trap_active;
2340 }
2341
2342 int
libspectrum_snap_spectranet_programmable_trap_msb(libspectrum_snap * snap)2343 libspectrum_snap_spectranet_programmable_trap_msb( libspectrum_snap *snap )
2344 {
2345 return snap->spectranet_programmable_trap_msb;
2346 }
2347
2348 void
libspectrum_snap_set_spectranet_programmable_trap_msb(libspectrum_snap * snap,int spectranet_programmable_trap_msb)2349 libspectrum_snap_set_spectranet_programmable_trap_msb( libspectrum_snap *snap, int spectranet_programmable_trap_msb )
2350 {
2351 snap->spectranet_programmable_trap_msb = spectranet_programmable_trap_msb;
2352 }
2353
2354 int
libspectrum_snap_spectranet_all_traps_disabled(libspectrum_snap * snap)2355 libspectrum_snap_spectranet_all_traps_disabled( libspectrum_snap *snap )
2356 {
2357 return snap->spectranet_all_traps_disabled;
2358 }
2359
2360 void
libspectrum_snap_set_spectranet_all_traps_disabled(libspectrum_snap * snap,int spectranet_all_traps_disabled)2361 libspectrum_snap_set_spectranet_all_traps_disabled( libspectrum_snap *snap, int spectranet_all_traps_disabled )
2362 {
2363 snap->spectranet_all_traps_disabled = spectranet_all_traps_disabled;
2364 }
2365
2366 int
libspectrum_snap_spectranet_rst8_trap_disabled(libspectrum_snap * snap)2367 libspectrum_snap_spectranet_rst8_trap_disabled( libspectrum_snap *snap )
2368 {
2369 return snap->spectranet_rst8_trap_disabled;
2370 }
2371
2372 void
libspectrum_snap_set_spectranet_rst8_trap_disabled(libspectrum_snap * snap,int spectranet_rst8_trap_disabled)2373 libspectrum_snap_set_spectranet_rst8_trap_disabled( libspectrum_snap *snap, int spectranet_rst8_trap_disabled )
2374 {
2375 snap->spectranet_rst8_trap_disabled = spectranet_rst8_trap_disabled;
2376 }
2377
2378 int
libspectrum_snap_spectranet_deny_downstream_a15(libspectrum_snap * snap)2379 libspectrum_snap_spectranet_deny_downstream_a15( libspectrum_snap *snap )
2380 {
2381 return snap->spectranet_deny_downstream_a15;
2382 }
2383
2384 void
libspectrum_snap_set_spectranet_deny_downstream_a15(libspectrum_snap * snap,int spectranet_deny_downstream_a15)2385 libspectrum_snap_set_spectranet_deny_downstream_a15( libspectrum_snap *snap, int spectranet_deny_downstream_a15 )
2386 {
2387 snap->spectranet_deny_downstream_a15 = spectranet_deny_downstream_a15;
2388 }
2389
2390 int
libspectrum_snap_spectranet_page_a(libspectrum_snap * snap)2391 libspectrum_snap_spectranet_page_a( libspectrum_snap *snap )
2392 {
2393 return snap->spectranet_page_a;
2394 }
2395
2396 void
libspectrum_snap_set_spectranet_page_a(libspectrum_snap * snap,int spectranet_page_a)2397 libspectrum_snap_set_spectranet_page_a( libspectrum_snap *snap, int spectranet_page_a )
2398 {
2399 snap->spectranet_page_a = spectranet_page_a;
2400 }
2401
2402 int
libspectrum_snap_spectranet_page_b(libspectrum_snap * snap)2403 libspectrum_snap_spectranet_page_b( libspectrum_snap *snap )
2404 {
2405 return snap->spectranet_page_b;
2406 }
2407
2408 void
libspectrum_snap_set_spectranet_page_b(libspectrum_snap * snap,int spectranet_page_b)2409 libspectrum_snap_set_spectranet_page_b( libspectrum_snap *snap, int spectranet_page_b )
2410 {
2411 snap->spectranet_page_b = spectranet_page_b;
2412 }
2413
2414 libspectrum_word
libspectrum_snap_spectranet_programmable_trap(libspectrum_snap * snap)2415 libspectrum_snap_spectranet_programmable_trap( libspectrum_snap *snap )
2416 {
2417 return snap->spectranet_programmable_trap;
2418 }
2419
2420 void
libspectrum_snap_set_spectranet_programmable_trap(libspectrum_snap * snap,libspectrum_word spectranet_programmable_trap)2421 libspectrum_snap_set_spectranet_programmable_trap( libspectrum_snap *snap, libspectrum_word spectranet_programmable_trap )
2422 {
2423 snap->spectranet_programmable_trap = spectranet_programmable_trap;
2424 }
2425
2426 libspectrum_byte*
libspectrum_snap_spectranet_w5100(libspectrum_snap * snap,int idx)2427 libspectrum_snap_spectranet_w5100( libspectrum_snap *snap, int idx )
2428 {
2429 return snap->spectranet_w5100[idx];
2430 }
2431
2432 void
libspectrum_snap_set_spectranet_w5100(libspectrum_snap * snap,int idx,libspectrum_byte * spectranet_w5100)2433 libspectrum_snap_set_spectranet_w5100( libspectrum_snap *snap, int idx, libspectrum_byte* spectranet_w5100 )
2434 {
2435 snap->spectranet_w5100[idx] = spectranet_w5100;
2436 }
2437
2438 libspectrum_byte*
libspectrum_snap_spectranet_flash(libspectrum_snap * snap,int idx)2439 libspectrum_snap_spectranet_flash( libspectrum_snap *snap, int idx )
2440 {
2441 return snap->spectranet_flash[idx];
2442 }
2443
2444 void
libspectrum_snap_set_spectranet_flash(libspectrum_snap * snap,int idx,libspectrum_byte * spectranet_flash)2445 libspectrum_snap_set_spectranet_flash( libspectrum_snap *snap, int idx, libspectrum_byte* spectranet_flash )
2446 {
2447 snap->spectranet_flash[idx] = spectranet_flash;
2448 }
2449
2450 libspectrum_byte*
libspectrum_snap_spectranet_ram(libspectrum_snap * snap,int idx)2451 libspectrum_snap_spectranet_ram( libspectrum_snap *snap, int idx )
2452 {
2453 return snap->spectranet_ram[idx];
2454 }
2455
2456 void
libspectrum_snap_set_spectranet_ram(libspectrum_snap * snap,int idx,libspectrum_byte * spectranet_ram)2457 libspectrum_snap_set_spectranet_ram( libspectrum_snap *snap, int idx, libspectrum_byte* spectranet_ram )
2458 {
2459 snap->spectranet_ram[idx] = spectranet_ram;
2460 }
2461
2462 int
libspectrum_snap_late_timings(libspectrum_snap * snap)2463 libspectrum_snap_late_timings( libspectrum_snap *snap )
2464 {
2465 return snap->late_timings;
2466 }
2467
2468 void
libspectrum_snap_set_late_timings(libspectrum_snap * snap,int late_timings)2469 libspectrum_snap_set_late_timings( libspectrum_snap *snap, int late_timings )
2470 {
2471 snap->late_timings = late_timings;
2472 }
2473
2474 int
libspectrum_snap_zx_printer_active(libspectrum_snap * snap)2475 libspectrum_snap_zx_printer_active( libspectrum_snap *snap )
2476 {
2477 return snap->zx_printer_active;
2478 }
2479
2480 void
libspectrum_snap_set_zx_printer_active(libspectrum_snap * snap,int zx_printer_active)2481 libspectrum_snap_set_zx_printer_active( libspectrum_snap *snap, int zx_printer_active )
2482 {
2483 snap->zx_printer_active = zx_printer_active;
2484 }
2485
2486 int
libspectrum_snap_usource_active(libspectrum_snap * snap)2487 libspectrum_snap_usource_active( libspectrum_snap *snap )
2488 {
2489 return snap->usource_active;
2490 }
2491
2492 void
libspectrum_snap_set_usource_active(libspectrum_snap * snap,int usource_active)2493 libspectrum_snap_set_usource_active( libspectrum_snap *snap, int usource_active )
2494 {
2495 snap->usource_active = usource_active;
2496 }
2497
2498 int
libspectrum_snap_usource_paged(libspectrum_snap * snap)2499 libspectrum_snap_usource_paged( libspectrum_snap *snap )
2500 {
2501 return snap->usource_paged;
2502 }
2503
2504 void
libspectrum_snap_set_usource_paged(libspectrum_snap * snap,int usource_paged)2505 libspectrum_snap_set_usource_paged( libspectrum_snap *snap, int usource_paged )
2506 {
2507 snap->usource_paged = usource_paged;
2508 }
2509
2510 int
libspectrum_snap_usource_custom_rom(libspectrum_snap * snap)2511 libspectrum_snap_usource_custom_rom( libspectrum_snap *snap )
2512 {
2513 return snap->usource_custom_rom;
2514 }
2515
2516 void
libspectrum_snap_set_usource_custom_rom(libspectrum_snap * snap,int usource_custom_rom)2517 libspectrum_snap_set_usource_custom_rom( libspectrum_snap *snap, int usource_custom_rom )
2518 {
2519 snap->usource_custom_rom = usource_custom_rom;
2520 }
2521
2522 libspectrum_byte*
libspectrum_snap_usource_rom(libspectrum_snap * snap,int idx)2523 libspectrum_snap_usource_rom( libspectrum_snap *snap, int idx )
2524 {
2525 return snap->usource_rom[idx];
2526 }
2527
2528 void
libspectrum_snap_set_usource_rom(libspectrum_snap * snap,int idx,libspectrum_byte * usource_rom)2529 libspectrum_snap_set_usource_rom( libspectrum_snap *snap, int idx, libspectrum_byte* usource_rom )
2530 {
2531 snap->usource_rom[idx] = usource_rom;
2532 }
2533
2534 size_t
libspectrum_snap_usource_rom_length(libspectrum_snap * snap,int idx)2535 libspectrum_snap_usource_rom_length( libspectrum_snap *snap, int idx )
2536 {
2537 return snap->usource_rom_length[idx];
2538 }
2539
2540 void
libspectrum_snap_set_usource_rom_length(libspectrum_snap * snap,int idx,size_t usource_rom_length)2541 libspectrum_snap_set_usource_rom_length( libspectrum_snap *snap, int idx, size_t usource_rom_length )
2542 {
2543 snap->usource_rom_length[idx] = usource_rom_length;
2544 }
2545
2546 int
libspectrum_snap_disciple_active(libspectrum_snap * snap)2547 libspectrum_snap_disciple_active( libspectrum_snap *snap )
2548 {
2549 return snap->disciple_active;
2550 }
2551
2552 void
libspectrum_snap_set_disciple_active(libspectrum_snap * snap,int disciple_active)2553 libspectrum_snap_set_disciple_active( libspectrum_snap *snap, int disciple_active )
2554 {
2555 snap->disciple_active = disciple_active;
2556 }
2557
2558 int
libspectrum_snap_disciple_paged(libspectrum_snap * snap)2559 libspectrum_snap_disciple_paged( libspectrum_snap *snap )
2560 {
2561 return snap->disciple_paged;
2562 }
2563
2564 void
libspectrum_snap_set_disciple_paged(libspectrum_snap * snap,int disciple_paged)2565 libspectrum_snap_set_disciple_paged( libspectrum_snap *snap, int disciple_paged )
2566 {
2567 snap->disciple_paged = disciple_paged;
2568 }
2569
2570 int
libspectrum_snap_disciple_inhibit_button(libspectrum_snap * snap)2571 libspectrum_snap_disciple_inhibit_button( libspectrum_snap *snap )
2572 {
2573 return snap->disciple_inhibit_button;
2574 }
2575
2576 void
libspectrum_snap_set_disciple_inhibit_button(libspectrum_snap * snap,int disciple_inhibit_button)2577 libspectrum_snap_set_disciple_inhibit_button( libspectrum_snap *snap, int disciple_inhibit_button )
2578 {
2579 snap->disciple_inhibit_button = disciple_inhibit_button;
2580 }
2581
2582 int
libspectrum_snap_disciple_drive_count(libspectrum_snap * snap)2583 libspectrum_snap_disciple_drive_count( libspectrum_snap *snap )
2584 {
2585 return snap->disciple_drive_count;
2586 }
2587
2588 void
libspectrum_snap_set_disciple_drive_count(libspectrum_snap * snap,int disciple_drive_count)2589 libspectrum_snap_set_disciple_drive_count( libspectrum_snap *snap, int disciple_drive_count )
2590 {
2591 snap->disciple_drive_count = disciple_drive_count;
2592 }
2593
2594 int
libspectrum_snap_disciple_custom_rom(libspectrum_snap * snap)2595 libspectrum_snap_disciple_custom_rom( libspectrum_snap *snap )
2596 {
2597 return snap->disciple_custom_rom;
2598 }
2599
2600 void
libspectrum_snap_set_disciple_custom_rom(libspectrum_snap * snap,int disciple_custom_rom)2601 libspectrum_snap_set_disciple_custom_rom( libspectrum_snap *snap, int disciple_custom_rom )
2602 {
2603 snap->disciple_custom_rom = disciple_custom_rom;
2604 }
2605
2606 int
libspectrum_snap_disciple_direction(libspectrum_snap * snap)2607 libspectrum_snap_disciple_direction( libspectrum_snap *snap )
2608 {
2609 return snap->disciple_direction;
2610 }
2611
2612 void
libspectrum_snap_set_disciple_direction(libspectrum_snap * snap,int disciple_direction)2613 libspectrum_snap_set_disciple_direction( libspectrum_snap *snap, int disciple_direction )
2614 {
2615 snap->disciple_direction = disciple_direction;
2616 }
2617
2618 libspectrum_byte
libspectrum_snap_disciple_control(libspectrum_snap * snap)2619 libspectrum_snap_disciple_control( libspectrum_snap *snap )
2620 {
2621 return snap->disciple_control;
2622 }
2623
2624 void
libspectrum_snap_set_disciple_control(libspectrum_snap * snap,libspectrum_byte disciple_control)2625 libspectrum_snap_set_disciple_control( libspectrum_snap *snap, libspectrum_byte disciple_control )
2626 {
2627 snap->disciple_control = disciple_control;
2628 }
2629
2630 libspectrum_byte
libspectrum_snap_disciple_track(libspectrum_snap * snap)2631 libspectrum_snap_disciple_track( libspectrum_snap *snap )
2632 {
2633 return snap->disciple_track;
2634 }
2635
2636 void
libspectrum_snap_set_disciple_track(libspectrum_snap * snap,libspectrum_byte disciple_track)2637 libspectrum_snap_set_disciple_track( libspectrum_snap *snap, libspectrum_byte disciple_track )
2638 {
2639 snap->disciple_track = disciple_track;
2640 }
2641
2642 libspectrum_byte
libspectrum_snap_disciple_sector(libspectrum_snap * snap)2643 libspectrum_snap_disciple_sector( libspectrum_snap *snap )
2644 {
2645 return snap->disciple_sector;
2646 }
2647
2648 void
libspectrum_snap_set_disciple_sector(libspectrum_snap * snap,libspectrum_byte disciple_sector)2649 libspectrum_snap_set_disciple_sector( libspectrum_snap *snap, libspectrum_byte disciple_sector )
2650 {
2651 snap->disciple_sector = disciple_sector;
2652 }
2653
2654 libspectrum_byte
libspectrum_snap_disciple_data(libspectrum_snap * snap)2655 libspectrum_snap_disciple_data( libspectrum_snap *snap )
2656 {
2657 return snap->disciple_data;
2658 }
2659
2660 void
libspectrum_snap_set_disciple_data(libspectrum_snap * snap,libspectrum_byte disciple_data)2661 libspectrum_snap_set_disciple_data( libspectrum_snap *snap, libspectrum_byte disciple_data )
2662 {
2663 snap->disciple_data = disciple_data;
2664 }
2665
2666 libspectrum_byte
libspectrum_snap_disciple_status(libspectrum_snap * snap)2667 libspectrum_snap_disciple_status( libspectrum_snap *snap )
2668 {
2669 return snap->disciple_status;
2670 }
2671
2672 void
libspectrum_snap_set_disciple_status(libspectrum_snap * snap,libspectrum_byte disciple_status)2673 libspectrum_snap_set_disciple_status( libspectrum_snap *snap, libspectrum_byte disciple_status )
2674 {
2675 snap->disciple_status = disciple_status;
2676 }
2677
2678 libspectrum_byte*
libspectrum_snap_disciple_rom(libspectrum_snap * snap,int idx)2679 libspectrum_snap_disciple_rom( libspectrum_snap *snap, int idx )
2680 {
2681 return snap->disciple_rom[idx];
2682 }
2683
2684 void
libspectrum_snap_set_disciple_rom(libspectrum_snap * snap,int idx,libspectrum_byte * disciple_rom)2685 libspectrum_snap_set_disciple_rom( libspectrum_snap *snap, int idx, libspectrum_byte* disciple_rom )
2686 {
2687 snap->disciple_rom[idx] = disciple_rom;
2688 }
2689
2690 size_t
libspectrum_snap_disciple_rom_length(libspectrum_snap * snap,int idx)2691 libspectrum_snap_disciple_rom_length( libspectrum_snap *snap, int idx )
2692 {
2693 return snap->disciple_rom_length[idx];
2694 }
2695
2696 void
libspectrum_snap_set_disciple_rom_length(libspectrum_snap * snap,int idx,size_t disciple_rom_length)2697 libspectrum_snap_set_disciple_rom_length( libspectrum_snap *snap, int idx, size_t disciple_rom_length )
2698 {
2699 snap->disciple_rom_length[idx] = disciple_rom_length;
2700 }
2701
2702 libspectrum_byte*
libspectrum_snap_disciple_ram(libspectrum_snap * snap,int idx)2703 libspectrum_snap_disciple_ram( libspectrum_snap *snap, int idx )
2704 {
2705 return snap->disciple_ram[idx];
2706 }
2707
2708 void
libspectrum_snap_set_disciple_ram(libspectrum_snap * snap,int idx,libspectrum_byte * disciple_ram)2709 libspectrum_snap_set_disciple_ram( libspectrum_snap *snap, int idx, libspectrum_byte* disciple_ram )
2710 {
2711 snap->disciple_ram[idx] = disciple_ram;
2712 }
2713
2714 int
libspectrum_snap_didaktik80_active(libspectrum_snap * snap)2715 libspectrum_snap_didaktik80_active( libspectrum_snap *snap )
2716 {
2717 return snap->didaktik80_active;
2718 }
2719
2720 void
libspectrum_snap_set_didaktik80_active(libspectrum_snap * snap,int didaktik80_active)2721 libspectrum_snap_set_didaktik80_active( libspectrum_snap *snap, int didaktik80_active )
2722 {
2723 snap->didaktik80_active = didaktik80_active;
2724 }
2725
2726 int
libspectrum_snap_didaktik80_paged(libspectrum_snap * snap)2727 libspectrum_snap_didaktik80_paged( libspectrum_snap *snap )
2728 {
2729 return snap->didaktik80_paged;
2730 }
2731
2732 void
libspectrum_snap_set_didaktik80_paged(libspectrum_snap * snap,int didaktik80_paged)2733 libspectrum_snap_set_didaktik80_paged( libspectrum_snap *snap, int didaktik80_paged )
2734 {
2735 snap->didaktik80_paged = didaktik80_paged;
2736 }
2737
2738 int
libspectrum_snap_didaktik80_drive_count(libspectrum_snap * snap)2739 libspectrum_snap_didaktik80_drive_count( libspectrum_snap *snap )
2740 {
2741 return snap->didaktik80_drive_count;
2742 }
2743
2744 void
libspectrum_snap_set_didaktik80_drive_count(libspectrum_snap * snap,int didaktik80_drive_count)2745 libspectrum_snap_set_didaktik80_drive_count( libspectrum_snap *snap, int didaktik80_drive_count )
2746 {
2747 snap->didaktik80_drive_count = didaktik80_drive_count;
2748 }
2749
2750 int
libspectrum_snap_didaktik80_custom_rom(libspectrum_snap * snap)2751 libspectrum_snap_didaktik80_custom_rom( libspectrum_snap *snap )
2752 {
2753 return snap->didaktik80_custom_rom;
2754 }
2755
2756 void
libspectrum_snap_set_didaktik80_custom_rom(libspectrum_snap * snap,int didaktik80_custom_rom)2757 libspectrum_snap_set_didaktik80_custom_rom( libspectrum_snap *snap, int didaktik80_custom_rom )
2758 {
2759 snap->didaktik80_custom_rom = didaktik80_custom_rom;
2760 }
2761
2762 int
libspectrum_snap_didaktik80_direction(libspectrum_snap * snap)2763 libspectrum_snap_didaktik80_direction( libspectrum_snap *snap )
2764 {
2765 return snap->didaktik80_direction;
2766 }
2767
2768 void
libspectrum_snap_set_didaktik80_direction(libspectrum_snap * snap,int didaktik80_direction)2769 libspectrum_snap_set_didaktik80_direction( libspectrum_snap *snap, int didaktik80_direction )
2770 {
2771 snap->didaktik80_direction = didaktik80_direction;
2772 }
2773
2774 libspectrum_byte
libspectrum_snap_didaktik80_aux(libspectrum_snap * snap)2775 libspectrum_snap_didaktik80_aux( libspectrum_snap *snap )
2776 {
2777 return snap->didaktik80_aux;
2778 }
2779
2780 void
libspectrum_snap_set_didaktik80_aux(libspectrum_snap * snap,libspectrum_byte didaktik80_aux)2781 libspectrum_snap_set_didaktik80_aux( libspectrum_snap *snap, libspectrum_byte didaktik80_aux )
2782 {
2783 snap->didaktik80_aux = didaktik80_aux;
2784 }
2785
2786 libspectrum_byte
libspectrum_snap_didaktik80_track(libspectrum_snap * snap)2787 libspectrum_snap_didaktik80_track( libspectrum_snap *snap )
2788 {
2789 return snap->didaktik80_track;
2790 }
2791
2792 void
libspectrum_snap_set_didaktik80_track(libspectrum_snap * snap,libspectrum_byte didaktik80_track)2793 libspectrum_snap_set_didaktik80_track( libspectrum_snap *snap, libspectrum_byte didaktik80_track )
2794 {
2795 snap->didaktik80_track = didaktik80_track;
2796 }
2797
2798 libspectrum_byte
libspectrum_snap_didaktik80_sector(libspectrum_snap * snap)2799 libspectrum_snap_didaktik80_sector( libspectrum_snap *snap )
2800 {
2801 return snap->didaktik80_sector;
2802 }
2803
2804 void
libspectrum_snap_set_didaktik80_sector(libspectrum_snap * snap,libspectrum_byte didaktik80_sector)2805 libspectrum_snap_set_didaktik80_sector( libspectrum_snap *snap, libspectrum_byte didaktik80_sector )
2806 {
2807 snap->didaktik80_sector = didaktik80_sector;
2808 }
2809
2810 libspectrum_byte
libspectrum_snap_didaktik80_data(libspectrum_snap * snap)2811 libspectrum_snap_didaktik80_data( libspectrum_snap *snap )
2812 {
2813 return snap->didaktik80_data;
2814 }
2815
2816 void
libspectrum_snap_set_didaktik80_data(libspectrum_snap * snap,libspectrum_byte didaktik80_data)2817 libspectrum_snap_set_didaktik80_data( libspectrum_snap *snap, libspectrum_byte didaktik80_data )
2818 {
2819 snap->didaktik80_data = didaktik80_data;
2820 }
2821
2822 libspectrum_byte
libspectrum_snap_didaktik80_status(libspectrum_snap * snap)2823 libspectrum_snap_didaktik80_status( libspectrum_snap *snap )
2824 {
2825 return snap->didaktik80_status;
2826 }
2827
2828 void
libspectrum_snap_set_didaktik80_status(libspectrum_snap * snap,libspectrum_byte didaktik80_status)2829 libspectrum_snap_set_didaktik80_status( libspectrum_snap *snap, libspectrum_byte didaktik80_status )
2830 {
2831 snap->didaktik80_status = didaktik80_status;
2832 }
2833
2834 libspectrum_byte*
libspectrum_snap_didaktik80_rom(libspectrum_snap * snap,int idx)2835 libspectrum_snap_didaktik80_rom( libspectrum_snap *snap, int idx )
2836 {
2837 return snap->didaktik80_rom[idx];
2838 }
2839
2840 void
libspectrum_snap_set_didaktik80_rom(libspectrum_snap * snap,int idx,libspectrum_byte * didaktik80_rom)2841 libspectrum_snap_set_didaktik80_rom( libspectrum_snap *snap, int idx, libspectrum_byte* didaktik80_rom )
2842 {
2843 snap->didaktik80_rom[idx] = didaktik80_rom;
2844 }
2845
2846 size_t
libspectrum_snap_didaktik80_rom_length(libspectrum_snap * snap,int idx)2847 libspectrum_snap_didaktik80_rom_length( libspectrum_snap *snap, int idx )
2848 {
2849 return snap->didaktik80_rom_length[idx];
2850 }
2851
2852 void
libspectrum_snap_set_didaktik80_rom_length(libspectrum_snap * snap,int idx,size_t didaktik80_rom_length)2853 libspectrum_snap_set_didaktik80_rom_length( libspectrum_snap *snap, int idx, size_t didaktik80_rom_length )
2854 {
2855 snap->didaktik80_rom_length[idx] = didaktik80_rom_length;
2856 }
2857
2858 libspectrum_byte*
libspectrum_snap_didaktik80_ram(libspectrum_snap * snap,int idx)2859 libspectrum_snap_didaktik80_ram( libspectrum_snap *snap, int idx )
2860 {
2861 return snap->didaktik80_ram[idx];
2862 }
2863
2864 void
libspectrum_snap_set_didaktik80_ram(libspectrum_snap * snap,int idx,libspectrum_byte * didaktik80_ram)2865 libspectrum_snap_set_didaktik80_ram( libspectrum_snap *snap, int idx, libspectrum_byte* didaktik80_ram )
2866 {
2867 snap->didaktik80_ram[idx] = didaktik80_ram;
2868 }
2869
2870 int
libspectrum_snap_covox_active(libspectrum_snap * snap)2871 libspectrum_snap_covox_active( libspectrum_snap *snap )
2872 {
2873 return snap->covox_active;
2874 }
2875
2876 void
libspectrum_snap_set_covox_active(libspectrum_snap * snap,int covox_active)2877 libspectrum_snap_set_covox_active( libspectrum_snap *snap, int covox_active )
2878 {
2879 snap->covox_active = covox_active;
2880 }
2881
2882 libspectrum_byte
libspectrum_snap_covox_dac(libspectrum_snap * snap)2883 libspectrum_snap_covox_dac( libspectrum_snap *snap )
2884 {
2885 return snap->covox_dac;
2886 }
2887
2888 void
libspectrum_snap_set_covox_dac(libspectrum_snap * snap,libspectrum_byte covox_dac)2889 libspectrum_snap_set_covox_dac( libspectrum_snap *snap, libspectrum_byte covox_dac )
2890 {
2891 snap->covox_dac = covox_dac;
2892 }
2893
2894 int
libspectrum_snap_ulaplus_active(libspectrum_snap * snap)2895 libspectrum_snap_ulaplus_active( libspectrum_snap *snap )
2896 {
2897 return snap->ulaplus_active;
2898 }
2899
2900 void
libspectrum_snap_set_ulaplus_active(libspectrum_snap * snap,int ulaplus_active)2901 libspectrum_snap_set_ulaplus_active( libspectrum_snap *snap, int ulaplus_active )
2902 {
2903 snap->ulaplus_active = ulaplus_active;
2904 }
2905
2906 int
libspectrum_snap_ulaplus_palette_enabled(libspectrum_snap * snap)2907 libspectrum_snap_ulaplus_palette_enabled( libspectrum_snap *snap )
2908 {
2909 return snap->ulaplus_palette_enabled;
2910 }
2911
2912 void
libspectrum_snap_set_ulaplus_palette_enabled(libspectrum_snap * snap,int ulaplus_palette_enabled)2913 libspectrum_snap_set_ulaplus_palette_enabled( libspectrum_snap *snap, int ulaplus_palette_enabled )
2914 {
2915 snap->ulaplus_palette_enabled = ulaplus_palette_enabled;
2916 }
2917
2918 libspectrum_byte
libspectrum_snap_ulaplus_current_register(libspectrum_snap * snap)2919 libspectrum_snap_ulaplus_current_register( libspectrum_snap *snap )
2920 {
2921 return snap->ulaplus_current_register;
2922 }
2923
2924 void
libspectrum_snap_set_ulaplus_current_register(libspectrum_snap * snap,libspectrum_byte ulaplus_current_register)2925 libspectrum_snap_set_ulaplus_current_register( libspectrum_snap *snap, libspectrum_byte ulaplus_current_register )
2926 {
2927 snap->ulaplus_current_register = ulaplus_current_register;
2928 }
2929
2930 libspectrum_byte*
libspectrum_snap_ulaplus_palette(libspectrum_snap * snap,int idx)2931 libspectrum_snap_ulaplus_palette( libspectrum_snap *snap, int idx )
2932 {
2933 return snap->ulaplus_palette[idx];
2934 }
2935
2936 void
libspectrum_snap_set_ulaplus_palette(libspectrum_snap * snap,int idx,libspectrum_byte * ulaplus_palette)2937 libspectrum_snap_set_ulaplus_palette( libspectrum_snap *snap, int idx, libspectrum_byte* ulaplus_palette )
2938 {
2939 snap->ulaplus_palette[idx] = ulaplus_palette;
2940 }
2941
2942 libspectrum_byte
libspectrum_snap_ulaplus_ff_register(libspectrum_snap * snap)2943 libspectrum_snap_ulaplus_ff_register( libspectrum_snap *snap )
2944 {
2945 return snap->ulaplus_ff_register;
2946 }
2947
2948 void
libspectrum_snap_set_ulaplus_ff_register(libspectrum_snap * snap,libspectrum_byte ulaplus_ff_register)2949 libspectrum_snap_set_ulaplus_ff_register( libspectrum_snap *snap, libspectrum_byte ulaplus_ff_register )
2950 {
2951 snap->ulaplus_ff_register = ulaplus_ff_register;
2952 }
2953
2954 int
libspectrum_snap_multiface_active(libspectrum_snap * snap)2955 libspectrum_snap_multiface_active( libspectrum_snap *snap )
2956 {
2957 return snap->multiface_active;
2958 }
2959
2960 void
libspectrum_snap_set_multiface_active(libspectrum_snap * snap,int multiface_active)2961 libspectrum_snap_set_multiface_active( libspectrum_snap *snap, int multiface_active )
2962 {
2963 snap->multiface_active = multiface_active;
2964 }
2965
2966 int
libspectrum_snap_multiface_paged(libspectrum_snap * snap)2967 libspectrum_snap_multiface_paged( libspectrum_snap *snap )
2968 {
2969 return snap->multiface_paged;
2970 }
2971
2972 void
libspectrum_snap_set_multiface_paged(libspectrum_snap * snap,int multiface_paged)2973 libspectrum_snap_set_multiface_paged( libspectrum_snap *snap, int multiface_paged )
2974 {
2975 snap->multiface_paged = multiface_paged;
2976 }
2977
2978 int
libspectrum_snap_multiface_model_one(libspectrum_snap * snap)2979 libspectrum_snap_multiface_model_one( libspectrum_snap *snap )
2980 {
2981 return snap->multiface_model_one;
2982 }
2983
2984 void
libspectrum_snap_set_multiface_model_one(libspectrum_snap * snap,int multiface_model_one)2985 libspectrum_snap_set_multiface_model_one( libspectrum_snap *snap, int multiface_model_one )
2986 {
2987 snap->multiface_model_one = multiface_model_one;
2988 }
2989
2990 int
libspectrum_snap_multiface_model_128(libspectrum_snap * snap)2991 libspectrum_snap_multiface_model_128( libspectrum_snap *snap )
2992 {
2993 return snap->multiface_model_128;
2994 }
2995
2996 void
libspectrum_snap_set_multiface_model_128(libspectrum_snap * snap,int multiface_model_128)2997 libspectrum_snap_set_multiface_model_128( libspectrum_snap *snap, int multiface_model_128 )
2998 {
2999 snap->multiface_model_128 = multiface_model_128;
3000 }
3001
3002 int
libspectrum_snap_multiface_model_3(libspectrum_snap * snap)3003 libspectrum_snap_multiface_model_3( libspectrum_snap *snap )
3004 {
3005 return snap->multiface_model_3;
3006 }
3007
3008 void
libspectrum_snap_set_multiface_model_3(libspectrum_snap * snap,int multiface_model_3)3009 libspectrum_snap_set_multiface_model_3( libspectrum_snap *snap, int multiface_model_3 )
3010 {
3011 snap->multiface_model_3 = multiface_model_3;
3012 }
3013
3014 int
libspectrum_snap_multiface_disabled(libspectrum_snap * snap)3015 libspectrum_snap_multiface_disabled( libspectrum_snap *snap )
3016 {
3017 return snap->multiface_disabled;
3018 }
3019
3020 void
libspectrum_snap_set_multiface_disabled(libspectrum_snap * snap,int multiface_disabled)3021 libspectrum_snap_set_multiface_disabled( libspectrum_snap *snap, int multiface_disabled )
3022 {
3023 snap->multiface_disabled = multiface_disabled;
3024 }
3025
3026 int
libspectrum_snap_multiface_software_lockout(libspectrum_snap * snap)3027 libspectrum_snap_multiface_software_lockout( libspectrum_snap *snap )
3028 {
3029 return snap->multiface_software_lockout;
3030 }
3031
3032 void
libspectrum_snap_set_multiface_software_lockout(libspectrum_snap * snap,int multiface_software_lockout)3033 libspectrum_snap_set_multiface_software_lockout( libspectrum_snap *snap, int multiface_software_lockout )
3034 {
3035 snap->multiface_software_lockout = multiface_software_lockout;
3036 }
3037
3038 int
libspectrum_snap_multiface_red_button_disabled(libspectrum_snap * snap)3039 libspectrum_snap_multiface_red_button_disabled( libspectrum_snap *snap )
3040 {
3041 return snap->multiface_red_button_disabled;
3042 }
3043
3044 void
libspectrum_snap_set_multiface_red_button_disabled(libspectrum_snap * snap,int multiface_red_button_disabled)3045 libspectrum_snap_set_multiface_red_button_disabled( libspectrum_snap *snap, int multiface_red_button_disabled )
3046 {
3047 snap->multiface_red_button_disabled = multiface_red_button_disabled;
3048 }
3049
3050 libspectrum_byte*
libspectrum_snap_multiface_ram(libspectrum_snap * snap,int idx)3051 libspectrum_snap_multiface_ram( libspectrum_snap *snap, int idx )
3052 {
3053 return snap->multiface_ram[idx];
3054 }
3055
3056 void
libspectrum_snap_set_multiface_ram(libspectrum_snap * snap,int idx,libspectrum_byte * multiface_ram)3057 libspectrum_snap_set_multiface_ram( libspectrum_snap *snap, int idx, libspectrum_byte* multiface_ram )
3058 {
3059 snap->multiface_ram[idx] = multiface_ram;
3060 }
3061
3062 size_t
libspectrum_snap_multiface_ram_length(libspectrum_snap * snap,int idx)3063 libspectrum_snap_multiface_ram_length( libspectrum_snap *snap, int idx )
3064 {
3065 return snap->multiface_ram_length[idx];
3066 }
3067
3068 void
libspectrum_snap_set_multiface_ram_length(libspectrum_snap * snap,int idx,size_t multiface_ram_length)3069 libspectrum_snap_set_multiface_ram_length( libspectrum_snap *snap, int idx, size_t multiface_ram_length )
3070 {
3071 snap->multiface_ram_length[idx] = multiface_ram_length;
3072 }
3073
3074 int
libspectrum_snap_zxmmc_active(libspectrum_snap * snap)3075 libspectrum_snap_zxmmc_active( libspectrum_snap *snap )
3076 {
3077 return snap->zxmmc_active;
3078 }
3079
3080 void
libspectrum_snap_set_zxmmc_active(libspectrum_snap * snap,int zxmmc_active)3081 libspectrum_snap_set_zxmmc_active( libspectrum_snap *snap, int zxmmc_active )
3082 {
3083 snap->zxmmc_active = zxmmc_active;
3084 }
3085
3086 int
libspectrum_snap_ttx2000s_active(libspectrum_snap * snap)3087 libspectrum_snap_ttx2000s_active( libspectrum_snap *snap )
3088 {
3089 return snap->ttx2000s_active;
3090 }
3091
3092 void
libspectrum_snap_set_ttx2000s_active(libspectrum_snap * snap,int ttx2000s_active)3093 libspectrum_snap_set_ttx2000s_active( libspectrum_snap *snap, int ttx2000s_active )
3094 {
3095 snap->ttx2000s_active = ttx2000s_active;
3096 }
3097