mirror of
https://github.com/n64dev/cen64.git
synced 2025-04-02 10:31:54 -04:00
Replaced all references to simulation with emulation Updated copyright year Updated .gitignore to reduce chances of random files being uploaded to the repo Added .gitattributes to normalize all text files, and to ignore binary files (which includes the logo and the NEC PDF)
45 lines
1.1 KiB
C
45 lines
1.1 KiB
C
//
|
|
// pi/controller.h: Parallel interface controller.
|
|
//
|
|
// CEN64: Cycle-Accurate Nintendo 64 Emulator.
|
|
// Copyright (C) 2015, Tyler J. Stachecki.
|
|
//
|
|
// This file is subject to the terms and conditions defined in
|
|
// 'LICENSE', which is part of this source code package.
|
|
//
|
|
|
|
#ifndef __pi_controller_h__
|
|
#define __pi_controller_h__
|
|
#include "common.h"
|
|
|
|
struct bus_controller *bus;
|
|
|
|
enum pi_register {
|
|
#define X(reg) reg,
|
|
#include "pi/registers.md"
|
|
#undef X
|
|
NUM_PI_REGISTERS
|
|
};
|
|
|
|
#ifdef DEBUG_MMIO_REGISTER_ACCESS
|
|
extern const char *pi_register_mnemonics[NUM_PI_REGISTERS];
|
|
#endif
|
|
|
|
struct pi_controller {
|
|
struct bus_controller *bus;
|
|
const uint8_t *rom;
|
|
size_t rom_size;
|
|
|
|
uint32_t regs[NUM_PI_REGISTERS];
|
|
};
|
|
|
|
cen64_cold int pi_init(struct pi_controller *pi, struct bus_controller *bus,
|
|
const uint8_t *rom, size_t rom_size);
|
|
|
|
int read_cart_rom(void *opaque, uint32_t address, uint32_t *word);
|
|
int read_pi_regs(void *opaque, uint32_t address, uint32_t *word);
|
|
int write_cart_rom(void *opaque, uint32_t address, uint32_t word, uint32_t dqm);
|
|
int write_pi_regs(void *opaque, uint32_t address, uint32_t word, uint32_t dqm);
|
|
|
|
#endif
|
|
|