mirror of
https://github.com/libretro/Mu.git
synced 2026-09-23 07:05:37 +00:00
Add skeleton files for some T3 chips
This commit is contained in:
@@ -157,8 +157,7 @@ support_palm_os5{
|
||||
../../src/armv5te/emuVarPool.c \
|
||||
../../src/armv5te/thumb_interpreter.cpp \
|
||||
../../src/armv5te/mem.c \
|
||||
../../src/armv5te/mmu.c \
|
||||
../../src/tungstenT3Bus.c
|
||||
../../src/armv5te/mmu.c
|
||||
|
||||
HEADERS += \
|
||||
../../src/pxa260/pxa260_CPU.h \
|
||||
@@ -197,6 +196,8 @@ INCLUDEPATH += $$PWD/qt-common/include
|
||||
SOURCES += \
|
||||
../../src/dbvz.c \
|
||||
../../src/fileLauncher/launcher.c \
|
||||
../../src/tps65010.c \
|
||||
../../src/w86l488.c \
|
||||
debugviewer.cpp \
|
||||
emuwrapper.cpp \
|
||||
main.cpp \
|
||||
@@ -226,6 +227,8 @@ HEADERS += \
|
||||
../../src/dbvz.h \
|
||||
../../src/fileLauncher/launcher.h \
|
||||
../../src/pxa260/pxa260Accessors.c.h \
|
||||
../../src/tps65010.h \
|
||||
../../src/w86l488.h \
|
||||
debugviewer.h \
|
||||
emuwrapper.h \
|
||||
mainwindow.h \
|
||||
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
//calling these while newFrameReady() == false is undefined behavior, the other thread may be writing to them
|
||||
const QImage getFramebufferImage(){return QImage((uchar*)palmFramebuffer, palmFramebufferWidth, palmFramebufferHeight, palmFramebufferWidth * sizeof(uint16_t), QImage::Format_RGB16);}
|
||||
const int16_t* getAudioSamples() const{return palmAudio;}
|
||||
bool getPowerButtonLed() const{return palmMisc.powerButtonLed;}
|
||||
bool getPowerButtonLed() const{return palmMisc.greenLed;}
|
||||
|
||||
QVector<QString>& debugGetLogEntrys();
|
||||
QVector<uint64_t>& debugGetDuplicateLogEntryCount();
|
||||
|
||||
@@ -974,7 +974,7 @@ static uint16_t getPwmc1(void){
|
||||
|
||||
//updaters
|
||||
static void updatePowerButtonLedStatus(void){
|
||||
palmMisc.powerButtonLed = !!(getPortBValue() & 0x40) != palmMisc.batteryCharging;
|
||||
palmMisc.greenLed = !!(getPortBValue() & 0x40) != palmMisc.batteryCharging;
|
||||
}
|
||||
|
||||
static void updateVibratorStatus(void){
|
||||
|
||||
@@ -398,7 +398,7 @@ bool emulatorSaveState(uint8_t* data, uint32_t size){
|
||||
offset += sandboxStateSize();
|
||||
|
||||
//misc
|
||||
writeStateValue8(data + offset, palmMisc.powerButtonLed);
|
||||
writeStateValue8(data + offset, palmMisc.greenLed);
|
||||
offset += sizeof(uint8_t);
|
||||
writeStateValue8(data + offset, palmMisc.lcdOn);
|
||||
offset += sizeof(uint8_t);
|
||||
@@ -543,7 +543,7 @@ bool emulatorLoadState(uint8_t* data, uint32_t size){
|
||||
offset += sandboxStateSize();
|
||||
|
||||
//misc
|
||||
palmMisc.powerButtonLed = readStateValue8(data + offset);
|
||||
palmMisc.greenLed = readStateValue8(data + offset);
|
||||
offset += sizeof(uint8_t);
|
||||
palmMisc.lcdOn = readStateValue8(data + offset);
|
||||
offset += sizeof(uint8_t);
|
||||
|
||||
@@ -156,7 +156,10 @@ typedef struct{
|
||||
}sd_card_t;
|
||||
|
||||
typedef struct{
|
||||
bool powerButtonLed;
|
||||
bool greenLed;
|
||||
#if defined(EMU_SUPPORT_PALM_OS5)
|
||||
bool redLed;
|
||||
#endif
|
||||
bool lcdOn;
|
||||
uint8_t backlightLevel;
|
||||
bool vibratorOn;
|
||||
|
||||
@@ -42,7 +42,8 @@ ifeq ($(EMU_SUPPORT_PALM_OS5), 1)
|
||||
$(EMU_PATH)/armv5te/emuVarPool.c \
|
||||
$(EMU_PATH)/armv5te/mem.c \
|
||||
$(EMU_PATH)/armv5te/mmu.c \
|
||||
$(EMU_PATH)/tungstenT3Bus.c
|
||||
$(EMU_PATH)/tps65010.c \
|
||||
$(EMU_PATH)/w86l488.c
|
||||
EMU_SOURCES_CXX += $(EMU_PATH)/armv5te/arm_interpreter.cpp \
|
||||
$(EMU_PATH)/armv5te/thumb_interpreter.cpp \
|
||||
$(EMU_PATH)/armv5te/cpu.cpp \
|
||||
|
||||
@@ -123,6 +123,14 @@ bool pxa260Init(uint8_t** returnRom, uint8_t** returnRam){
|
||||
write_half_map[PXA260_START_BANK(PXA260_MEMCTRL_BASE)] = bad_write_half;
|
||||
write_word_map[PXA260_START_BANK(PXA260_MEMCTRL_BASE)] = pxa260_memctrl_write_word;
|
||||
|
||||
//W86L488
|
||||
read_byte_map[PXA260_START_BANK(TUNGSTEN_T3_W86L488_START_ADDRESS)] = bad_read_byte;
|
||||
read_half_map[PXA260_START_BANK(TUNGSTEN_T3_W86L488_START_ADDRESS)] = pxa260_static_chip_select_2_read_half;
|
||||
read_word_map[PXA260_START_BANK(TUNGSTEN_T3_W86L488_START_ADDRESS)] = bad_read_word;
|
||||
write_byte_map[PXA260_START_BANK(TUNGSTEN_T3_W86L488_START_ADDRESS)] = bad_write_byte;
|
||||
write_half_map[PXA260_START_BANK(TUNGSTEN_T3_W86L488_START_ADDRESS)] = pxa260_static_chip_select_2_write_half;
|
||||
write_word_map[PXA260_START_BANK(TUNGSTEN_T3_W86L488_START_ADDRESS)] = bad_write_word;
|
||||
|
||||
*returnRom = mem_areas[0].ptr;
|
||||
*returnRam = mem_areas[1].ptr;
|
||||
|
||||
|
||||
@@ -150,3 +150,12 @@ static void pxa260_pcmcia1_write_half(uint32_t addr, uint16_t value){
|
||||
static void pxa260_pcmcia1_write_word(uint32_t addr, uint32_t value){
|
||||
debugLog("PCMCIA1 32 bit write:0x%08X, value:0x%08X\n", addr, value);
|
||||
}
|
||||
|
||||
static uint16_t pxa260_static_chip_select_2_read_half(uint32_t addr){
|
||||
return w86l488Read16(addr & 0x0E);
|
||||
}
|
||||
|
||||
static void pxa260_static_chip_select_2_write_half(uint32_t addr, uint16_t value){
|
||||
w86l488Write16(addr & 0x0E, value);
|
||||
}
|
||||
|
||||
|
||||
33
src/tps65010.c
Normal file
33
src/tps65010.c
Normal file
@@ -0,0 +1,33 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "emulator.h"
|
||||
|
||||
|
||||
void tps65010Reset(void){
|
||||
|
||||
}
|
||||
|
||||
uint32_t tps65010StateSize(void){
|
||||
uint32_t size = 0;
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
void tps65010SaveState(uint8_t* data){
|
||||
uint32_t offset = 0;
|
||||
|
||||
}
|
||||
|
||||
void tps65010LoadState(uint8_t* data){
|
||||
uint32_t offset = 0;
|
||||
|
||||
}
|
||||
|
||||
void tps65010SetChipSelect(bool value){
|
||||
|
||||
}
|
||||
|
||||
bool tps65010ExchangeBit(bool bit){
|
||||
debugLog("Unimplemented T3 PMU exchange, bit:%d\n", bit);
|
||||
}
|
||||
15
src/tps65010.h
Normal file
15
src/tps65010.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef TPS65010_H
|
||||
#define TPS65010_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
void tps65010Reset(void);
|
||||
uint32_t tps65010StateSize(void);
|
||||
void tps65010SaveState(uint8_t* data);
|
||||
void tps65010LoadState(uint8_t* data);
|
||||
|
||||
void tps65010SetChipSelect(bool value);
|
||||
bool tps65010ExchangeBit(bool bit);
|
||||
|
||||
#endif
|
||||
@@ -1,17 +1,6 @@
|
||||
#ifndef TUNGSTEN_T3_BUS_H
|
||||
#define TUNGSTEN_T3_BUS_H
|
||||
|
||||
#define PXA260_ROM_START_ADDRESS 0x00000000
|
||||
#define PXA260_RAM_START_ADDRESS 0xA0000000
|
||||
#define PXA260_PCMCIA0_START_ADDRESS 0x20000000
|
||||
#define PXA260_PCMCIA1_START_ADDRESS 0x30000000
|
||||
#define PXA260_REG_START_ADDRESS 0x40000000
|
||||
#define TUNGSTEN_T3_ROM_SIZE (10 * 0x100000)//10mb ROM
|
||||
#define TUNGSTEN_T3_RAM_SIZE (64 * 0x100000)//64mb RAM
|
||||
#define PXA260_PCMCIA0_SIZE 0x10000000
|
||||
#define PXA260_PCMCIA1_SIZE 0x10000000
|
||||
#define PXA260_REG_SIZE 0x0C000000
|
||||
|
||||
#define PXA260_BANK_SCOOT 26
|
||||
#define PXA260_NUM_BANKS(areaSize) (((areaSize) >> PXA260_BANK_SCOOT) + ((areaSize) & ((1 << PXA260_BANK_SCOOT) - 1) ? 1 : 0))
|
||||
#define PXA260_START_BANK(address) ((address) >> PXA260_BANK_SCOOT)
|
||||
@@ -20,5 +9,15 @@
|
||||
#define PXA260_BANK_ADDRESS(bank) ((bank) << PXA260_BANK_SCOOT)
|
||||
#define PXA260_TOTAL_MEMORY_BANKS (1 << (32 - PXA260_BANK_SCOOT))//64 banks for *_BANK_SCOOT = 26
|
||||
|
||||
#define PXA260_ROM_START_ADDRESS 0x00000000
|
||||
#define PXA260_RAM_START_ADDRESS 0xA0000000
|
||||
#define TUNGSTEN_T3_W86L488_START_ADDRESS 0x08000000
|
||||
#define PXA260_PCMCIA0_START_ADDRESS 0x20000000
|
||||
#define PXA260_PCMCIA1_START_ADDRESS 0x30000000
|
||||
#define TUNGSTEN_T3_ROM_SIZE (10 * 0x100000)//10mb ROM
|
||||
#define TUNGSTEN_T3_RAM_SIZE (64 * 0x100000)//64mb RAM
|
||||
#define TUNGSTEN_T3_W86L488_SIZE 0x04000000
|
||||
#define PXA260_PCMCIA0_SIZE 0x10000000
|
||||
#define PXA260_PCMCIA1_SIZE 0x10000000
|
||||
|
||||
#endif
|
||||
|
||||
33
src/w86l488.c
Normal file
33
src/w86l488.c
Normal file
@@ -0,0 +1,33 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "emulator.h"
|
||||
|
||||
|
||||
void w86l488Reset(void){
|
||||
|
||||
}
|
||||
|
||||
uint32_t w86l488StateSize(void){
|
||||
uint32_t size = 0;
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
void w86l488SaveState(uint8_t* data){
|
||||
uint32_t offset = 0;
|
||||
|
||||
}
|
||||
|
||||
void w86l488LoadState(uint8_t* data){
|
||||
uint32_t offset = 0;
|
||||
|
||||
}
|
||||
|
||||
uint16_t w86l488Read16(uint8_t address){
|
||||
debugLog("Unimplemented T3 SD chip read at address 0x%02X\n", address);
|
||||
return 0x0000;
|
||||
}
|
||||
|
||||
void w86l488Write16(uint8_t address, uint16_t value){
|
||||
debugLog("Unimplemented T3 SD chip write at address 0x%02X, value:0x%04X\n", address, value);
|
||||
}
|
||||
14
src/w86l488.h
Normal file
14
src/w86l488.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef W86L488_H
|
||||
#define W86L488_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void w86l488Reset(void);
|
||||
uint32_t w86l488StateSize(void);
|
||||
void w86l488SaveState(uint8_t* data);
|
||||
void w86l488LoadState(uint8_t* data);
|
||||
|
||||
uint16_t w86l488Read16(uint8_t address);
|
||||
void w86l488Write16(uint8_t address, uint16_t value);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user