add INTC display and system context
This commit is contained in:
parent
8f11ccce56
commit
dd43d25a77
Binary file not shown.
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 3.0 KiB |
|
@ -84,6 +84,24 @@ static void ctx_etmu(int start)
|
|||
show_etmu(2*i+1, i+start, t);
|
||||
}
|
||||
}
|
||||
static void ctx_intc()
|
||||
{
|
||||
uint16_t *IPR = driver_ctx("INTC");
|
||||
|
||||
if(isSH3())
|
||||
{
|
||||
row_print(1,1, "A:%04x B:%04x C:%04x", IPR[0], IPR[1], IPR[2]);
|
||||
row_print(2,1, "D:%04x E:%04x F:%04x", IPR[3], IPR[4], IPR[5]);
|
||||
row_print(3,1, "G:%04x H:%04x", IPR[6], IPR[7]);
|
||||
}
|
||||
else
|
||||
{
|
||||
row_print(1,1, "A:%04x B:%04x C:%04x", IPR[0], IPR[1], IPR[2]);
|
||||
row_print(2,1, "D:%04x E:%04x F:%04x", IPR[3], IPR[4], IPR[5]);
|
||||
row_print(3,1, "G:%04x H:%04x I:%04x", IPR[6], IPR[7], IPR[8]);
|
||||
row_print(4,1, "J:%04x K:%04x L:%04x", IPR[9],IPR[10],IPR[11]);
|
||||
}
|
||||
}
|
||||
#endif /* FX9860G */
|
||||
|
||||
#ifdef FXCG50
|
||||
|
@ -177,6 +195,7 @@ static void system_contexts(void)
|
|||
#ifdef FX9860G
|
||||
if(tab == 3) ctx_etmu(0);
|
||||
if(tab == 4) ctx_etmu(3);
|
||||
if(tab == 5) ctx_intc();
|
||||
#endif
|
||||
|
||||
#ifdef FXCG50
|
||||
|
@ -190,6 +209,7 @@ static void system_contexts(void)
|
|||
if(key == KEY_F2) tab = 1;
|
||||
if(key == KEY_F3) tab = 2;
|
||||
if(key == KEY_F4) tab = 3;
|
||||
if(key == KEY_F6) tab = 5;
|
||||
|
||||
#ifdef FX9860G
|
||||
if(key == KEY_F5 && isSH3()) tab = 4;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <gint/mpu/intc.h>
|
||||
#include <gint/mpu/rtc.h>
|
||||
#include <gint/hardware.h>
|
||||
#include <gint/display.h>
|
||||
#include <gint/keyboard.h>
|
||||
|
@ -7,26 +8,39 @@
|
|||
|
||||
void gintctl_regs(void)
|
||||
{
|
||||
if(isSH3()) return;
|
||||
|
||||
#ifdef FX9860G
|
||||
#warning gintctl_regs not implemented on SH3
|
||||
#endif
|
||||
|
||||
#define IPR(X) SH7305_INTC._->IPR##X.word
|
||||
#define IMR(X) SH7305_INTC.MSK->IMR##X
|
||||
|
||||
dclear(C_WHITE);
|
||||
row_title("Register browser");
|
||||
|
||||
row_print(2, 1, "A:%04x B:%04x C:%04x", IPR(A), IPR(B), IPR(C));
|
||||
row_print(3, 1, "D:%04x E:%04x F:%04x", IPR(D), IPR(E), IPR(F));
|
||||
row_print(4, 1, "G:%04x H:%04x I:%04x", IPR(G), IPR(H), IPR(I));
|
||||
row_print(5, 1, "J:%04x K:%04x L:%04x", IPR(J), IPR(K), IPR(L));
|
||||
if(isSH3())
|
||||
{
|
||||
#define IPR(X) (*SH7705_INTC._.IPR##X).word
|
||||
row_print(2,1, "A:%04x B:%04x C:%04x", IPR(A), IPR(B), IPR(C));
|
||||
row_print(3,1, "D:%04x E:%04x F:%04x", IPR(D), IPR(E), IPR(F));
|
||||
row_print(4,1, "G:%04x H:%04x", IPR(G), IPR(H));
|
||||
|
||||
row_print(6, 1, "RCR1:%02x RCR2:%02x",
|
||||
SH7705_RTC.RCR1.byte,
|
||||
SH7705_RTC.RCR2.byte
|
||||
);
|
||||
#undef IPR
|
||||
}
|
||||
else
|
||||
{
|
||||
#define IPR(X) SH7305_INTC._->IPR##X.word
|
||||
row_print(2,1, "A:%04x B:%04x C:%04x", IPR(A), IPR(B), IPR(C));
|
||||
row_print(3,1, "D:%04x E:%04x F:%04x", IPR(D), IPR(E), IPR(F));
|
||||
row_print(4,1, "G:%04x H:%04x I:%04x", IPR(G), IPR(H), IPR(I));
|
||||
row_print(5,1, "J:%04x K:%04x L:%04x", IPR(J), IPR(K), IPR(L));
|
||||
#undef IPR
|
||||
}
|
||||
|
||||
dupdate();
|
||||
getkey();
|
||||
|
||||
if(isSH3()) return;
|
||||
|
||||
#define IMR(X) SH7305_INTC.MSK->IMR##X
|
||||
|
||||
dclear(C_WHITE);
|
||||
row_title("Register browser");
|
||||
|
||||
|
|
Loading…
Reference in New Issue