use basic loader / tm_11 clean-up

This commit is contained in:
folkert van heusden 2023-03-20 20:47:45 +01:00
parent 6cbb5c3faa
commit e7e236fd81
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1
3 changed files with 7 additions and 10 deletions

View file

@ -31,7 +31,6 @@ void setBootLoader(bus *const b, const bootloader_t which)
int size = 0; int size = 0;
if (which == BL_RK05) { if (which == BL_RK05) {
/*
start = offset = 01000; start = offset = 01000;
static uint16_t rk05_code[] = { static uint16_t rk05_code[] = {
@ -45,8 +44,8 @@ void setBootLoader(bus *const b, const bootloader_t which)
0100376, 0100376,
0005007 0005007
}; };
*/
#if 0
// from https://github.com/amakukha/PyPDP11.git // from https://github.com/amakukha/PyPDP11.git
offset = 02000; offset = 02000;
start = 02002; start = 02002;
@ -76,6 +75,7 @@ void setBootLoader(bus *const b, const bootloader_t which)
0105011, // CLRB (R1) 0105011, // CLRB (R1)
0005007 // CLR PC 0005007 // CLR PC
}; };
#endif
bl = rk05_code; bl = rk05_code;

View file

@ -11,9 +11,6 @@
tm_11::tm_11(const std::string & file, memory *const m) : m(m) tm_11::tm_11(const std::string & file, memory *const m) : m(m)
{ {
offset = 0;
memset(registers, 0x00, sizeof registers);
fh = fopen(file.c_str(), "rb"); fh = fopen(file.c_str(), "rb");
} }

10
tm-11.h
View file

@ -20,11 +20,11 @@ class memory;
class tm_11 class tm_11
{ {
private: private:
memory *const m; memory *const m { nullptr };
uint16_t registers[6]; uint16_t registers[6] { 0 };
uint8_t xfer_buffer[65536]; uint8_t xfer_buffer[65536];
int offset; int offset { 0 };
FILE *fh; FILE *fh { nullptr };
public: public:
tm_11(const std::string & file, memory *const m); tm_11(const std::string & file, memory *const m);