mirror of
https://github.com/jscrane/r65emu.git
synced 2025-08-15 11:27:25 +00:00
break up hardware.h
This commit is contained in:
45
hardware.h
45
hardware.h
@@ -5,51 +5,12 @@
|
|||||||
#ifndef __HARDWARE_H__
|
#ifndef __HARDWARE_H__
|
||||||
#define __HARDWARE_H__
|
#define __HARDWARE_H__
|
||||||
|
|
||||||
// TFT display...
|
|
||||||
//#define USE_UTFT
|
|
||||||
#define USE_ESPI
|
|
||||||
|
|
||||||
#if defined(USE_UTFT)
|
|
||||||
#undef TFT_BACKLIGHT
|
|
||||||
#define TFT_MODEL ILI9325C
|
|
||||||
#define TFT_RS 32
|
|
||||||
#define TFT_WR 33
|
|
||||||
#define TFT_CS 27
|
|
||||||
#define TFT_RST 26
|
|
||||||
|
|
||||||
#elif defined(USE_ESPI)
|
|
||||||
//#define USER_SETUP_LOADED
|
|
||||||
//#define ILI9163_DRIVER
|
|
||||||
//#define TFT_CS 5
|
|
||||||
//#define TFT_DC 2
|
|
||||||
//#define TFT_MOSI 23
|
|
||||||
//#define TFT_MISO -1
|
|
||||||
//#define TFT_SCLK 18
|
|
||||||
//#define TFT_RST -1
|
|
||||||
//#define SPI_FREQUENCY 40000000
|
|
||||||
//#define LOAD_GLCD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// PS/2 keyboard
|
|
||||||
//#define KBD_DATA 14
|
|
||||||
//#define KBD_IRQ 0
|
|
||||||
#define KBD_DATA 34
|
|
||||||
#define KBD_IRQ 35
|
|
||||||
|
|
||||||
// SPI-RAM
|
|
||||||
#undef SPIRAM_CS
|
|
||||||
|
|
||||||
// "tape" storage...
|
|
||||||
#undef SD_CS
|
|
||||||
#if defined(ESP32)
|
#if defined(ESP32)
|
||||||
#define USE_SPIFFS
|
#include "hw/esp32-utft-dac.h"
|
||||||
|
#elif defined(ESP8266)
|
||||||
|
#include "hw/esp8266-pwm.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// sound
|
|
||||||
#define DAC_SOUND 25
|
|
||||||
#define PWM_SOUND 25
|
|
||||||
#define PWM_DUTY 20 // 20/1024 -> volume
|
|
||||||
|
|
||||||
bool hardware_reset();
|
bool hardware_reset();
|
||||||
void hardware_init(class CPU &);
|
void hardware_init(class CPU &);
|
||||||
void hardware_checkpoint(class Stream &);
|
void hardware_checkpoint(class Stream &);
|
||||||
|
28
hw/esp32-utft-dac.h
Normal file
28
hw/esp32-utft-dac.h
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* esp32-utft-dac.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
// TFT display...
|
||||||
|
#define USE_UTFT
|
||||||
|
#undef TFT_BACKLIGHT
|
||||||
|
#define TFT_MODEL ILI9325C
|
||||||
|
#define TFT_RS 32
|
||||||
|
#define TFT_WR 33
|
||||||
|
#define TFT_CS 27
|
||||||
|
#define TFT_RST 26
|
||||||
|
|
||||||
|
// PS/2 keyboard
|
||||||
|
#define KBD_DATA 34
|
||||||
|
#define KBD_IRQ 35
|
||||||
|
|
||||||
|
// SPI-RAM
|
||||||
|
#undef SPIRAM_CS
|
||||||
|
|
||||||
|
// "tape" storage...
|
||||||
|
#undef SD_CS
|
||||||
|
#define USE_SPIFFS
|
||||||
|
|
||||||
|
// sound: dac and pwm
|
||||||
|
#define DAC_SOUND 25
|
||||||
|
#define PWM_SOUND 25
|
||||||
|
#define PWM_DUTY 20 // 20/1024 -> volume
|
29
hw/esp8266-pwm.h
Normal file
29
hw/esp8266-pwm.h
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* esp8266-pwm.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define USE_ESPI
|
||||||
|
//#define USER_SETUP_LOADED
|
||||||
|
//#define ILI9163_DRIVER
|
||||||
|
//#define TFT_CS 5
|
||||||
|
//#define TFT_DC 2
|
||||||
|
//#define TFT_MOSI 23
|
||||||
|
//#define TFT_MISO -1
|
||||||
|
//#define TFT_SCLK 18
|
||||||
|
//#define TFT_RST -1
|
||||||
|
//#define SPI_FREQUENCY 40000000
|
||||||
|
//#define LOAD_GLCD
|
||||||
|
|
||||||
|
// PS/2 keyboard
|
||||||
|
#define KBD_DATA D3
|
||||||
|
#define KBD_IRQ D4
|
||||||
|
|
||||||
|
// SPI-RAM
|
||||||
|
#undef SPIRAM_CS
|
||||||
|
|
||||||
|
// "tape" storage...
|
||||||
|
#undef SD_CS
|
||||||
|
|
||||||
|
// sound
|
||||||
|
#define PWM_SOUND 25
|
||||||
|
#define PWM_DUTY 20 // 20/1024 -> volume
|
Reference in New Issue
Block a user