Skip to content

Commit

Permalink
a20 must set when using vcpi
Browse files Browse the repository at this point in the history
  • Loading branch information
cracyc committed Nov 21, 2024
1 parent 6d542a3 commit c9ec86a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions mame_i386.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@ inline void CPU_SET_CR0(UINT32 value)
inline void CPU_SET_CR3(UINT32 value)
{
m_cr[3] = value;
vtlb_flush_dynamic(m_vtlb);

}

inline void CPU_SET_CPL(int value)
Expand Down
10 changes: 9 additions & 1 deletion msdos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2081,6 +2081,12 @@ void debugger_main()
telnet_printf("%08x\n", CPU_TRANS_CODE_ADDR(debugger_get_val(params[1]), 0));
else
telnet_printf("invalid selector\n");
} else if(_stricmp(params[0], "GDTBASE") == 0) {
telnet_printf("%08x\n", CPU_GDTR_BASE, 0);
} else if(_stricmp(params[0], "IDTBASE") == 0) {
telnet_printf("%08x\n", CPU_IDTR_BASE, 0);
} else if(_stricmp(params[0], "TRANS") == 0) {
telnet_printf("%08x\n", CPU_TRANS_PAGING_ADDR(debugger_get_val(params[1])));
#endif
} else if(_stricmp(params[0], "S") == 0) {
if(num >= 4) {
Expand Down Expand Up @@ -2801,6 +2807,8 @@ void debugger_main()
telnet_printf("Q - quit\n");
telnet_printf("X - show dos process info\n");
telnet_printf("SELBASE - show pm segment descriptor base\n");
telnet_printf("GDTBASE - show gdt base\n");
telnet_printf("IDTBASE - show idt base\n");

telnet_printf("> <filename> - output logfile\n");
telnet_printf("< <filename> - input commands from file\n");
Expand Down Expand Up @@ -18960,7 +18968,7 @@ inline void msdos_int_67h_deh()
CPU_LOAD_SREG(CPU_FS_INDEX, 0x0000);
CPU_LOAD_SREG(CPU_GS_INDEX, 0x0000);

//CPU_A20_LINE(1);
CPU_A20_LINE(1);

/* Switch to protected mode */
CPU_SET_VM_FLAG(0);
Expand Down

0 comments on commit c9ec86a

Please sign in to comment.