RetroBrew Computers Forum
Discussion forum for the RetroBrew Computers community.

Home » RBC Forums » General Discussion » New Board Development - SBC6120-RBC Edition
Re: New Board Development - SBC6120-RBC Edition [message #4004 is a reply to message #4003] Sat, 23 December 2017 09:27 Go to previous messageGo to next message
will is currently offline  will
Messages: 153
Registered: October 2015
Senior Member
Hehehe. Haven't written a BASIC program for years!
LIST

GUESS   BA    5B    

10 LET N=1
20 LET X=10000
30 LET C=0
35 PRINT "CHOOSE A NUMBER FROM";N;"TO";X;"AND I WILL TRY TO GUESS IT."
40 IF N=X THEN 300
42 LET G=INT(N+(X-N)/2)
44 LET C=C+1
50 PRINT "IS YOUR NUMBER BIGGER THAN";G;"(Y/N)";
60 INPUT A$
70 IF A$="Y" THEN 100
80 IF A$="N" THEN 200
90 GOTO 50
100 LET N=1+G
110 GOTO 40
200 LET X=G
210 GOTO 40
300 PRINT "YOUR NUMBER IS"; N
310 PRINT "IT TOOK ME";C;"QUESTIONS."
320 END

READY
RUN

GUESS   BA    5B    

CHOOSE A NUMBER FROM 1 TO 10000 AND I WILL TRY TO GUESS IT.
IS YOUR NUMBER BIGGER THAN 5000 (Y/N)?N
IS YOUR NUMBER BIGGER THAN 2500 (Y/N)?N
IS YOUR NUMBER BIGGER THAN 1250 (Y/N)?N
IS YOUR NUMBER BIGGER THAN 625 (Y/N)?N
IS YOUR NUMBER BIGGER THAN 313 (Y/N)?N
IS YOUR NUMBER BIGGER THAN 157 (Y/N)?N
IS YOUR NUMBER BIGGER THAN 79 (Y/N)?N
IS YOUR NUMBER BIGGER THAN 40 (Y/N)?N
IS YOUR NUMBER BIGGER THAN 20 (Y/N)?N
IS YOUR NUMBER BIGGER THAN 10 (Y/N)?Y
IS YOUR NUMBER BIGGER THAN 15 (Y/N)?N
IS YOUR NUMBER BIGGER THAN 13 (Y/N)?Y
IS YOUR NUMBER BIGGER THAN 14 (Y/N)?N
YOUR NUMBER IS 14 
IT TOOK ME 13 QUESTIONS.

READY

[Updated on: Tue, 26 December 2017 12:17]

Report message to a moderator

Re: New Board Development - SBC6120-RBC Edition [message #4011 is a reply to message #4004] Tue, 26 December 2017 10:58 Go to previous messageGo to next message
will is currently offline  will
Messages: 153
Registered: October 2015
Senior Member
Just in case this proves useful to anyone:

I got rather tired of lugging a USB RS232 adapter, RS232 null modem cable, and a 5V power supply around in order to use my SBC6120. I've been mainly working with it on my laptop in various places around the house, but our house has a real dearth of power sockets (several times I've ended up running a mains extension lead halfway across the room).

I measured the power consumption of my SBC6120, including IDE to CF adapter and CF card, as about 200mA. USB can easily deliver this. I decided to implement a simple mod to give the board a USB interface to deliver both power and data. I'm using an FTDI232RL breakout board (search ebay for "mini FTDI232"; it's the same part John's 4UART ECB board uses).

I removed the MAX232CPE chip (U17) leaving an empty socket. I then stacked a second 16-pin dual-wipe socket on top of this socket, and soldered short wires into the sockets for pins 10, 12, 15 and 16. I then connected those to RX, TX, GND and VCC (respectively) on the FTDI board. Finally I glued the FTDI board on top of the molex power socket with a bit of hot snot.

Only been using it for a short while, but it seems to work well. I now have just a single USB lead running to my laptop. The mod is easily reversible, just pop out the stacked socket and replace the MAX232 to restore the original functionality.

One minor caveat: This mod bypasses the 500mA fuse at F1.
Re: New Board Development - SBC6120-RBC Edition [message #4012 is a reply to message #4011] Tue, 26 December 2017 11:56 Go to previous messageGo to next message
will is currently offline  will
Messages: 153
Registered: October 2015
Senior Member
Photo attached.
index.php?t=getfile&id=753&private=0
Re: New Board Development - SBC6120-RBC Edition [message #4014 is a reply to message #4012] Tue, 26 December 2017 22:13 Go to previous messageGo to next message
djones60 is currently offline  djones60
Messages: 15
Registered: October 2015
Location: Scottsburg, IN
Junior Member
Very cool. I may have to give that mod a try. It sure is a cleaner set up.
Re: New Board Development - SBC6120-RBC Edition [message #4024 is a reply to message #454] Wed, 27 December 2017 15:35 Go to previous messageGo to next message
will is currently offline  will
Messages: 153
Registered: October 2015
Senior Member
I am working on producing new disk images for OS/8 on SBC-6120 (mainly as an excuse to learn more about this machine).

The easiest way to create a bootable OS/8 image seems to be to run OS/8 itself inside a simulator and get it to build the disk image itself. However the SIMH simulator does not support the IDE interface that SBC-6120 uses, so we can't attach the disk, the OS/8 ID01 handler cannot run, and so we can't create a bootable disk image. There's another simulator (WinEight) which does support everything required, I believe this is what was used to create the current disk images, however WinEight is not easily scriptable and it's win32 software. Note that WinEight will run under Linux using wine (Yo dawg I heard you like simulation, so I put an simulator in your simulator so you can simulate while you simulate...)

I have therefore extended SIMH to support the ID01 disks and the BTS6120 "panel request" IOTs used for IDE disk transfers. The attached patch implements this functionality. It is only very lightly tested but it works well enough to boot up OS/8 from the SBC6120 disk images, so we're on the right path at least. It could be easily extended to implement other functionality eg the VM01 SRAM disk, etc.

Next I'm going to work on doing an installation by hand to learn what needs to be done to build the ID01 handler and integrate it with OS/8, and then getting the PiDP/8 "mkos8" script to work so that we can benefit from the work being done on that project to build OS/8 disk images from the distribution tapes.

In the course of writing this I discovered that the BTS6120 source code is really quite excellently documented. Hats off. I would have given up long ago without that documentation.

[Updated on: Wed, 27 December 2017 15:46]

Report message to a moderator

Re: New Board Development - SBC6120-RBC Edition [message #4028 is a reply to message #4024] Thu, 28 December 2017 15:40 Go to previous messageGo to next message
will is currently offline  will
Messages: 153
Registered: October 2015
Senior Member
I've prepared updated disk images based on the PiDP/8I project. These have a good selection of software including ADVENT (to run it - "R FRTS <enter> ADVENT <escape>", be warned it takes a minute or two while it starts up). They also include the full source code for the OS and utilities. Note that the OS/8 image includes the ID01 handler (for IDE disks) but not the VM01 hander (for SRAM disk).

I suggest you write all four images to the IDE disk (in linux do "cat *.img | sudo dd bs=1M of=<device>"). This will give you four drives in OS/8 named SYS:, IDA1:, IDA2: and IDA3:.

I had a minor problem working with the PiDP/8 disks -- in particular the DIR command outputs a form-feed character (ASCII 12) after completing its work. This is a pain on a video terminal as it erases the screen!

I assembled DIRECT.PA, examined the listing and figured out which two instructions to convert to NOPs to stop this behaviour. The patched version is on these disks.

There's also a C compiler on here, not tried it yet.

Disk images are attached to this post.

[Updated on: Thu, 28 December 2017 15:53]

Report message to a moderator

Re: New Board Development - SBC6120-RBC Edition [message #4029 is a reply to message #4028] Fri, 29 December 2017 06:10 Go to previous messageGo to next message
will is currently offline  will
Messages: 153
Registered: October 2015
Senior Member
Instructions in case anyone wants to produce their own disk images from the PiDP8 distribution;


# start with pidp8i-v20171222.zip
# apply my SIMH BTS6120 patch; note that patching the makefile will fail,
# instead hand patch Makefile.in so it includes pdp8_bts.o in the simh executable
./configure --os8-vtedit
make
cd bin
# we need a couple of files from the BTS6120 source code;
# copy ID01.PA here, make a copy named ID01NS.PA
# copy VM01.PA here, make a copy named VM01NS.PA
# edit ID01.PA, enable SYS=1 line
# edit VM01NS.PA, comment out SYS=1 line
ls *.PA > sbc6120.list
./txt2os8 --tu56 sbc6120
dd if=/dev/zero bs=2M count=1 of=id0.disk1
cp id0.disk id1.disk
cp id0.disk id2.disk
cp id0.disk id3.disk
./pidp8i-sim
attach id0 id0.disk
attach id1 id1.disk
attach id2 id2.disk
attach id3 id3.disk
attach rk0 os8v3d-patched.rk05
attach rk1 os8v3d-src.rk05
attach dt0 sbc6120.tu56
boot rk0
ASSIGN SYS DSK
R FOTP
SYS:<DTA0:/L
^C
PAL ID01
PAL ID01NS
PAL VM01
PAL VM01NS
RUN SYS BUILD
UN RK8E
UN PT8E
UN TC
UN TC08
UN RX01
UN LPSV
IN RK05:RKA0,RKB0
DE RKA2
DE RKB2
LO VM01NS
LO ID01
IN ID01:SYS,IDA1-5
IN VM01:VMA0-1
DSK=ID01:IDA1
BO
Y
RUN RKA0 FOTP
SYS:<RKA0:/L
^C
R CCL
GET SYS PIP
ODT
13643/      5300 ^J
13644/      1    ^J
^C
SAVE SYS PIP
GET SYS DIRECT
14064/      7000 ^J
14065/      7000 ^J
^C
SAVE SYS DIRECT
ZERO IDA1:
ZERO IDA2:
ZERO IDA3:
RUN SYS FOTP
IDA1:<RKB0:/L
IDA2:<RKA1:/L
IDA3:<RKB1:/L
^C
SQUISH IDA1:
Y
SQUISH IDA2:
Y
SQUISH IDA3:
Y
SQUISH SYS:
Y
RUN SYS BUILD
UN RK8E
UN PT8E
UN TC
UN TC08
UN RX01
UN LPSV
UN RK05
LO SYS:VM01NS
LO SYS:ID01
IN ID01:SYS,IDA1-7
IN VM01:VMA0-3
DSK=ID01:IDA1
BO
# at this point we're done; quit SIMH (Ctrl-E; quit) and copy the id?.disk images to your SBC6120
Re: New Board Development - SBC6120-RBC Edition [message #4036 is a reply to message #4028] Mon, 01 January 2018 12:43 Go to previous messageGo to next message
will is currently offline  will
Messages: 153
Registered: October 2015
Senior Member
My first PDP-8 assembler program. Designed to solve Project Euler problem 2: "By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms."

The obvious difficulty here is that 4,000,000 is a lot more than 4,096 so I had to learn how to use multiple precision arithmetic. The other difficulty is converting multiple precision numbers to decimal -- I decided to punt that one to another day and work entirely in octal instead.

	*200
START,	CLL CLA			/ CLEAR LINK, ACCUMULATOR
	TLS			/ OUTPUT NUL TO TERMINAL
NEXTFIB,JMS CALCFIB		/ CALC NEXT FIB SEQ NO
	TAD (DWB)		/ PRINT NEXT FIB NO
	JMS PRINTD
	JMS CRLF
	JMS CHKDONE		/ COMPARE DWB TO TARGET
	SZL			/ CHKDONE RETURNS LINK SET IF OVER TARGET
	JMP RESULT		/ PRINT RESULT AND QUIT
	/ TEST IF FIB NO IN DWB IS EVEN
	CLA IAC			/ AC = 1
	AND DWB+1		/ AC = LSB OF DWB
	SZA			/ SKIP NEXT IF EVEN
	JMP NEXTFIB		/ IT'S ODD - NEXT FIB
	/ UPDATE SUM: CALCULATE SUM=SUM+DWB
	CLL CLA
	TAD SUM+1
	TAD DWB+1
	DCA SUM+1
	RAL			/ CARRY
	TAD SUM
	TAD DWB
	DCA SUM			/ SUM UPDATED
	JMP NEXTFIB

TARG,	1720			/ TARGET: 4,000,000 (DEC)
	4400
DWA,	0
	1
DWB,	0			/ FIB SEQ NO STORED HERE
	0
SUM,	0
	0
DWT,	0
	0

/ PRINT RESULT AND TERMINATE CLEANLY
RESULT,	JMS CRLF
	CLL CLA
	TAD (SUM)
	JMS PRINTD
	JMS CRLF
	JMP 7600		/ RETURN TO OS/8 MONITOR

/ CHECK IF DWB > TARG
CHKDONE,0
	CLL CLA
	/ COMPUTE DWT=TARG-DWB
	TAD DWB+1
	CLL CMA CML IAC		/ FORM 13-BIT NEGATIVE (NO PREV BORROW)
	TAD TARG+1
	DCA DWT+1
	RAL			/ PROPAGATE COMPLEMENTED BORROW
	TAD DWB
	CMA CML IAC		/ FORM 13-BIT NEGATIVE (WITH PREV BORROW)
	TAD TARG
	DCA DWT
	/ LINK IS NOW SET IF RESULT WAS NEGATIVE
	JMP I CHKDONE

/ CALCULATE NEXT NUMBER IN FIB SEQUENCE
CALCFIB,0			/ RETURN ADDRESS
	CLL CLA
	/ COMPUTE DWT=DWA+DWB
	TAD DWA+1
	TAD DWB+1
	DCA DWT+1
	RAL
	TAD DWA
	TAD DWB
	DCA DWT
	CLL CLA
	/ DWA=DWB
	TAD DWB+1
	DCA DWA+1
	TAD DWB
	DCA DWA
	/ DWB=DWT
	TAD DWT+1
	DCA DWB+1
	TAD DWT
	DCA DWB
	/ NEXT FIB SEQUENCE NO IS NOW IN DWB
	JMP I CALCFIB

	PAGE

/ PRINT CR+LF (NEWLINE)
CRLF,	0
	CLL CLA
	TAD (215)
	TSF
	JMP .-1
	TLS
	CLL CLA
	TAD (212)
	TSF
	JMP .-1
	TLS
	JMP I CRLF

/ PRINTD - PRINT A DOUBLE WORD AS 8 OCTAL DIGITS
/ ENTER WITH ADDRESS OF DOUBLE WORD IN AC
PRINTD,	0			/ RETURN ADDRESS
	DCA DWADDR		/ SAVE ADDRESS OF DWORD
	TAD I DWADDR		/ LOAD FIRST WORD
	JMS PRINTO		/ PRINT 4 DIGITS
	ISZ DWADDR		/ INCR ADDRESS
	CLL CLA			/ CLEAR ACCUMULATOR AND LINK
	TAD I DWADDR		/ LOAD SECOND WORD
	JMS PRINTO		/ PRINT 4 DIGITS
	JMP I PRINTD		/ RETURN
DWADDR,	0			/ STORAGE OF DWORD ADDR

/ PRINTO - PRINT A WORD (IN AC) AS 4 OCTAL DIGITS
PRINTO,	0			/ RETURN ADDRESS
	DCA WORD
	TAD (-4)		/ NUM ITERATIONS
	DCA DIGITS		/ SAVE DIGIT COUNT
PRINT1,	CLL CLA			/ CLEAN UP
	TAD WORD		/ GET REMAINING BITS
	CLL RTL			/ SHIFT LEFT 2 BITS
	RTL			/ THEN 2 MORE (REMEMBER LINK)
	DCA SAVCHR
	TAD SAVCHR
	RAR			/ RECOVER LINK BIT
	DCA WORD		/ REMEMBER IT
	TAD SAVCHR		/ GET DIGIT BACK
	AND (7)			/ JUST 1 DIGIT PLZ
	TAD ("0)		/ CONVERT TO ASCII
	TSF			/ CHECK TERM READY
	JMP .-1			/ LOOP IF NOT
	TLS			/ OUTPUT CHAR TO TERM
	/ GET READY FOR NEXT DIGIT
	ISZ DIGITS		/ ENOUGH YET?
	JMP PRINT1		/ NO; DO ANOTHER!
	JMP I PRINTO		/ YES; RETURN
	
DIGITS,	0
SAVCHR,	0
WORD,	0


Here's the output from running the program:
.PAL PE2
ERRORS DETECTED: 0
LINKS GENERATED: 6

.LOAD PE2

.START
00000001
00000001
00000002
00000003
00000005
00000010
00000015
00000025
00000042
00000067
00000131
00000220
00000351
00000571
00001142
00001733
00003075
00005030
00010125
00015155
00025302
00042457
00067761
00132440
00222421
00355061
00577502
01154563
01754265
03131050
05105335
10236405
15343742
25602347

21463144

.


21463144 octal = 4613732 decimal. I believe this is the correct answer!

Took less than 5 minutes to solve this problem in Python on a modern machine. Took the better part of a day to write this on the SBC6120; a lot of that time was spent learning to apply the machine's instruction set, battling with EDIT.SV (not the worst editor I've ever used, but close), and debugging with ODT (which sorely lacks a "single step" command -- unless I've missed it?)
Re: New Board Development - SBC6120-RBC Edition [message #4037 is a reply to message #4036] Wed, 03 January 2018 01:01 Go to previous message
b1ackmai1er is currently offline  b1ackmai1er
Messages: 34
Registered: November 2017
Member
Nice work ... it made me think of this quote ...

"We choose to go to the Moon! ... We choose to go to the Moon in this decade and do the other things, not because they are easy, but because they are hard; because that goal will serve to organize and measure the best of our energies and skills, because that challenge is one that we are willing to accept, one we are unwilling to postpone, and one we intend to win ..." (JFK / wikipedia)
Previous Topic: Arc/Unarc For Dos/Windows 7
Next Topic: Mark IV Serial Port Troubleshooting


Current Time: Wed Jan 24 04:14:48 PST 2018

Total time taken to generate the page: 0.06145 seconds