Skip to content

Commit

Permalink
Trying to support reset
Browse files Browse the repository at this point in the history
  • Loading branch information
CaptainYS authored and CaptainYS committed Mar 11, 2020
1 parent 7eb096e commit f271982
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/towns/memory/physmem.cpp
Expand Up @@ -228,6 +228,9 @@ void TownsPhysicalMemory::SetWaveRAMSize(long long int size)
{
state.Reset();
SetSysRomMappingFlag(state.sysRomMapping);
SetDicROMMappingFlag(state.dicRom);
SetFMRVRAMMappingFlag(state.FMRVRAM);

}

void TownsPhysicalMemory::SetDICRAMSize(long long int size)
Expand Down Expand Up @@ -368,6 +371,7 @@ std::vector <std::string> TownsPhysicalMemory::GetStatusText(void) const
{
text.back()+="Main RAM";
}
text.back()+=" FMR VRAM Mask(000CFF81H)="+cpputil::Ubtox(state.FMRVRAMMask);

text.push_back(empty);
text.back()="D0000-EFFFF:";
Expand Down
2 changes: 2 additions & 0 deletions src/towns/towns.h
Expand Up @@ -46,6 +46,8 @@ class FMTowns : public Device, public i486DX::FMTownsMouseBiosInterceptor
{
FREQUENCY_DEFAULT=66, // MHz
FAST_DEVICE_POLLING_INTERVAL=100, // Nano-seconds
RESET_REASON_SOFTWARE=1,
RESET_REASON_CPU=2,
};

virtual const char *DeviceName(void) const{return "FMTOWNS";}
Expand Down
5 changes: 5 additions & 0 deletions src/towns/townsio.cpp
Expand Up @@ -11,6 +11,11 @@
{
var.powerOff=true;
}
if(0!=(data&1))
{
state.resetReason=RESET_REASON_SOFTWARE;
Reset();
}
break;
case TOWNSIO_RESET_REASON:
if(0!=(data&0x40))
Expand Down
108 changes: 108 additions & 0 deletions symtables/V2.1L20_MX.txt
@@ -1,4 +1,94 @@
/begin0
T 2
* 00000010:000003A5
#
R
L SYSROM:DRAW_MEMORY_TEST_MESSAGE
P
% 0
/end
/begin0
T 2
* 00000010:00000493
#
R
L SYSROM:MEMORY_TEST_FAILED
P
% 0
/end
/begin0
T 1
* 00000010:000004E9
#
R
L SYSROM:(PROB)MEMORY_TEST_FROM_EDI_FOR_ECX_BYTES
P
% 0
/end
/begin0
T 2
* 00000010:0000053F
#
R
L SYSROM:MEMTEST_CHECK_READ_BACK
P
% 0
/end
/begin0
T 2
* 00000010:000005CD
#
R
L SYSROM:(PROB)RETURN_MEMTEST_FAILURE
P
% 0
/end
/begin0
T 1
* 00000010:00000607
#
R
L SYSROM:(PROB)DRAW_MESSAGE_BY_NUMBER
P
% 0
/end
/begin0
T 1
* 00000010:00001F32
#
R
L SYSROM:(PROB)DRAW_STRING
P
% 0
/end
/begin0
T 2
* 00000010:00001F85
#
R
L SYSROM:DRAW_FONT_LOOP
P
% 0
/end
/begin0
T 2
* 00000010:00001FD0
#
R
L SYSROM:HALT_AFTER_ERROR
P
% 0
/end
/begin0
T 2
* 00000010:00001FF5
#
R
L SYSROM:(PROB)DRAW_HALF_PITCH_FONT_LOOP
P
% 0
/end
/begin0
T 1
* 00000010:00002442
#
Expand All @@ -8,6 +98,15 @@ P
% 0
/end
/begin0
T 1
* 00000010:000024D0
#
R
L SYSROM:(PROB)SJIS_TO_JIS
P
% 0
/end
/begin0
T 0
* 00000110:00005728
#
Expand Down Expand Up @@ -898,3 +997,12 @@ L SYSROM:WAIT_BY_FREERUN_TIMER
P
% 0
/end
/begin0
T 1
* 0000FFFB:00000019
#
R
L SYSROM:(PROB)RESET_VECTOR
P
% 0
/end

0 comments on commit f271982

Please sign in to comment.