--- /dev/null
+Copyright (c) 2021 PiStorm developers
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// SPDX-License-Identifier: MIT
+
#include <assert.h>
#include <dirent.h>
#include <endian.h>
#include <sys/ioctl.h>
#include "emulator.h"
#include "gpio/ps_protocol.h"
-#include "platforms/amiga/gayle-ide/ide.h"
#define SIZE_KILO 1024
#define SIZE_MEGA (1024 * 1024)
void m68k_set_irq(unsigned int level) {
}
-
-struct ide_controller *get_ide(int index) {
- return NULL;
-}
+// SPDX-License-Identifier: MIT
+
#include "platforms/platforms.h"
#include <stdio.h>
#include <stdlib.h>
+// SPDX-License-Identifier: MIT
+
#ifndef _CONFIG_FILE_H
#define _CONFIG_FILE_H
+// SPDX-License-Identifier: MIT
+
#include "m68k.h"
#include "emulator.h"
#include "platforms/platforms.h"
+// SPDX-License-Identifier: MIT
/**
* pistorm
* emulator function declarations
+// SPDX-License-Identifier: MIT
+
/*
Original Copyright 2020 Claude Schwarz
Code reorganized and rewritten by
+// SPDX-License-Identifier: MIT
+
/*
Code reorganized and rewritten by
Niklas Ekström 2021 (https://github.com/niklasekstrom)
+// SPDX-License-Identifier: MIT
+
#include <linux/input.h>
#include <sys/ioctl.h>
#include <pthread.h>
+// SPDX-License-Identifier: MIT
+
#include <stdint.h>
enum keypress_type {
*/
static inline uint m68ki_read_imm_16(void)
{
+ uint32_t address = ADDRESS_68K(REG_PC);
+ for (int i = 0; i < read_ranges; i++) {
+ if(address >= read_addr[i] && address < read_upper[i]) {
+ REG_PC += 2;
+ return be16toh(((unsigned short *)(read_data[i] + (address - read_addr[i])))[0]);
+ }
+ }
+
m68ki_set_fc(FLAG_S | FUNCTION_CODE_USER_PROGRAM); /* auto-disable (see m68kcpu.h) */
m68ki_cpu.mmu_tmp_fc = FLAG_S | FUNCTION_CODE_USER_PROGRAM;
m68ki_cpu.mmu_tmp_rw = 1;
// address = pmmu_translate_addr(address,1);
#endif
#endif
+ uint32_t address = ADDRESS_68K(REG_PC);
+ for (int i = 0; i < read_ranges; i++) {
+ if(address >= read_addr[i] && address < read_upper[i]) {
+ REG_PC += 4;
+ return be32toh(((unsigned int *)(read_data[i] + (address - read_addr[i])))[0]);
+ }
+ }
#if M68K_EMULATE_PREFETCH
uint temp_val;
+// SPDX-License-Identifier: MIT
#include <math.h>
#include <stdio.h>
#include <stdarg.h>
+// SPDX-License-Identifier: MIT
+
#include "config_file/config_file.h"
#include "m68k.h"
#include "platforms/amiga/Gayle.h"
+// SPDX-License-Identifier: MIT
+
//
// Gayle.c
// Originally based on Omega's Gayle emulation,
+//SPDX-License-Identifier: MIT
+
//
// Gayle.h
// Omega
+// SPDX-License-Identifier: MIT
+
#include "platforms/platforms.h"
#include "amiga-autoconf.h"
#include <stdio.h>
+// SPDX-License-Identifier: MIT
+
#include "config_file/config_file.h"
#define AC_Z2_BASE 0xE80000
+// SPDX-License-Identifier: MIT
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+// SPDX-License-Identifier: MIT
+
#include "Gayle.h"
#include "config_file/config_file.h"
#include "amiga-registers.h"
+// SPDX-License-Identifier: MIT
+
void configure_rtc_emulation_amiga(uint8_t enabled);
void set_hard_drive_image_file_amiga(uint8_t index, char *filename);
int custom_read_amiga(struct emulator_config *cfg, unsigned int addr, unsigned int *val, unsigned char type);
+// SPDX-License-Identifier: MIT
+
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
+// SPDX-License-Identifier: MIT
+
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
+// SPDX-License-Identifier: MIT
+
#include <exec/resident.h>
#include <exec/memory.h>
#include <exec/alerts.h>
+// SPDX-License-Identifier: MIT
+
#define PINET_OFFSET 0x80010000
#define PINET_REGSIZE 0x00010000
#define PINET_UPPER 0x80020000
PINET_CMD_ADDR3 = 0x18,
PINET_CMD_ADDR4 = 0x1C,
PINET_CMD_FRAME = 0x1000,
-};
\ No newline at end of file
+};
+// SPDX-License-Identifier: MIT
+
#include <stdio.h>
#include <stdint.h>
#include <fcntl.h>
+// SPDX-License-Identifier: MIT
+
void pinet_init(char *dev);
void handle_pinet_write(uint32_t addr, uint32_t val, uint8_t type);
uint32_t handle_pinet_read(uint32_t addr, uint8_t type);
+// SPDX-License-Identifier: MIT
+
#include <stdio.h>
#include <stdint.h>
#include <string.h>
+// SPDX-License-Identifier: MIT
+
#include <exec/resident.h>
#include <exec/errors.h>
#include <exec/memory.h>
+// SPDX-License-Identifier: MIT
+
/*
* Based on:
* Amiga ZZ9000 USB Storage Driver (ZZ9000USBStorage.device)
+// SPDX-License-Identifier: MIT
+
#define NUM_UNITS 7
#define PISCSI_OFFSET 0x80000000
#define PISCSI_REGSIZE 0x00010000
+// SPDX-License-Identifier: MIT
+
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
+// SPDX-License-Identifier: MIT
+
#include <stdint.h>
#include "platforms/amiga/hunk-reloc.h"
+// SPDX-License-Identifier: MIT
+
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
+// SPDX-License-Identifier: MIT
+
#include "emulator.h"
#include "rtg.h"
+// SPDX-License-Identifier: MIT
+
#include <stdint.h>
#include <endian.h>
#include <stdio.h>
+// SPDX-License-Identifier: MIT
+
#define PIGFX_RTG_BASE 0x70000000
#define PIGFX_REG_SIZE 0x00010000
#define PIGFX_RTG_SIZE 0x02000000
+// SPDX-License-Identifier: MIT
+
#ifndef boardinfo_H
#define boardinfo_H
+// SPDX-License-Identifier: MIT
+
// PiStorm RTG driver, VBCC edition.
// Based in part on the ZZ9000 RTG driver.
+// SPDX-License-Identifier: MIT
+
// "Register" offsets for sending data to the RTG.
enum pi_regs {
RTG_COMMAND = 0x00,
+// SPDX-License-Identifier: MIT
+
#ifndef settings_H
#define settings_H
+// SPDX-License-Identifier: MIT
+
#include <stdlib.h>
#include <string.h>
+// SPDX-License-Identifier: MIT
+
int handle_register_read_dummy(unsigned int addr, unsigned char type, unsigned int *val) {
if (addr) {}
if (type) {}
+// SPDX-License-Identifier: MIT
+
#include "platforms.h"
#include <stdio.h>
#include <stdlib.h>
}
return cfg;
-}
\ No newline at end of file
+}
+// SPDX-License-Identifier: MIT
+
#include "config_file/config_file.h"
enum base_platforms {
+// SPDX-License-Identifier: MIT
+
#include <time.h>
#include <stdio.h>
#include <stdint.h>
+// SPDX-License-Identifier: MIT
+
void put_rtc_byte(uint32_t address_, uint8_t value, uint8_t rtc_type);
uint8_t get_rtc_byte(uint32_t address_, uint8_t rtc_type);
RTC_TYPE_MSM,
RTC_TYPE_RICOH,
RTC_TYPE_NONE,
-};
\ No newline at end of file
+};