RetroBrew Computers Forum
Discussion forum for the RetroBrew Computers community.

Home » RBC Forums » General Discussion » CB030, A 68030 SBC for hobbyists
Re: CB030, A 68030 SBC for hobbyists [message #7157 is a reply to message #7154] Tue, 03 March 2020 07:17 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
mikemac wrote on Mon, 02 March 2020 22:53


Copying B: to the PC and then back to a new B: using gkermit sounds like an overnight job. : Shocked

Is copying A: to a new B: enough to verify the CF to be working? IE the CF that don't work would be detected by such an exercise?
Mike,
Copying A: to new B: with verify flag is a reliable way of checking the compatibility of new CF disk. The command is:
pip b:=a:*.*[v]

gkermit is quite fast transfer a few files between PC and CB030. Transfer the entire CP/M68K distribution files take about 40 minutes.

I'm working on improving the CF interface. I'm quite optimistic that I've found the solution. It has to do with the tail end of the CF access where CF read/write needs to be negated first before CF chip select negates. With that fix, I'm able to read/write many brands of CF including the 2G Verbatim disk. So far every CF disk I tried has worked. Unfortunately this requires a CPLD change; do you have an Altera CPLD programmer? If not, I'll ship you another CB030 with the CPLD fix after I've done a few days of testing.

Bill

PS, your current SanDisk 256meg CF disk should work just fine without the CPLD fix. It is a blazing fast disk that can handle the lack of hold time at the end of a CF access.

[Updated on: Tue, 03 March 2020 07:23]

Report message to a moderator

Re: CB030, A 68030 SBC for hobbyists [message #7158 is a reply to message #7157] Tue, 03 March 2020 07:28 Go to previous messageGo to next message
mikemac is currently offline  mikemac
Messages: 250
Registered: March 2017
Senior Member
I have a Terasic Blaster 3" from my keyboard as I type hooked up to a Altera MAX10 dev board.

And I have these versions of Quartus available on my machine:

Mercury=>ls /opt/Quartus/
total 28
drwxrwxr-x  6 mikemac mikemac 4096 Mar  9  2017 12.0sp2
drwxr-xr-x  8 mikemac mikemac 4096 Apr 19  2017 13.0sp1
drwxrwxr-x  8 mikemac mikemac 4096 Mar  9  2017 13.1
drwxr-xr-x 10 root    root    4096 Mar  9  2017 16.1
drwxrwxr-x 10 mikemac mikemac 4096 May  9  2017 17.0
drwxrwxr-x 10 mikemac mikemac 4096 Feb 17  2019 18.1
drwxr-xr-x 10 mikemac mikemac 4096 Jan 16 19:40 19.1

One of my longer term goals for the CB030 is to muck around with the CPLD's config. Just to see if I can really muck it up! Very Happy

I have a Transcend 4G 133X CF card coming today. I'm looking at using one of the larger CF cards as the disk for Linux. It's obviously gross overkill for CPM. Speaking of which, I did 'dd' the B: drive to my Linux machine and back to an 8MB SanDisk card and it seems to work. CPM recognizes it and 'dir' works.



Mike

[Updated on: Tue, 03 March 2020 07:32]

Report message to a moderator

Re: CB030, A 68030 SBC for hobbyists [message #7159 is a reply to message #7158] Tue, 03 March 2020 07:52 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Mike,
Great, give me a day or so to try out all the CF disks I have. I'll publish the revised CPLD equations on CB030 homepage:
https://www.retrobrewcomputers.org/doku.php?id=builderpages: plasmo:cb030:cb030_rev1

I'll provide an instruction on how to update it.
Bill

Edit: I don't have a Transcend 4G, but I do have a Silicon Drive 4G (SSD-C04G-3500) and it works with the fixed CPLD.

[Updated on: Tue, 03 March 2020 07:54]

Report message to a moderator

Re: CB030, A 68030 SBC for hobbyists [message #7160 is a reply to message #7159] Tue, 03 March 2020 08:56 Go to previous messageGo to next message
mikemac is currently offline  mikemac
Messages: 250
Registered: March 2017
Senior Member
That'll be great! I still have to find my stash of 29F040s from "safe keeping", verify my M68K gcc tool chain, build a boot loader, kernel, and initramfs all before I will really need big CF support.

Oh! And do a bit of "real" work too! Sad



Mike
Re: CB030, A 68030 SBC for hobbyists [message #7166 is a reply to message #7160] Wed, 04 March 2020 19:05 Go to previous messageGo to next message
mikemac is currently offline  mikemac
Messages: 250
Registered: March 2017
Senior Member
A couple of questions:

1 - I don't see the connector for the "Discrete I/O Port" in the schematics. I assume it's the output port from the 68681 but the number of pins don't quite match.

2 - On the 68681, you used A1-A4 for RS1-4. That makes each register separated by an empty byte. Was there a reason for using A1-4 instead of the more traditional A0-A3?

I finally got the right USB cables [USB A extension cables is what works] today. My 64MB 72 pin SIMM is supposed to be here on Friday. I've been able to build the T030 kernel. Starting configuring a kernel for the CB030. The IDE and serial drivers will need to be written/modified for the board. And I've started sketching out a boot ROM. I'm going to start with minimal functionality in it with the hope that it might get merged into your ROM so more people can play too.

3 - Will ST39SF040 flash ROMs work on the board? They're 5V and pin compatible. I used them in my 68SEC000 board without a problem. [ROM problem that is. Plenty of other problems with that board!]



Mike

[Updated on: Wed, 04 March 2020 19:06]

Report message to a moderator

Re: CB030, A 68030 SBC for hobbyists [message #7167 is a reply to message #7166] Wed, 04 March 2020 19:30 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Mike,
Attached is the discrete I/O port definition. I'll put it in the CB030 homepage as well.

The A1-A4 for RS1-4 is a holdover from Tiny68K which is based on 68000 and does not have dynamic bus sizing capability. With 68020/30, I probably should've use A0-A3.

ST39F040 should work just fine. I am ordering a few of them as well. I happened to have several hundred AT49F040 in PLCC package, so that's why I used them the way I did.

Feel free to modify the ROM code as you see fit. What I have is chaotic, messy code and probably should be abandon all together.
Bill

[Updated on: Wed, 04 March 2020 19:34]

Report message to a moderator

Re: CB030, A 68030 SBC for hobbyists [message #7168 is a reply to message #7150] Wed, 04 March 2020 22:21 Go to previous messageGo to next message
mikesmith is currently offline  mikesmith
Messages: 80
Registered: March 2018
Member
Here's a script I wrote for deploying host-built binaries to a CP/M disk image for simulator testing; should work for CF images too. It needs cpmtools installed.

#!/bin/sh
#
# Create CP/M disk image from a master, adding files to the User 0 area.
#
# usage: <output disk image> <input file> [...]
#
master_disk=`dirname $0`/t68k_cpm_disk.bin
temporary_disk=`mktemp`
output_disk=$1
shift
input_files=$*

error() {
        echo $*
        exit 1
}

if [ -z $output_disk ]; then
        error 'missing output disk file name'
fi
if [ -z $input_files ]; then
        error 'missing input file name(s)'
fi

dd if=$master_disk of=$temporary_disk conv=swab

for ifile in $input_files; do
        cpmcp -f tiny68k $temporary_disk $ifile 0:`basename $ifile`
done

dd if=$temporary_disk of=$output_disk conv=swab
rm $temporary_disk
Re: CB030, A 68030 SBC for hobbyists [message #7169 is a reply to message #7160] Wed, 04 March 2020 22:25 Go to previous messageGo to next message
mikesmith is currently offline  mikesmith
Messages: 80
Registered: March 2018
Member
MIke,

I have a (slightly) modular bootloader I've been working on for Bill's family of boards. I've been busy de-Atari-ing Minix 1.6.25 (and a bunch of other projects) just recently, but I was planning on acquiring one of the CB030 boards and adding support eventually.

If you'd like to collaborate (or just get a jump start Cool https://github.com/John-Titor/68k_rom - I have a crosstool-NG config that generates a workable toolchain as well if you'd like.

= Mike
Re: CB030, A 68030 SBC for hobbyists [message #7170 is a reply to message #7167] Thu, 05 March 2020 08:39 Go to previous messageGo to next message
mikemac is currently offline  mikemac
Messages: 250
Registered: March 2017
Senior Member
Thanks for the pinouts of the discrete I/O port.

One more question (for the moment):

4- Do you have any unused pins left on the 7128S? The CF/IDE interface doesn't have its IRQ signal attached to anything. I've never written a polling driver in Linux before. I don't know what issues will come up as a result.

5 - What are the IRQ assignments for the M68K? IRQ681! appears to be the only IQR on the system.



Mike
Re: CB030, A 68030 SBC for hobbyists [message #7171 is a reply to message #7169] Thu, 05 March 2020 08:44 Go to previous messageGo to next message
mikemac is currently offline  mikemac
Messages: 250
Registered: March 2017
Senior Member
mikesmith wrote on Wed, 04 March 2020 23:25
MIke,

I have a (slightly) modular bootloader I've been working on for Bill's family of boards. I've been busy de-Atari-ing Minix 1.6.25 (and a bunch of other projects) just recently, but I was planning on acquiring one of the CB030 boards and adding support eventually.

If you'd like to collaborate (or just get a jump start Cool https://github.com/John-Titor/68k_rom - I have a crosstool-NG config that generates a workable toolchain as well if you'd like.

= Mike
Thanks for the code pointer. I'll definitely be looking it over.

I have both gcc 4.4.1 and gcc 6.1.0 built for the M68K. I also have the 'build_cross_gcc.sh' script so I can build other versions if needed. gcc 6.1.0 does compile the 4.9.156 Linux kernel so I should be good to go.



Mike
Re: CB030, A 68030 SBC for hobbyists [message #7173 is a reply to message #7170] Thu, 05 March 2020 13:15 Go to previous messageGo to next message
mikesmith is currently offline  mikesmith
Messages: 80
Registered: March 2018
Member
mikemac wrote on Thu, 05 March 2020 08:39
Thanks for the pinouts of the discrete I/O port.

One more question (for the moment):

4- Do you have any unused pins left on the 7128S? The CF/IDE interface doesn't have its IRQ signal attached to anything. I've never written a polling driver in Linux before. I don't know what issues will come up as a result.

5 - What are the IRQ assignments for the M68K? IRQ681! appears to be the only IQR on the system.
The answers are kind of related. Bill doesn't believe in autovectoring Cool, and he'd need to drive the data lines to vector the CF interrupt, so no CF interrupt.

The '681 vector is whatever you choose to program into the chip at initialization time. Unless there's specific logic in the '030 to stop it, you could have it make a system call if you really wanted to...
Re: CB030, A 68030 SBC for hobbyists [message #7174 is a reply to message #7173] Thu, 05 March 2020 13:57 Go to previous messageGo to next message
mikemac is currently offline  mikemac
Messages: 250
Registered: March 2017
Senior Member
mikesmith wrote on Thu, 05 March 2020 14:15
mikemac wrote on Thu, 05 March 2020 08:39
Thanks for the pinouts of the discrete I/O port.

One more question (for the moment):

4- Do you have any unused pins left on the 7128S? The CF/IDE interface doesn't have its IRQ signal attached to anything. I've never written a polling driver in Linux before. I don't know what issues will come up as a result.

5 - What are the IRQ assignments for the M68K? IRQ681! appears to be the only IQR on the system.
The answers are kind of related. Bill doesn't believe in autovectoring Cool, and he'd need to drive the data lines to vector the CF interrupt, so no CF interrupt.

The '681 vector is whatever you choose to program into the chip at initialization time. Unless there's specific logic in the '030 to stop it, you could have it make a system call if you really wanted to...
He could map it to an IPL level like he does with the IRQ681 interrupt. (IPL = 0x3). If I'm careful not to plug anything into the ZBUS headers, I think I can connect the CF's INTRQ pin to INTX. Probably will have to pull R17 too. And then worry about whether it needs to be inverted or not.

Or run out of a RAM disk until I can figure it out.



Mike
Re: CB030, A 68030 SBC for hobbyists [message #7175 is a reply to message #7173] Thu, 05 March 2020 13:57 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 333
Registered: October 2015
Senior Member
You don't need an IRQ for Linux for the classic old style ATA controller. Just set the IRQ to 0 (modern Linux) or NOIRQ aka -1 (old old Linux). For the cases where you disk is fast to respond to a command and your CPU is slow it's really not important. If you have a 16bit interface and want to use an IDE tape drive or IDE CD-ROM then it is useful but by no means essential. You could just wire it to a 68681 pin but I don't think it is worth it.

With really slow processors and CF it gets even weirder because you hit the point where the CF adapter is memory speed (or with DMA faster than CPU memory speed) and it becomes faster to read from the disk than cache stuff and so on.

Alan
Re: CB030, A 68030 SBC for hobbyists [message #7180 is a reply to message #7175] Thu, 05 March 2020 17:59 Go to previous messageGo to next message
mikemac is currently offline  mikemac
Messages: 250
Registered: March 2017
Senior Member
Anyone ever use an Arduino or some such as an in circuit emulator of a 39F040 ROM? I've gotten spoiled by being able to update the firmware on one of my projects via JTAG. This physically prying the ROM out of the board, flashing (and verifying!Wink it, and carefully putting it back it over and over is so 1980's! Very Happy I'll probably dust off the M68K emulator for some of the initial boot loader work.


Mike
Re: CB030, A 68030 SBC for hobbyists [message #7181 is a reply to message #7174] Thu, 05 March 2020 20:20 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Mike,
Regarding the interrupt allocation on CB030:
68681 generates level 3 vectored interrupt. 68681 serves as an interrupt controller for serial port interrupts, timer interrupts and discrete input interrupts. There are two spare pins on the I/O expansion connector (pin 39 and pin 40) that are connected to 68681 discrete inputs IP1 and IP2 which can generate vectored interrupts through 68681. You are correct the CF interface does not generate interrupt as currently designed, but a jumper wire can be connected to IPx of 68681 to generate vectored interrupt.

Alternatively INTX (pin 22) of the I/O expansion connector generates level 4 autovectored interrupt so CF interrupt can also connect to INTX to generate autovectored interrupt. My gut feeling is the CF disk is so fast that interrupt service does not really speed up the file transfer significantly.
Bill
Re: CB030, A 68030 SBC for hobbyists [message #7182 is a reply to message #7180] Thu, 05 March 2020 20:35 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
mikemac wrote on Thu, 05 March 2020 18:59
Anyone ever use an Arduino or some such as an in circuit emulator of a 39F040 ROM? I've gotten spoiled by being able to update the firmware on one of my projects via JTAG. This physically prying the ROM out of the board, flashing (and verifying!Wink it, and carefully putting it back it over and over is so 1980's! Very Happy I'll probably dust off the M68K emulator for some of the initial boot loader work.
Mike,
AT49F040 can be programmed in-situ, so it should be possible to load the new ROM firmware in RAM to check it out and once the new ROM firmware is working correctly, it can be programmed into AT49F040 without removing it. I'm sure the same thing can be done with 39F040 as well.

I've done the in-situ programming of flash on the repurposed Soneplex MPU board, so let me see if I can port that code to CB030 in the next few days.
Bill

Re: CB030, A 68030 SBC for hobbyists [message #7183 is a reply to message #7170] Thu, 05 March 2020 21:19 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
mikemac wrote on Thu, 05 March 2020 09:39


4- Do you have any unused pins left on the 7128S? The CF/IDE interface doesn't have its IRQ signal attached to anything. I've never written a polling driver in Linux before. I don't know what issues will come up as a result.

Mike,
Returning to your original question about whether there are spare pins on CPLD for CF interrupt: yes, there are two spare pins; it is not difficult to wire CF interrupt to one of the spare pins; add a pull resistor; and modify the CPLD to add a level 2 autovector.
Bill

Re: CB030, A 68030 SBC for hobbyists [message #7184 is a reply to message #7183] Thu, 05 March 2020 23:07 Go to previous messageGo to next message
mikemac is currently offline  mikemac
Messages: 250
Registered: March 2017
Senior Member
plasmo wrote on Thu, 05 March 2020 22:19
mikemac wrote on Thu, 05 March 2020 09:39


4- Do you have any unused pins left on the 7128S? The CF/IDE interface doesn't have its IRQ signal attached to anything. I've never written a polling driver in Linux before. I don't know what issues will come up as a result.

Mike,
Returning to your original question about whether there are spare pins on CPLD for CF interrupt: yes, there are two spare pins; it is not difficult to wire CF interrupt to one of the spare pins; add a pull resistor; and modify the CPLD to add a level 2 autovector.
Bill

I'll probably hold off on adding anything for the CF IRQ until I get to that point and it proves necessary. Adding a wire to INTX is probably easier than soldering directly to the CPLD's pin. At least for me.



Mike
Re: CB030, A 68030 SBC for hobbyists [message #7189 is a reply to message #7184] Fri, 06 March 2020 15:34 Go to previous messageGo to next message
mikemac is currently offline  mikemac
Messages: 250
Registered: March 2017
Senior Member
64MB DRAM?

I just got my 64MB EDO 60ns 72 pin SIMM. It doesn't seem to work. Don't know yet if it's the SIMM or my board. Someitmes I get this:
CB030Bug                                                                        
2/26/20 v0.6, type "he" for help                                                
>                                                                               
Address Error!                                                                  
Faulted address is: FE00056E                                                    
Program counter is: 162D0081

Sometimes I get the '?>' prompt and then it hangs. The Reset button isn't working 100% either. ???

Am I supposed to install the T7 jumper for the DRAM size? I don't see where the Mem64_n16 signal is being used in the CPLD code.

Any ideas on what I'm doing wrong? Or how to verify the 64MB SIMM? [I cheaped out and only bought the one stick. Crying or Very Sad ]



Mike
Re: CB030, A 68030 SBC for hobbyists [message #7190 is a reply to message #7189] Fri, 06 March 2020 15:49 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Mike,
That's bad. The RAM is definitely not working. You do not need to jumper the mem64_n16, CPLD should be able to,accommodate different size DRAM. Tell me where you bought it? Are you sure it is 5V DRAM? Many 64 meg operate with 3.3V.
Bill
Re: CB030, A 68030 SBC for hobbyists [message #7191 is a reply to message #7190] Fri, 06 March 2020 15:56 Go to previous messageGo to next message
mikemac is currently offline  mikemac
Messages: 250
Registered: March 2017
Senior Member
plasmo wrote on Fri, 06 March 2020 16:49
Mike,
That's bad. The RAM is definitely not working. You do not need to jumper the mem64_n16, CPLD should be able to,accommodate different size DRAM. Tell me where you bought it? Are you sure it is 5V DRAM? Many 64 meg operate with 3.3V.
Bill
I bought it off Ebay from 1-800-4Memory. The invoice claims it's 5V. Mad



Mike
Re: CB030, A 68030 SBC for hobbyists [message #7192 is a reply to message #7191] Fri, 06 March 2020 16:02 Go to previous messageGo to next message
mikemac is currently offline  mikemac
Messages: 250
Registered: March 2017
Senior Member
mikemac wrote on Fri, 06 March 2020 16:56
plasmo wrote on Fri, 06 March 2020 16:49
Mike,
That's bad. The RAM is definitely not working. You do not need to jumper the mem64_n16, CPLD should be able to,accommodate different size DRAM. Tell me where you bought it? Are you sure it is 5V DRAM? Many 64 meg operate with 3.3V.
Bill
I bought it off Ebay from 1-800-4Memory. The invoice claims it's 5V. Mad
The chips on the SIMM are MT4LC16M4H9, which the datasheet online claims is a 3.3V chip. So I think they sent me 3.3V SIMMs instead of the 5V ones I ordered. Mad Mad Mad



Mike
Re: CB030, A 68030 SBC for hobbyists [message #7193 is a reply to message #7192] Fri, 06 March 2020 16:31 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Mike,
Can you see voltage regulators and 5V-to-3V buffers? Sometimes they use 3.3V memory parts but translate 5V to 3V.
Bill
Re: CB030, A 68030 SBC for hobbyists [message #7194 is a reply to message #7193] Fri, 06 March 2020 16:34 Go to previous messageGo to next message
mikemac is currently offline  mikemac
Messages: 250
Registered: March 2017
Senior Member
plasmo wrote on Fri, 06 March 2020 17:31
Mike,
Can you see voltage regulators and 5V-to-3V buffers? Sometimes they use 3.3V memory parts but translate 5V to 3V.
Bill
There are 8 DRAM chips and one 3.3V regulator on the board. That's it.



Mike
Re: CB030, A 68030 SBC for hobbyists [message #7195 is a reply to message #7194] Fri, 06 March 2020 17:09 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Ouch, that's no good. Looked up MT4LC16M4H9 and it is 3.3V part, not 5V tolerant. That was a 3.3V 64meg SIMM and probably not doing it any good plugging into a 5V system.
Bill
Re: CB030, A 68030 SBC for hobbyists [message #7196 is a reply to message #7195] Fri, 06 March 2020 19:18 Go to previous messageGo to next message
mikemac is currently offline  mikemac
Messages: 250
Registered: March 2017
Senior Member
plasmo wrote on Fri, 06 March 2020 18:09
Ouch, that's no good. Looked up MT4LC16M4H9 and it is 3.3V part, not 5V tolerant. That was a 3.3V 64meg SIMM and probably not doing it any good plugging into a 5V system.
Bill
I'll give them a call tomorrow or Monday and see if they'll straighten it out. It's not the nine dollars as much as the missed opportunity of having it this weekend for pimping out my CB030 board. I can still make progress with the 16MB. Just disappointing.



Mike
Re: CB030, A 68030 SBC for hobbyists [message #7197 is a reply to message #7196] Fri, 06 March 2020 20:06 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
This is a snippet of program to chip erase AT49F040 and copy program located in RAM 0x0-0x7FFFF to flash. It takes about 10 seconds to re-flash AT49F040.

Erase and reprogram the flash is the easy part, the trick is having the necessary functionalities to load & test an updated version of itself and re-flash the updated version of itself. I'll have the EPROM programmer as a backup just in case the program no longer able to update itself.
Bill

; chip erase
         move.b #$aa,flash+$5555    ;chip erase command
         move.b #$55,flash+$2AAA
         move.b #$80,flash+$5555
         move.b #$aa,flash+$5555   
         move.b #$55,flash+$2AAA
         move.b #$10,flash+$5555
pollbit7:         
         btst.b #7,flash                  ;data polling bit 7
         bne pollbit7
         
; now do byte programming
; copy RAM from 0x0 to 0x7FFFF to flash at 0xFE000000 to 0xFE07FFFF
         lea 0,a0                   ;point to RAM starting from 0x0
         lea $fe000000,a1           ;point to beginning of flash
byteprog:         
         move.b #$aa,flash+$5555    ;byte programming command
         move.b #$55,flash+$2AAA
         move.b #$A0,flash+$5555
         move.b (a0),(a1)
;data polling of bit 7
         move.b (a0)+,d0
         and.b #$80,d0              ;poll bit 7
pollb7:         
         move.b (a1),d1
         and.b #$80,d1
         cmp.b d0,d1
         bne pollb7
         add.l #1,a1                ;program next flash byte
         cmp.l #$fe080000,a1        ;top of flash?
         bne byteprog
         
         rts                        ;return to calling program
Re: CB030, A 68030 SBC for hobbyists [message #7230 is a reply to message #7196] Fri, 13 March 2020 14:43 Go to previous messageGo to next message
mikemac is currently offline  mikemac
Messages: 250
Registered: March 2017
Senior Member
mikemac wrote on Fri, 06 March 2020 20:18
plasmo wrote on Fri, 06 March 2020 18:09
Ouch, that's no good. Looked up MT4LC16M4H9 and it is 3.3V part, not 5V tolerant. That was a 3.3V 64meg SIMM and probably not doing it any good plugging into a 5V system.
Bill
I'll give them a call tomorrow or Monday and see if they'll straighten it out. It's not the nine dollars as much as the missed opportunity of having it this weekend for pimping out my CB030 board. I can still make progress with the 16MB. Just disappointing.
I called 18004memory up on Monday and they sent a replacement on Tuesday. They were really nice about it. I got it a few minutes ago and the board still boots! Yippee!!!

T030 ROM BIOS v2.11 (c) 2018 Tobias Rathje                                      
CB030 version ported by Mike McDonald 2020                                      
------------------------------------------                                      
                                                                                
Build: Mar 13 2020 12:46:11                                                     
                                                                                
#> ?                                                                            
?  - Help                                                                       
a  - Load and execute EhBasic                                                   
b  - Toggle heartbeat LED: b <val>                                              
c  - Modify cache register: c <val>                                             
d  - Dump address: d <addr>                                                     
e  - Force exception: e <num>                                                   
h  - Perform hardisk command - h? for help                                      
i  - Set interrupt level: i <level>                                             
g  - Run: g <addr>                                                              
l  - Load linux: l <cmdline> <ramdisk start addr> <ramdisk size>                
m  - Mandelbrot test: m <count>                                                 
q  - Perform RAM check: q <mode> <address> <size> <count>                       
r  - Dump registers                                                             
v  - Load and execute Test BIOS from SD card                                    
u  - Run in user mode: u <addr>                                                 
w  - Write single byte: w <addr> <data>                                         
x  - Transfer file with XMODEM: x <addr>                                        
z  - Soft reset                                                                 
<#> - Run script "#"                                                            
                                                                                
#>



Mike
Re: CB030, A 68030 SBC for hobbyists [message #7231 is a reply to message #7230] Fri, 13 March 2020 18:05 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Cool, I'm glad it works out.
Bill
Re: CB030, A 68030 SBC for hobbyists [message #7240 is a reply to message #7231] Sat, 14 March 2020 15:39 Go to previous messageGo to next message
mikemac is currently offline  mikemac
Messages: 250
Registered: March 2017
Senior Member
If one use a "magic" CF card:


T030 ROM BIOS v2.11 (c) 2018 Tobias Rathje                                      
CB030 version ported by Mike McDonald 2020                                      
------------------------------------------                                      
                                                                                
Build: Mar 14 2020 15:29:15                                                     
                                                                                
#> hl                                                                           
                                                                                
Volume label: Linux                                                             
                                                                                
----A 2020/03/14 15:25       118  1.CMD                                         
----A 2020/03/14 15:26   2814888  LINUX.BIN                                     
D-H-- 2020/03/14 15:25         0  FSEVEN~1                                      
   2 File(s),   2815006 bytes total                                             
   1 Dir(s),       4874KiB free                                                 
                                                                                
#> 1                                                                            
 [ Load Linux image into RAM ]                                                  
                                                                                
0%_________________________________________100%                                 
#################################################                               
                                                                                
2814888 bytes read                                                              
 [ Starting Linux ]                                                             
                                                                                
                                                                                
Bootinfo address: 0x042b1000                                                    
                                                                                
Machine type: 13                                                                
Memory start: 0x04000000                                                        
Memory size: 64 MB                                                              
                                                                                
Loading Linux at 0x04001000                                                     
Exception #11 SR: 2704 PC: 04001004                                             
                                                                                
#> 

I know the load address and the memory start address are wrong. [They're for the T030 board.] But making some progress. A bit flakey at times but nothing fatal yet.



Mike
Re: CB030, A 68030 SBC for hobbyists [message #7247 is a reply to message #7240] Sun, 15 March 2020 07:39 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Mike,
That's very cool. I hope you'll post the CF image and the firmware so I can try it as well.
Bill
Re: CB030, A 68030 SBC for hobbyists [message #7248 is a reply to message #7247] Sun, 15 March 2020 10:07 Go to previous messageGo to next message
mikemac is currently offline  mikemac
Messages: 250
Registered: March 2017
Senior Member
plasmo wrote on Sun, 15 March 2020 07:39
Mike,
That's very cool. I hope you'll post the CF image and the firmware so I can try it as well.
Bill
Once I get Linux running and Tobias confirms I haven't broken the T030, I intend on making the code available on a RBC builder's page or at the minimum, my website. Probably both.



Mike
Re: CB030, A 68030 SBC for hobbyists [message #7249 is a reply to message #7158] Sun, 15 March 2020 10:12 Go to previous messageGo to next message
mikemac is currently offline  mikemac
Messages: 250
Registered: March 2017
Senior Member
mikemac wrote on Tue, 03 March 2020 08:28


I have a Transcend 4G 133X CF card coming today. I'm looking at using one of the larger CF cards as the disk for Linux. It's obviously gross overkill for CPM. Speaking of which, I did 'dd' the B: drive to my Linux machine and back to an 8MB SanDisk card and it seems to work. CPM recognizes it and 'dir' works.
Just a FYI followup, neither the new Transcend 4G 133X CF card nor my older Lexar 64MB CF card seem to work in 8bit mode. Sad



Mike
Re: CB030, A 68030 SBC for hobbyists [message #7250 is a reply to message #7249] Sun, 15 March 2020 11:37 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
The updated CPLD in CB030 homepage should fix the CF disk access problem. Download the .zip file, the .pof is included. Remove the CF disk, oscillator, SIMM memory and EPROM. Look at the 2x5 header carefully you should see silkscreen with '2' on one end and '10' on the other end. The color strip of the programming ribbon cable should be on the '2' side. Power up and program with the .pof file. Replace the components you've removed (watch for proper orientations), your board should work with the new CF now.
Bill
Re: CB030, A 68030 SBC for hobbyists [message #7251 is a reply to message #7250] Sun, 15 March 2020 16:13 Go to previous messageGo to next message
mikemac is currently offline  mikemac
Messages: 250
Registered: March 2017
Senior Member
Getting closer:

T030 ROM BIOS v2.11 (c) 2018 Tobias Rathje                                      
CB030 version ported by Mike McDonald 2020                                      
------------------------------------------                                      
                                                                                
Build: Mar 15 2020 10:53:20                                                     
                                                                                
#> 1                                                                            
 [ Load Linux image into RAM ]                                                  
                                                                                
0%_________________________________________100%                                 
#################################################                               
                                                                                
2814856 bytes read                                                              
 [ Starting Linux ]                                                             
                                                                                
                                                                                
Bootinfo address: 0x002b1000                                                    
                                                                                
Machine type: 14                                                                
Memory start: 0x00000000                                                        
Memory size: 16 MB                                                              
                                                                                
Loading Linux at 0x00001000                                                     
                                                                                
ABC3GHIJK                                                                       
Linux version 4.9.156-CB030 (mikemac@Altair.mikemac.com) (gcc version 6.1.0 (GCC) ) #4 Sun Mar 15 16:01:06 MST 2020                                             
bootconsole [cb030serial0] enabled                                              
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4060      
Kernel command line: root=/dev/hda2 rw console=ttyS0,38400n8 earlyprintk=ttyS0,38400                                                                            
PID hash table entries: 64 (order: -4, 256 bytes)                               
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)                    
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)                     
Sorting __ex_table...                                                           
Memory: 13420K/16384K available (1863K kernel code, 270K rwdata, 544K rodata, 64K init, 125K bss, 2964K reserved, 0K cma-reserved)                              
Virtual kernel memory layout:                                                   
    vector  : 0x0028175c - 0x00281b5c   (   1 KiB)                              
    kmap    : 0xd0000000 - 0xf0000000   ( 512 MiB)                              
    vmalloc : 0x01800000 - 0xd0000000   (3304 MiB)                              
    lowmem  : 0x00000000 - 0x01000000   (  16 MiB)                              
      .init : 0x002a1000 - 0x002b1000   (  64 KiB)                              
      .text : 0x00001000 - 0x001d2d48   (1864 KiB)                              
      .data : 0x001d5190 - 0x002a0bdc   ( 815 KiB)                              
      .bss  : 0x00281680 - 0x002a0bdc   ( 126 KiB)                              
NR_IRQS:200                                                                     
unexpected interrupt from 256                                                   
unexpected interrupt from 256                                                   
unexpected interrupt from 256                                                   
...


Now I have to track down who is generating IRQ 256 and make them stop! Smile

Unfortunately my 64MB SIMM seems flaky. I have a lot of issues loading the 2.8MB Linux kernel when it's in the board. I haven't had any issue with the 16MB SIMM Bill sent with the board. So for now I'm limited to 16MB. Should be enough to boot and run BusyBox. Fingers crossed!



Mike
Re: CB030, A 68030 SBC for hobbyists [message #7252 is a reply to message #7251] Sun, 15 March 2020 19:35 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Mike,
On the CB030 homepage are memory diagnostic for 16meg and 64meg DRAM. The 16meg DRAM test runs fairly fast, about 45 seconds per pass. The 64 meg test takes 4 times longer. You should see console messages like below.
Bill

/forum/index.php?t=getfile&id=1690&private=0
Re: CB030, A 68030 SBC for hobbyists [message #7253 is a reply to message #7252] Sun, 15 March 2020 21:31 Go to previous messageGo to next message
mikemac is currently offline  mikemac
Messages: 250
Registered: March 2017
Senior Member
plasmo wrote on Sun, 15 March 2020 19:35
Mike,
On the CB030 homepage are memory diagnostic for 16meg and 64meg DRAM. The 16meg DRAM test runs fairly fast, about 45 seconds per pass. The 64 meg test takes 4 times longer. You should see console messages like below.
Bill


I'm going to try testing the 64MB SIMM once I've updated the CPLD to your latest version. But that may be after I figure out who is triggering the IRQ 256. I think it's the 68681 timer left on from the boot loader. The 68681 UART is run mostly in PIO mode so it's probably not it. And I think those are the only two interrupts in the system. So hopefully it's one or the other.



Mike
Re: CB030, A 68030 SBC for hobbyists [message #7258 is a reply to message #7253] Mon, 16 March 2020 06:59 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Mike,
The 68681 timer interrupt is turned on in iDUART routine which is called very early on by the monitor (it is the first subroutine called). Attached is the iDUART routine. You can see the timer is set to interrupt at 10mS which is the basic clock tick driving the wall clock and event clocks. The rotating 7-segment display is driven by the timer interrupt.
Bill

*
* initialize the DUART 68692, only lower byte is connected to data bus d0-d7
* interrupt is connected to PB8 of 68302, nIACK is tied to VCC, need manual service
* of interrupt
iDUART:
	move.b #$13,MRA		* write to MR1A as follow:
			* no RxRTS, RxRDY int, Char error, no parity, 8 bits
	move.b #$07,MRA		* now write to MR2A as follow:
			* normal, no TxRTS, no CTS, 1 stop
	move.b #$0,IMRD		* mask off interrupt
	move.b #$81,IVRD	* vector number 0x81 is where DUART ISR is located
	move.b #0,OPCR		* make output register general purpose
	move.b #$ff,SETOPR	* clear display
	move.l #$20000,d0	* diagnostic, let it show for a while
iduartspin1:
	sub.l #1,d0		* diagnostic
	bne iduartspin1		* diagnostic
	move.b #$de,CLROPR	* drive the value '9' on a 7-seg display
	move.b #$70,ACR		* clear ACR[7] bit, timer mode, 16x prescaler
	move.b #$80,CTLR	* to get 10ms interrupt, timer preload value is 0x480
	move.b #$4,CTUR
	move.b #$CC,CSRA	* 38.4K baud
	move.b STOPCTR,d0	* read clear the interrupt bit associated with timer
	move.b #$A,CRA		* disable Chan A transmit and receive
	bsr iduartspin8		* delay loop
	move.b #$ff,SETOPR	* clear display
	move.b #$e,CLROPR	* write '7'
	bsr iduartspin8		* delay loop
	move.b #$ff,SETOPR	* clear display
	move.b #$cc,CLROPR	* write '4'
	bsr iduartspin8		* delay loop
	rts
Re: CB030, A 68030 SBC for hobbyists [message #7259 is a reply to message #7258] Mon, 16 March 2020 08:57 Go to previous messageGo to next message
mikemac is currently offline  mikemac
Messages: 250
Registered: March 2017
Senior Member
plasmo wrote on Mon, 16 March 2020 06:59
Mike,
The 68681 timer interrupt is turned on in iDUART routine which is called very early on by the monitor (it is the first subroutine called). Attached is the iDUART routine. You can see the timer is set to interrupt at 10mS which is the basic clock tick driving the wall clock and event clocks. The rotating 7-segment display is driven by the timer interrupt.
Bill

Remember, I'm running the T030 boot loader so it's a completely different code base. But it does essentially the same thing.

I think I'm just not registering the IRQ handler at the correct number in Linux. Hopefully I find out later today.



Mike
Re: CB030, A 68030 SBC for hobbyists [message #7265 is a reply to message #7253] Mon, 16 March 2020 21:29 Go to previous messageGo to previous message
mikemac is currently offline  mikemac
Messages: 250
Registered: March 2017
Senior Member
mikemac wrote on Sun, 15 March 2020 21:31
plasmo wrote on Sun, 15 March 2020 19:35
Mike,
On the CB030 homepage are memory diagnostic for 16meg and 64meg DRAM. The 16meg DRAM test runs fairly fast, about 45 seconds per pass. The 64 meg test takes 4 times longer. You should see console messages like below.
Bill

I'm going to try testing the 64MB SIMM once I've updated the CPLD to your latest version. But that may be after I figure out who is triggering the IRQ 256. I think it's the 68681 timer left on from the boot loader. The 68681 UART is run mostly in PIO mode so it's probably not it. And I think those are the only two interrupts in the system. So hopefully it's one or the other.

The dram64m.txt file is in Motorola S-REC format. When I convert it to binary, I get:

Altair=>od -t x1 dram64m.bin |p                                 03/16 9:18:24pm
0000000    46  fc  20  00  43  fa  02  b4  10  3c  00  0e  4e  4f  26  3c
0000020    00  00  1e  4f  74  01  4e  7b  20  02  42  86  45  f9  00  00
0000040    32  f8  24  3c  03  ff  f0  00  28  03  24  c4  d8  bc  00  00
0000060    26  f5  b5  c2  66  f4  45  f9  00  00  32  f8  24  3c  03  ff
0000100    f0  00  2a  03  28  1a  ba  84  67  00  00  54  52  46  43  fa
0000120    02  7d  10  3c  00  0e  4e  4f  20  05  61  00  01  88  43  fa
0000140    01  bc  10  3c  00  0e  4e  4f  43  fa  02  6d  10  3c  00  0e
0000160    4e  4f  20  04  61  00  01  6e  43  fa  01  a2  10  3c  00  0e
0000200    4e  4f  43  fa  02  67  10  3c  00  0e  4e  4f  20  0a  59  80
0000220    61  00  01  52  43  fa  01  86  10  3c  00  0e  4e  4f  da  bc


That doesn't look like a proper M68K ROM. I'd expect a SP,PC combo to start with.

The dram64m.txt file starts with:

S0100000433A4452414D36344D2E48455884
S120300046FC200043FA02B4103C000E4E4F263C00001E4F74014E7B200242864527
S120301DF9000032F8243C03FFF000280324C4D8BC000026F5B5C266F445F900004C
S120303A32F8243C03FFF0002A03281ABA8467000054524643FA027D103C000E4E95
S12030574F20056100018843FA01BC103C000E4E4F43FA026D103C000E4E4F200442
S12030746100016E43FA01A2103C000E4E4F43FA0267103C000E4E4F200A59806193


What might I be doing wrong? It doesn't seem top work for me if I go ahead on load and run it.



Mike
Previous Topic: ZRC, A Z80 SBC for ROMWBW
Next Topic: Neat '040 boot ROM setup


Current Time: Tue Jul 15 11:48:24 PDT 2025

Total time taken to generate the page: 0.01146 seconds