这里首先进行一下log,检查芯片类型,目前看来已经可以确定芯片类型的

This commit is contained in:
root 2024-05-19 23:35:49 +08:00
parent 8dd87c7776
commit 268ef98309
3 changed files with 8 additions and 1 deletions

View File

@ -1,7 +1,7 @@
CC := emcc CC := emcc
CXX := emcc CXX := emcc
CXXFLAGS := -c -fbracket-depth=4800 -O3 -std=c++17 -D NDEBUG=1 -msimd128 CXXFLAGS := -c -fbracket-depth=4800 -O3 -std=c++17 -msimd128
INCLUDES := -I src/nba/include/ -I src/nba/src INCLUDES := -I src/nba/include/ -I src/nba/src
LDFLAGS := -s ENVIRONMENT=web -s ASSERTIONS=0 -s FILESYSTEM=0 -s STANDALONE_WASM=1 -s ALLOW_MEMORY_GROWTH\ LDFLAGS := -s ENVIRONMENT=web -s ASSERTIONS=0 -s FILESYSTEM=0 -s STANDALONE_WASM=1 -s ALLOW_MEMORY_GROWTH\
-s EXPORTED_FUNCTIONS=[_getOutput,_cyclePerFrame,_getRom,_getIRam,_getWRam,_go,_run,_main] --lto -s EXPORTED_FUNCTIONS=[_getOutput,_cyclePerFrame,_getRom,_getIRam,_getWRam,_go,_run,_main] --lto

View File

@ -392,6 +392,10 @@ void Bus::Write(u32 address, int access, T value) {
} }
StopPrefetch(); StopPrefetch();
if( (address & 0x080000cf) == address ){
// 此处可以命中RTC or gpio
printf("Write rom at %08x using value %08x\n", address, value);
}
// TODO: figure out how 8-bit and 32-bit accesses actually work. // TODO: figure out how 8-bit and 32-bit accesses actually work.
if constexpr(std::is_same_v<T, u8>) { if constexpr(std::is_same_v<T, u8>) {
@ -416,6 +420,8 @@ void Bus::Write(u32 address, int access, T value) {
StopPrefetch(); StopPrefetch();
Step(wait16[0][0xE]); Step(wait16[0][0xE]);
printf("Write backup at %08x using value %08x\n", address, value);
if constexpr(std::is_same_v<T, u16>) value >>= (address & 1) << 3; if constexpr(std::is_same_v<T, u16>) value >>= (address & 1) << 3;
if constexpr(std::is_same_v<T, u32>) value >>= (address & 3) << 3; if constexpr(std::is_same_v<T, u32>) value >>= (address & 3) << 3;

View File

@ -389,6 +389,7 @@ void DMA::OnChannelWritten(Channel& channel, bool enable_old) {
* since we cannot always determine the size at load time. * since we cannot always determine the size at load time.
*/ */
if(channel.dst_addr >= 0x0D000000) { if(channel.dst_addr >= 0x0D000000) {
printf("seems using dma3 to read eeprom\n");
int length = channel.length; int length = channel.length;
if(length == 9 || length == 73) { if(length == 9 || length == 73) {