fork of PCE focusing on macplus, supporting DaynaPort SCSI network emulation
at master 86 lines 2.7 kB view raw
1/***************************************************************************** 2 * pce * 3 *****************************************************************************/ 4 5/***************************************************************************** 6 * File name: src/arch/macplus/sony.h * 7 * Created: 2007-11-15 by Hampa Hug <hampa@hampa.ch> * 8 * Copyright: (C) 2007-2012 Hampa Hug <hampa@hampa.ch> * 9 *****************************************************************************/ 10 11/***************************************************************************** 12 * This program is free software. You can redistribute it and / or modify it * 13 * under the terms of the GNU General Public License version 2 as published * 14 * by the Free Software Foundation. * 15 * * 16 * This program is distributed in the hope that it will be useful, but * 17 * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 * Public License for more details. * 20 *****************************************************************************/ 21 22 23#ifndef PCE_MACPLUS_SONY_H 24#define PCE_MACPLUS_SONY_H 1 25 26 27#include <devices/memory.h> 28#include <drivers/block/block.h> 29 30 31#define SONY_DRIVES 8 32 33 34typedef struct { 35 char open; 36 char patched; 37 char enable; 38 39 memory_t *mem; 40 disks_t *dsks; 41 42 unsigned delay_val[SONY_DRIVES]; 43 unsigned delay_cnt[SONY_DRIVES]; 44 45 unsigned long check_addr; 46 unsigned long icon_addr[2]; 47 48 unsigned long tag_buf; 49 50 char format_hd_as_dd; 51 52 unsigned format_cnt; 53 unsigned long format_list[16]; 54 55 unsigned long pcex_addr; 56 unsigned long sony_addr; 57 unsigned char patch_buf[64]; 58 59 unsigned long d0; 60 unsigned long a0; 61 unsigned long a1; 62 unsigned long pc; 63} mac_sony_t; 64 65 66void mac_sony_init (mac_sony_t *sony, int enable); 67void mac_sony_free (mac_sony_t *sony); 68 69void mac_sony_set_mem (mac_sony_t *sony, memory_t *mem); 70 71void mac_sony_set_disks (mac_sony_t *sony, disks_t *dsks); 72 73void mac_sony_patch (mac_sony_t *sony); 74 75void mac_sony_set_delay (mac_sony_t *sony, unsigned drive, unsigned delay); 76 77void mac_sony_insert (mac_sony_t *sony, unsigned drive); 78 79int mac_sony_check (mac_sony_t *sony); 80 81int mac_sony_hook (mac_sony_t *sony, unsigned val); 82 83void mac_sony_reset (mac_sony_t *sony); 84 85 86#endif