mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2024-11-14 21:37:42 -07:00
ayyy
getting there!
This commit is contained in:
parent
000aa1f327
commit
d943a51b96
@ -1239,7 +1239,7 @@ u8 ARM7IORead8(u32 addr)
|
||||
CASE_READ8_32BIT(0x04004060, MBK[1][8])
|
||||
|
||||
case 0x04004500: return DSi_I2C::ReadData();
|
||||
case 0x04004501: printf("read I2C CNT %02X\n", DSi_I2C::Cnt); return DSi_I2C::Cnt;
|
||||
case 0x04004501: return DSi_I2C::Cnt;
|
||||
|
||||
case 0x04004D00: return ConsoleID & 0xFF;
|
||||
case 0x04004D01: return (ConsoleID >> 8) & 0xFF;
|
||||
|
@ -152,7 +152,7 @@ void Reset()
|
||||
|
||||
void WriteCnt(u8 val)
|
||||
{
|
||||
printf("I2C: write CNT %02X\n", val);
|
||||
//printf("I2C: write CNT %02X\n", val);
|
||||
|
||||
// TODO: check ACK flag
|
||||
// TODO: transfer delay
|
||||
@ -174,7 +174,7 @@ void WriteCnt(u8 val)
|
||||
default: Data = 0; break;
|
||||
}
|
||||
|
||||
printf("I2C read, device=%02X, cnt=%02X, data=%02X, last=%d\n", Device, val, Data, islast);
|
||||
//printf("I2C read, device=%02X, cnt=%02X, data=%02X, last=%d\n", Device, val, Data, islast);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -184,7 +184,7 @@ void WriteCnt(u8 val)
|
||||
if (val & (1<<1))
|
||||
{
|
||||
Device = Data & 0xFE;
|
||||
printf("I2C: %s start, device=%02X\n", (Data&0x01)?"read":"write", Device);
|
||||
//printf("I2C: %s start, device=%02X\n", (Data&0x01)?"read":"write", Device);
|
||||
|
||||
switch (Device)
|
||||
{
|
||||
@ -193,7 +193,7 @@ void WriteCnt(u8 val)
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("I2C write, device=%02X, cnt=%02X, data=%02X, last=%d\n", Device, val, Data, islast);
|
||||
//printf("I2C write, device=%02X, cnt=%02X, data=%02X, last=%d\n", Device, val, Data, islast);
|
||||
|
||||
switch (Device)
|
||||
{
|
||||
@ -212,7 +212,6 @@ void WriteCnt(u8 val)
|
||||
|
||||
u8 ReadData()
|
||||
{
|
||||
printf("I2C: read the data: %02X\n", Data);
|
||||
return Data;
|
||||
}
|
||||
|
||||
|
@ -135,8 +135,8 @@ void DSi_NDMA::Start()
|
||||
|
||||
// TODO eventually: not stop if we're running code in ITCM
|
||||
|
||||
if (SubblockTimer & 0xFFFF)
|
||||
printf("TODO! NDMA SUBBLOCK TIMER: %08X\n", SubblockTimer);
|
||||
//if (SubblockTimer & 0xFFFF)
|
||||
// printf("TODO! NDMA SUBBLOCK TIMER: %08X\n", SubblockTimer);
|
||||
|
||||
if (NDS::DMAsRunning(CPU))
|
||||
Running = 1;
|
||||
|
@ -218,6 +218,8 @@ u16 DSi_SDHost::Read(u32 addr)
|
||||
case 0x026: return BlockLen16;
|
||||
case 0x028: return SDOption;
|
||||
|
||||
case 0x02C: return 0; // TODO
|
||||
|
||||
case 0x030: // FIFO16
|
||||
{
|
||||
// TODO: decrement BlockLen????
|
||||
@ -275,7 +277,7 @@ u16 DSi_SDHost::Read(u32 addr)
|
||||
case 0x108: return BlockCount32;
|
||||
}
|
||||
|
||||
printf("unknown %s read %08X\n", SD_DESC, addr);
|
||||
printf("unknown %s read %08X @ %08X\n", SD_DESC, addr, NDS::GetPC(1));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -356,6 +358,7 @@ void DSi_SDHost::Write(u32 addr, u16 val)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else printf("%s: SENDING CMD %04X TO NULL DEVICE\n", SD_DESC, val);
|
||||
}
|
||||
return;
|
||||
|
||||
|
@ -1600,7 +1600,7 @@ void debug(u32 param)
|
||||
fwrite(&val, 4, 1, shit);
|
||||
}
|
||||
fclose(shit);*/
|
||||
FILE*
|
||||
/*FILE*
|
||||
shit = fopen("debug/dump9.bin", "wb");
|
||||
for (u32 i = 0x02000000; i < 0x04000000; i+=4)
|
||||
{
|
||||
@ -1614,7 +1614,7 @@ void debug(u32 param)
|
||||
u32 val = DSi::ARM7Read32(i);
|
||||
fwrite(&val, 4, 1, shit);
|
||||
}
|
||||
fclose(shit);
|
||||
fclose(shit);*/
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user