mirror of
https://github.com/wfjm/w11.git
synced 2026-01-13 15:37:43 +00:00
add ExecWibr(),ExecRibr() and minor updates
- Rw11Cpu: add ExecWibr(),ExecRibr(); LoadAbs(): better trace format
- Rw11Cntl{DEUNA,DL11,LP11,RK11,RHRP,TM11}: use ExecWibr(),ExecRibr()
- ldadump: better -trec format of start address record
- asm-11: .end directive auto-creates '...end' label
- ti_w11: for -e use .end start address when available
- defs_cpu.mac: add some CPU system registers
- defs_dl.mac: fix naming typo
- defs_tm.mac: add function mnemos
This commit is contained in:
parent
9b7b3bd5c8
commit
71290b5142
@ -50,6 +50,7 @@ The full set of tests is only run for tagged releases.
|
||||
- added MemSize() and MemWriteByte()
|
||||
- LoadAbs(): return start, better odd byte handling
|
||||
- add cp -brf and -bwf; add range checks for cp -wa
|
||||
- add ExecWibr(),ExecRibr()
|
||||
- Rw11VirtStream: added Error(),Eof()
|
||||
- ensure that after aborted rblk only BlockDone words are processed
|
||||
- RlinkCommand: Print(): use BlockDone() as length for rblk
|
||||
@ -61,7 +62,9 @@ The full set of tests is only run for tagged releases.
|
||||
- Rw11CntlLP11: remove SetOnline(), use UnitSetup()
|
||||
- Rw11CntlPC11
|
||||
- BootCode(): boot loader rewritten
|
||||
- remove SetOnline(), use UnitSetup()
|
||||
- remove SetOnline(), use UnitSetup()
|
||||
- asm-11: .end directive autocreates '...end' label
|
||||
- ti_w11: for -e use .end start address when available
|
||||
- firmware changes
|
||||
- rbd_rbmon: more robust ack,err trace when busy
|
||||
- rbd_tester: use now fifo_simple_dram
|
||||
|
||||
@ -7,6 +7,35 @@ This file descibes general issues.
|
||||
|
||||
The case id indicates the release when the issue was first recognized.
|
||||
|
||||
### V0.50-2 {[issue #28](https://github.com/wfjm/w11/issues/28)} -- RK11: write protect action too slow
|
||||
|
||||
Some simple RK11 drivers, especially in test codes, don't poll for completion
|
||||
of a write protect command. Due to the emulated I/O this can cause errors.
|
||||
|
||||
One example is the boot sequence of RK based XXDP, as seen for example for
|
||||
the `dzzza` disk. On simh the disk is immediately switched to write protect
|
||||
mode, on w11 it is not. The pertinent part of the code is
|
||||
```
|
||||
000214 B003: mov #000017,@#rk.cs ; #rk.fwl+rk.go; func=write_lock
|
||||
000222 bic #017777,r2
|
||||
000226 clc
|
||||
000230 rol r2
|
||||
000232 rol r2
|
||||
000234 rol r2
|
||||
000236 rol r2
|
||||
000240 mov r2,D040
|
||||
000244 mov #000001,@#rk.cs ; #rk.go; func=control reset
|
||||
```
|
||||
The monitor does two writes to the RK11 CSR without busy polling and just a
|
||||
few instructions in between. In the w11 implementation the first write will
|
||||
set func=write_lock and cause an attn request. But before the attn can be
|
||||
serviced the CSR is overwritten with func=creset. The write lock is lost,
|
||||
only the creset is executed.
|
||||
|
||||
Can be resolved by handling write lock locally. Normal OS always do
|
||||
a busy poll before starting a function, therefore this is considered
|
||||
a minor deficit. Might be fixed in an upcoming release.
|
||||
|
||||
### V0.50-3 {[issue #27](https://github.com/wfjm/w11/issues/27)} -- CPU: no mmu trap when instruction which clears trap enable itself causes a trap
|
||||
|
||||
The MMU should issue an mmu trap if the instruction clearing the
|
||||
|
||||
@ -67,7 +67,3 @@ behaviour of the real drive.
|
||||
`DRY` in `RKDS` goes 1->0 immediately with `RDY` in `RKCS` when a function is
|
||||
started. In a real RK05 drive `DRY` went to 0 after a short delay. Some
|
||||
basic hardware tests are sensitive to this.
|
||||
|
||||
- **TCK-014 pri=M: RK11: write protect action too slow**
|
||||
Some simple RK11 drivers, especially in tests, don't poll for completion
|
||||
of a write protect command. Due to the emulated I/O this can cause errors.
|
||||
|
||||
@ -1,11 +1,17 @@
|
||||
; $Id: defs_cpu.mac 830 2016-12-26 20:25:49Z mueller $
|
||||
; Copyright 2014- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
; $Id: defs_cpu.mac 1133 2019-04-19 18:43:00Z mueller $
|
||||
; Copyright 2014-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
; License disclaimer see License.txt in $RETROBASE directory
|
||||
;
|
||||
; definitions for basic CPU registers (as in defs_cpu.das)
|
||||
;
|
||||
cp.psw = 177776
|
||||
cp.dsr = 177570
|
||||
cp.psw=177776
|
||||
cp.sli=177774 ; stack limit
|
||||
cp.pir=177772 ; pirq
|
||||
cp.mbr=177770 ; mbrk
|
||||
cp.err=177766 ; cpuerr
|
||||
cp.sid=177764 ; system id
|
||||
cp.dsr=177570 ; display/status register
|
||||
cp.los=177760 ; memory losize register
|
||||
;
|
||||
; symbol definitions for cp.psw
|
||||
;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
; $Id: defs_dl.mac 1127 2019-04-07 10:59:07Z mueller $
|
||||
; $Id: defs_dl.mac 1133 2019-04-19 18:43:00Z mueller $
|
||||
; Copyright 2019- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
; License disclaimer see License.txt in $RETROBASE directory
|
||||
;
|
||||
@ -13,10 +13,10 @@
|
||||
;
|
||||
; register addresses
|
||||
;
|
||||
pr.csr=177560
|
||||
pr.buf=177562
|
||||
pp.csr=177564
|
||||
pp.buf=177566
|
||||
ti.csr=177560
|
||||
ti.buf=177562
|
||||
to.csr=177564
|
||||
to.buf=177566
|
||||
;
|
||||
; symbol definitions for ti.csr
|
||||
;
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
; $Id: defs_tm.mac 1122 2019-03-17 08:15:42Z mueller $
|
||||
; Copyright 2015- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
; $Id: defs_tm.mac 1133 2019-04-19 18:43:00Z mueller $
|
||||
; Copyright 2015-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
; License disclaimer see License.txt in $RETROBASE directory
|
||||
;
|
||||
; definitions for RK11 controler
|
||||
; definitions for TM11 controler
|
||||
;
|
||||
; vector address/priority definition
|
||||
;
|
||||
@ -36,8 +36,20 @@
|
||||
; symbol definitions for tm.cr
|
||||
;
|
||||
tm.err=100000
|
||||
tm.d72=000000
|
||||
tm.d75=020000
|
||||
tm.d78=040000
|
||||
tm.d98=060000
|
||||
tm.ini=010000
|
||||
tm.pev=004000
|
||||
tm.rdy=000200
|
||||
tm.ie =000100
|
||||
tm.fun=000000
|
||||
tm.frd=000002
|
||||
tm.fwr=000004
|
||||
tm.fwe=000006
|
||||
tm.fsf=000010
|
||||
tm.fsr=000012
|
||||
tm.fwg=000014
|
||||
tm.frw=000016
|
||||
tm.go =000001
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/perl -w
|
||||
# $Id: asm-11 1131 2019-04-14 13:24:25Z mueller $
|
||||
# $Id: asm-11 1133 2019-04-19 18:43:00Z mueller $
|
||||
#
|
||||
# Copyright 2013-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
# Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# This program is free software; you may redistribute and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free
|
||||
@ -14,6 +14,7 @@
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-04-19 1133 1.0.6 .end directive autocreates '...end' label
|
||||
# 2018-11-03 1065 1.0.5 add and use bailout
|
||||
# 2015-11-01 712 1.0.4 BUGFIX: fix '.' handling in instructions
|
||||
# 2014-07-26 575 1.0.3 add 'call' and 'return' to pst (as in macro-11)
|
||||
@ -273,7 +274,6 @@ my @t_pushback;
|
||||
my $defincdot = 0; # defered increment for '.'
|
||||
my $out_dot; # current . for output
|
||||
my @out_data; # output data
|
||||
my $out_start = 1; # absolute start address
|
||||
|
||||
autoflush STDOUT 1 if (-p STDOUT); # autoflush if output into pipe
|
||||
|
||||
@ -983,7 +983,10 @@ sub parse_line {
|
||||
}
|
||||
if (defined $val) {
|
||||
$l{lstval} = $val; # set aval to get it in listing
|
||||
$out_start = $val;
|
||||
$lst{'...end'} = {name => '...end', # and generate marker label
|
||||
val => $val,
|
||||
typ => 'lbl',
|
||||
psect=> '.abs'};
|
||||
} else {
|
||||
$l{lstval} = 0;
|
||||
add_err(\%l, 'U');
|
||||
@ -1133,10 +1136,9 @@ sub setsym {
|
||||
return;
|
||||
}
|
||||
|
||||
my $isllbl = check_llbl($name);
|
||||
if (check_llbl($name)) {
|
||||
if ($typ eq 'lbl') {
|
||||
$name = $llbl_scope . ':' . $name if $isllbl;
|
||||
$name = $llbl_scope . ':' . $name;
|
||||
$typ = 'llbl';
|
||||
} else {
|
||||
die "BUGCHECK: name looks like local label, but typ=$typ";
|
||||
@ -1152,10 +1154,10 @@ sub setsym {
|
||||
return;
|
||||
}
|
||||
|
||||
$lst{$namelc}{name} = $name;
|
||||
$lst{$namelc}{val} = $val;
|
||||
$lst{$namelc}{typ} = $typ;
|
||||
$lst{$namelc}{psect} = $cur_psect;
|
||||
$lst{$namelc} = {name => $name,
|
||||
val => $val,
|
||||
typ => $typ,
|
||||
psect=> $cur_psect};
|
||||
|
||||
return;
|
||||
}
|
||||
@ -2133,6 +2135,7 @@ sub write_lda {
|
||||
@blist = ();
|
||||
|
||||
# write terminating frame
|
||||
my $out_start = (exists $lst{'...end'}) ? $lst{'...end'}{val} : 1;
|
||||
write_lda_frame($fh, $out_start, \@blist);
|
||||
|
||||
return;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl -w
|
||||
# $Id: ldadump 1131 2019-04-14 13:24:25Z mueller $
|
||||
# $Id: ldadump 1133 2019-04-19 18:43:00Z mueller $
|
||||
#
|
||||
# Copyright 2019- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
@ -14,6 +14,7 @@
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-04-19 1133 1.0.1 better -trec format of start address record
|
||||
# 2019-04-13 1131 1.0 Initial version
|
||||
#
|
||||
#
|
||||
@ -111,8 +112,10 @@ sub do_file {
|
||||
$ldaddr = $addr;
|
||||
$state = ($bytcnt == 6) ? 'chksum' : 'data';
|
||||
if ($opts{trec}) {
|
||||
printf "block %3d, length %4d byte, address %6.6o:%6.6o\n",
|
||||
$blknum, $bytcnt-6, $ldaddr, $ldaddr+($bytcnt-6)-1;
|
||||
printf "block %3d, length %4d byte, address %6.6o",
|
||||
$blknum, $bytcnt-6, $ldaddr;
|
||||
printf ":%6.6o", $ldaddr+($bytcnt-6)-1 if $bytcnt > 6;
|
||||
printf "\n",
|
||||
}
|
||||
|
||||
} elsif ($state eq 'data') { # state: data --------------------
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
#!/usr/bin/perl -w
|
||||
# $Id: ti_w11 1103 2019-01-04 13:18:54Z mueller $
|
||||
# $Id: ti_w11 1133 2019-04-19 18:43:00Z mueller $
|
||||
#
|
||||
# Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
# License disclaimer see License.txt in $RETROBASE directory
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2019-04-19 1133 1.4.4 for -e use .end start address when available
|
||||
# 2019-01-04 1103 1.4.3 add -ar,-n4d (ddr versions)
|
||||
# 2017-06-25 916 1.4.2 add -c7 (cmoda7 support)
|
||||
# 2017-01-08 843 1.4.1 allow -tuD,.... for Digilent autodetect; add -bn4d
|
||||
@ -322,10 +323,13 @@ unless ($opt_ns) {
|
||||
if (defined $val_e) {
|
||||
if ($val_e =~ m/\.mac$/) {
|
||||
push @arglist, "cpu0 ldasm -file $val_e -sym ldasm_sym -lst ldasm_lst";
|
||||
push @arglist, 'set ldabs_start 0200';
|
||||
push @arglist, 'if {[info exists ldasm_sym(...end)]} {set ldabs_start $ldasm_sym(...end)}';
|
||||
} else {
|
||||
push @arglist, "cpu0 ldabs $val_e";
|
||||
push @arglist, "cpu0 ldabs $val_e ldabs_start";
|
||||
push @arglist, 'if {$ldabs_start==1} {set ldabs_start 0200}';
|
||||
}
|
||||
push @arglist, 'cpu0 cp -stapc 0200';
|
||||
push @arglist, 'cpu0 cp -stapc $ldabs_start';
|
||||
}
|
||||
|
||||
push @arglist, @ticmds; # add commands from ARGV
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// $Id: Rw11CntlDEUNA.cpp 1131 2019-04-14 13:24:25Z mueller $
|
||||
// $Id: Rw11CntlDEUNA.cpp 1133 2019-04-19 18:43:00Z mueller $
|
||||
//
|
||||
// Copyright 2014-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
@ -13,6 +13,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2019-04-19 1133 0.5.9 use ExecWibr()
|
||||
// 2019-02-23 1114 0.5.8 use std::bind instead of lambda
|
||||
// 2018-12-19 1090 0.5.7 use RosPrintf(bool)
|
||||
// 2018-12-17 1087 0.5.6 use std::lock_guard instead of boost
|
||||
@ -370,13 +371,7 @@ void Rw11CntlDEUNA::Start()
|
||||
|
||||
void Rw11CntlDEUNA::UnitSetup(size_t /*ind*/)
|
||||
{
|
||||
RlinkCommandList clist;
|
||||
Rw11Cpu& cpu = Cpu();
|
||||
|
||||
cpu.AddWibr(clist, fBase+kPR1, GetPr1());
|
||||
|
||||
Server().Exec(clist);
|
||||
|
||||
Cpu().ExecWibr(fBase+kPR1, GetPr1());
|
||||
// FIXME_code !!! Is that all ???
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// $Id: Rw11CntlDL11.cpp 1131 2019-04-14 13:24:25Z mueller $
|
||||
// $Id: Rw11CntlDL11.cpp 1133 2019-04-19 18:43:00Z mueller $
|
||||
//
|
||||
// Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
@ -13,6 +13,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2019-04-19 1133 1.4.2 use ExecWibr(),ExecRibr()
|
||||
// 2019-04-14 1131 1.4.1 proper unit init, call UnitSetupAll() in Start()
|
||||
// 2019-04-06 1126 1.4 xbuf.val in msb; rrdy in rbuf (new iface)
|
||||
// 2019-02-23 1114 1.3.2 use std::bind instead of lambda
|
||||
@ -154,11 +155,8 @@ void Rw11CntlDL11::Start()
|
||||
|
||||
void Rw11CntlDL11::UnitSetup(size_t /*ind*/)
|
||||
{
|
||||
Rw11Cpu& cpu = Cpu();
|
||||
uint16_t rcsr = (fRxRlim<<kRCSR_V_RLIM) & kRCSR_M_RLIM;
|
||||
RlinkCommandList clist;
|
||||
cpu.AddWibr(clist, fBase+kRCSR, rcsr);
|
||||
Server().Exec(clist);
|
||||
Cpu().ExecWibr(fBase+kRCSR, rcsr);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -168,10 +166,7 @@ void Rw11CntlDL11::UnitSetup(size_t /*ind*/)
|
||||
void Rw11CntlDL11::Wakeup()
|
||||
{
|
||||
if (!fspUnit[0]->RcvQueueEmpty()) {
|
||||
RlinkCommandList clist;
|
||||
size_t ircsr = Cpu().AddRibr(clist, fBase+kRCSR);
|
||||
Server().Exec(clist);
|
||||
uint16_t rcsr = clist[ircsr].Data();
|
||||
uint16_t rcsr = Cpu().ExecRibr(fBase+kRCSR);
|
||||
if ((rcsr & kRCSR_M_RDONE) == 0) RcvChar(); // send if RBUF not full
|
||||
}
|
||||
|
||||
@ -245,9 +240,7 @@ void Rw11CntlDL11::RcvChar()
|
||||
{
|
||||
uint8_t ichr = fspUnit[0]->RcvQueueNext();
|
||||
if (fTraceLevel>0) TraceChar('r', 0, ichr);
|
||||
RlinkCommandList clist;
|
||||
Cpu().AddWibr(clist, fBase+kRBUF, ichr);
|
||||
Server().Exec(clist);
|
||||
Cpu().ExecWibr(fBase+kRBUF, ichr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// $Id: Rw11CntlLP11.cpp 1131 2019-04-14 13:24:25Z mueller $
|
||||
// $Id: Rw11CntlLP11.cpp 1133 2019-04-19 18:43:00Z mueller $
|
||||
//
|
||||
// Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
@ -13,6 +13,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2019-04-19 1133 1.3.3 use ExecWibr()
|
||||
// 2019-04-14 1131 1.3.2 remove SetOnline(), use UnitSetup()
|
||||
// 2019-04-07 1127 1.3.1 add fQueBusy, queue protection; fix logic;
|
||||
// Start(): ensure unit offline; better tracing
|
||||
@ -161,15 +162,10 @@ void Rw11CntlLP11::Start()
|
||||
void Rw11CntlLP11::UnitSetup(size_t ind)
|
||||
{
|
||||
Rw11UnitLP11& unit = *fspUnit[ind];
|
||||
bool online = unit.HasVirt() && ! unit.Virt().Error();
|
||||
|
||||
Rw11Cpu& cpu = Cpu();
|
||||
uint16_t csr = (online ? 0 : kCSR_M_ERROR) | // err field
|
||||
((fRlim & kCSR_B_RLIM) << kCSR_V_RLIM); // rlim field
|
||||
RlinkCommandList clist;
|
||||
cpu.AddWibr(clist, fBase+kCSR, csr);
|
||||
Server().Exec(clist);
|
||||
|
||||
bool online = unit.HasVirt() && ! unit.Virt().Error();
|
||||
uint16_t csr = (online ? 0 : kCSR_M_ERROR) | // err field
|
||||
((fRlim & kCSR_B_RLIM) << kCSR_V_RLIM); // rlim field
|
||||
Cpu().ExecWibr(fBase+kCSR, csr);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -199,6 +195,7 @@ void Rw11CntlLP11::Dump(std::ostream& os, int ind, const char* text,
|
||||
os << bl << " fItype: " << RosPrintf(fItype,"d",3) << endl;
|
||||
os << bl << " fFsize: " << RosPrintf(fFsize,"d",3) << endl;
|
||||
os << bl << " fRblkSize: " << RosPrintf(fRblkSize,"d",3) << endl;
|
||||
os << bl << " fQueBusy: " << RosPrintf(fQueBusy) << endl;
|
||||
|
||||
Rw11CntlBase<Rw11UnitLP11,1>::Dump(os, ind, " ^", detail);
|
||||
return;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// $Id: Rw11CntlLP11.hpp 1131 2019-04-14 13:24:25Z mueller $
|
||||
// $Id: Rw11CntlLP11.hpp 1132 2019-04-14 20:23:40Z mueller $
|
||||
//
|
||||
// Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
@ -95,12 +95,12 @@ namespace Retro {
|
||||
int RcvHandler();
|
||||
|
||||
protected:
|
||||
size_t fPC_buf; //!< PrimClist: buf index
|
||||
uint16_t fRlim; //!< interrupt rate limit
|
||||
uint16_t fItype; //!< interface type
|
||||
uint16_t fFsize; //!< fifo size
|
||||
uint16_t fRblkSize; //!< rblk chunk size
|
||||
bool fQueBusy; //!< rcv queue busy
|
||||
size_t fPC_buf; //!< PrimClist: buf index
|
||||
uint16_t fRlim; //!< interrupt rate limit
|
||||
uint16_t fItype; //!< interface type
|
||||
uint16_t fFsize; //!< fifo size
|
||||
uint16_t fRblkSize; //!< rblk chunk size
|
||||
bool fQueBusy; //!< rcv queue busy
|
||||
};
|
||||
|
||||
} // end namespace Retro
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// $Id: Rw11CntlRHRP.cpp 1131 2019-04-14 13:24:25Z mueller $
|
||||
// $Id: Rw11CntlRHRP.cpp 1133 2019-04-19 18:43:00Z mueller $
|
||||
//
|
||||
// Copyright 2015-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Other credits:
|
||||
@ -15,6 +15,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2019-04-19 1133 1.0.12 use ExecWibr()
|
||||
// 2019-04-14 1131 1.0.11 proper unit init, call UnitSetupAll() in Start()
|
||||
// 2019-02-23 1114 1.0.10 use std::bind instead of lambda
|
||||
// 2018-12-19 1090 1.0.9 use RosPrintf(bool)
|
||||
@ -292,8 +293,6 @@ void Rw11CntlRHRP::Start()
|
||||
void Rw11CntlRHRP::UnitSetup(size_t ind)
|
||||
{
|
||||
Rw11UnitRHRP& unit = *fspUnit[ind];
|
||||
RlinkCommandList clist;
|
||||
Rw11Cpu& cpu = Cpu();
|
||||
|
||||
// only two mayor drive states are used
|
||||
// power medium wlock : ds flags
|
||||
@ -318,12 +317,10 @@ void Rw11CntlRHRP::UnitSetup(size_t ind)
|
||||
}
|
||||
|
||||
unit.SetRpds(rpds); // remember new DS
|
||||
cpu.AddWibr(clist, fBase+kRPCS1, // setup unit
|
||||
(ind << kRPCS1_V_RUNIT) |
|
||||
(kRFUNC_WUNIT << kRPCS1_V_FUNC) );
|
||||
cpu.AddWibr(clist, fBase+kRPDT, unit.Rpdt()); // setup DT
|
||||
cpu.AddWibr(clist, fBase+kRPDS, rpds); // setup DS
|
||||
Server().Exec(clist);
|
||||
Cpu().ExecWibr(fBase+kRPCS1, (ind << kRPCS1_V_RUNIT) | // setup unit
|
||||
(kRFUNC_WUNIT << kRPCS1_V_FUNC),
|
||||
fBase+kRPDT, unit.Rpdt(), // setup DT
|
||||
fBase+kRPDS, rpds); // setup DS
|
||||
|
||||
return;
|
||||
}
|
||||
@ -433,8 +430,8 @@ int Rw11CntlRHRP::AttnHandler(RlinkServer::AttnArgs& args)
|
||||
uint32_t nwrd = (~uint32_t(rpwc)&0xffff) + 1; // transfer size in words
|
||||
|
||||
// all 4 units are always available, but check anyway
|
||||
if (unum > NUnit())
|
||||
throw Rexception("Rw11CntlRHRP::AttnHandler","Bad state: unum > NUnit()");
|
||||
if (unum >= NUnit())
|
||||
throw Rexception("Rw11CntlRHRP::AttnHandler","Bad state: unum >= NUnit()");
|
||||
|
||||
Rw11UnitRHRP& unit = *fspUnit[unum];
|
||||
//Rw11Cpu& cpu = Cpu();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// $Id: Rw11CntlRK11.cpp 1131 2019-04-14 13:24:25Z mueller $
|
||||
// $Id: Rw11CntlRK11.cpp 1133 2019-04-19 18:43:00Z mueller $
|
||||
//
|
||||
// Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Other credits:
|
||||
@ -15,6 +15,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2019-04-19 1133 2.0.12 use ExecWibr()
|
||||
// 2019-04-14 1131 2.0.11 proper unit init, call UnitSetupAll() in Start()
|
||||
// 2019-02-23 1114 2.0.10 use std::bind instead of lambda
|
||||
// 2018-12-19 1090 2.0.9 use RosPrintf(bool)
|
||||
@ -237,8 +238,6 @@ void Rw11CntlRK11::Start()
|
||||
void Rw11CntlRK11::UnitSetup(size_t ind)
|
||||
{
|
||||
Rw11UnitRK11& unit = *fspUnit[ind];
|
||||
Rw11Cpu& cpu = Cpu();
|
||||
RlinkCommandList clist;
|
||||
|
||||
uint16_t rkds = ind<<kRKDS_V_ID;
|
||||
if (unit.HasVirt()) { // file attached
|
||||
@ -250,8 +249,7 @@ void Rw11CntlRK11::UnitSetup(size_t ind)
|
||||
rkds |= kRKDS_M_WPS;
|
||||
}
|
||||
unit.SetRkds(rkds);
|
||||
cpu.AddWibr(clist, fBase+kRKDS, rkds);
|
||||
Server().Exec(clist);
|
||||
Cpu().ExecWibr(fBase+kRKDS, rkds);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// $Id: Rw11CntlTM11.cpp 1131 2019-04-14 13:24:25Z mueller $
|
||||
// $Id: Rw11CntlTM11.cpp 1133 2019-04-19 18:43:00Z mueller $
|
||||
//
|
||||
// Copyright 2015-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
// Other credits:
|
||||
@ -15,6 +15,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2019-04-19 1133 1.0.10 use ExecWibr()
|
||||
// 2019-04-14 1131 1.0.9 proper unit init, call UnitSetupAll() in Start()
|
||||
// 2019-02-23 1114 1.0.8 use std::bind instead of lambda
|
||||
// 2018-12-15 1082 1.0.7 use std::bind or lambda instead of boost::bind
|
||||
@ -220,8 +221,6 @@ void Rw11CntlTM11::Start()
|
||||
void Rw11CntlTM11::UnitSetup(size_t ind)
|
||||
{
|
||||
Rw11UnitTM11& unit = *fspUnit[ind];
|
||||
Rw11Cpu& cpu = Cpu();
|
||||
RlinkCommandList clist;
|
||||
|
||||
uint16_t tmds = 0;
|
||||
if (unit.HasVirt()) { // file attached
|
||||
@ -230,10 +229,9 @@ void Rw11CntlTM11::UnitSetup(size_t ind)
|
||||
if (unit.Virt().Bot()) tmds |= kTMRL_M_BOT;
|
||||
}
|
||||
unit.SetTmds(tmds);
|
||||
cpu.AddWibr(clist, fBase+kTMCR, (uint16_t(ind)<<kTMCR_V_RUNIT)|
|
||||
(kRFUNC_WUNIT<<kTMCR_V_FUNC) );
|
||||
cpu.AddWibr(clist, fBase+kTMRL, tmds);
|
||||
Server().Exec(clist);
|
||||
Cpu().ExecWibr(fBase+kTMCR, (uint16_t(ind)<<kTMCR_V_RUNIT)|
|
||||
(kRFUNC_WUNIT<<kTMCR_V_FUNC),
|
||||
fBase+kTMRL, tmds);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -357,7 +355,7 @@ int Rw11CntlTM11::AttnHandler(RlinkServer::AttnArgs& args)
|
||||
}
|
||||
|
||||
// check for general abort conditions: invalid unit number
|
||||
if (unum > NUnit()) {
|
||||
if (unum >= NUnit()) {
|
||||
AddErrorExit(clist, kTMCR_M_RICMD);
|
||||
Server().Exec(clist);
|
||||
return 0;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// $Id: Rw11Cpu.cpp 1131 2019-04-14 13:24:25Z mueller $
|
||||
// $Id: Rw11Cpu.cpp 1133 2019-04-19 18:43:00Z mueller $
|
||||
//
|
||||
// Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
@ -13,6 +13,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2019-04-19 1133 1.2.18 add ExecWibr(),ExecRibr(); LoadAbs(): better trace
|
||||
// 2019-04-13 1131 1.2.17 add defs for w11 cpu component addresses; add
|
||||
// MemSize(),MemWriteByte(); LoadAbs(): return start,
|
||||
// better odd byte handling;
|
||||
@ -489,6 +490,32 @@ int Rw11Cpu::AddWMem(RlinkCommandList& clist, uint32_t addr,
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
void Rw11Cpu::ExecWibr(uint16_t ibaddr0, uint16_t data0,
|
||||
uint16_t ibaddr1, uint16_t data1,
|
||||
uint16_t ibaddr2, uint16_t data2)
|
||||
{
|
||||
RlinkCommandList clist;
|
||||
AddWibr(clist, ibaddr0, data0);
|
||||
if (ibaddr1 > 0) AddWibr(clist, ibaddr1, data1);
|
||||
if (ibaddr2 > 0) AddWibr(clist, ibaddr2, data2);
|
||||
Server().Exec(clist);
|
||||
return;
|
||||
}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
uint16_t Rw11Cpu::ExecRibr(uint16_t ibaddr)
|
||||
{
|
||||
RlinkCommandList clist;
|
||||
int ic = AddRibr(clist, ibaddr);
|
||||
Server().Exec(clist);
|
||||
return clist[ic].Data();
|
||||
}
|
||||
|
||||
//------------------------------------------+-----------------------------------
|
||||
//! FIXME_docs
|
||||
|
||||
bool Rw11Cpu::MemRead(uint16_t addr, std::vector<uint16_t>& data,
|
||||
size_t nword, RerrMsg& emsg)
|
||||
{
|
||||
@ -722,8 +749,9 @@ bool Rw11Cpu::LoadAbs(const std::string& fname, RerrMsg& emsg,
|
||||
RlogMsg lmsg(Connect().LogFile());
|
||||
lmsg << "LoadAbs-I: block " << RosPrintf(blknum,"d",3)
|
||||
<< ", length " << RosPrintf(bytcnt-6,"d",5)
|
||||
<< " byte, address " << RosPrintBvi(ldaddr,8)
|
||||
<< ":" << RosPrintBvi(uint16_t(ldaddr+(bytcnt-6)-1),8);
|
||||
<< " byte, address " << RosPrintBvi(ldaddr,8);
|
||||
if (bytcnt > 6)
|
||||
lmsg << ":" << RosPrintBvi(uint16_t(ldaddr+(bytcnt-6)-1),8);
|
||||
}
|
||||
state = (bytcnt == 6) ? s_chksum : s_data;
|
||||
break;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// $Id: Rw11Cpu.hpp 1131 2019-04-14 13:24:25Z mueller $
|
||||
// $Id: Rw11Cpu.hpp 1133 2019-04-19 18:43:00Z mueller $
|
||||
//
|
||||
// Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
@ -13,6 +13,7 @@
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2019-04-19 1133 1.2.18 add ExecWibr(),ExecRibr()
|
||||
// 2019-04-13 1131 1.2.17 add defs for w11 cpu component addresses; add
|
||||
// MemSize(),MemWriteByte(); LoadAbs() returns start
|
||||
// 2019-02-15 1112 1.2.16 add HasIbtst()
|
||||
@ -136,6 +137,11 @@ namespace Retro {
|
||||
const uint16_t* buf, size_t size,
|
||||
uint16_t mode=kCPAH_M_22BIT,
|
||||
bool singleblk=false);
|
||||
|
||||
void ExecWibr(uint16_t ibaddr0, uint16_t data0,
|
||||
uint16_t ibaddr1=0, uint16_t data1=0,
|
||||
uint16_t ibaddr2=0, uint16_t data2=0);
|
||||
uint16_t ExecRibr(uint16_t ibaddr);
|
||||
|
||||
bool MemRead(uint16_t addr, std::vector<uint16_t>& data,
|
||||
size_t nword, RerrMsg& emsg);
|
||||
@ -248,7 +254,7 @@ namespace Retro {
|
||||
static const uint16_t kCPUSDREG = 0177570; //!< CPU SDREG address
|
||||
|
||||
static const uint16_t kMEMHISIZE = 0177762; //!< MEM HISIZE address
|
||||
static const uint16_t kMEMLOSIZE = 0177760; //!< MEM HISIZE address
|
||||
static const uint16_t kMEMLOSIZE = 0177760; //!< MEM LOSIZE address
|
||||
static const uint16_t kMEMHM = 0177752; //!< MEM HM address
|
||||
static const uint16_t kMEMMAINT = 0177750; //!< MEM MAINT address
|
||||
static const uint16_t kMEMCNTRL = 0177746; //!< MEM CNTRL address
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user