RetroBSD
http://retrobsd.org/

STM32F103 emulating a PDP-8
http://retrobsd.org/viewtopic.php?f=1&t=37794
Page 1 of 2

Author:  Pito [ Thu Oct 06, 2016 5:49 pm ]
Post subject:  STM32F103 emulating a PDP-8

FYI
http://jeelabs.org/2016/10/stm32f103-emulating-a-pdp-8/

Author:  wiz [ Sat Oct 08, 2016 4:26 am ]
Post subject:  Re: STM32F103 emulating a PDP-8

Hi Pito,

Nice post. Small useful tools seem to me to be a big deal.

In some ways the PIC instruction set reminds me of PDP-8. I think the auto-increment addresses were a very useful feature. I wonder how fast a PDP would be with a modern FPGA or one of TSMC's smaller processes.

Right now I am thinking of Serge's comment that TCP networking it built into LiteBSD. We just need hardware to use it.

I like your remark that making RetroBSD run on MZ might be pretty nice. I still think we need to make it easier to add stuff particularly new experimental drivers for our latest gizmos.

Wiz

Author:  majenko [ Sat Oct 08, 2016 9:47 am ]
Post subject:  Re: STM32F103 emulating a PDP-8

Every topic, without fail. Wiz's first post ends up talking about KLMs ;)

Author:  wiz [ Sat Oct 08, 2016 11:02 am ]
Post subject:  Re: STM32F103 emulating a PDP-8

Hi All,

How about a simple way to plot data. Maybe real time? Temp, voltage, stack usage.

I 'should' be easy? IIRC html5 has some sort of 'canvas' widget that might make it easier? I guess I 'should' learn it and doit myself?

Matt, maybe you can do it in your copious spare time :).

Lots of fun.

Wiz

Author:  majenko [ Sat Oct 08, 2016 5:53 pm ]
Post subject:  Re: STM32F103 emulating a PDP-8

I use rrdtool.

Author:  Pito [ Sun Oct 09, 2016 8:50 am ]
Post subject:  Re: STM32F103 emulating a PDP-8

I take my hat off to Wiz when he changes his way of posting.
An mind my hat weights 11 tons, so I would be happy if he did :)

Author:  majenko [ Sun Oct 09, 2016 11:44 am ]
Post subject:  Re: STM32F103 emulating a PDP-8

Will you eat it as well?

Author:  wiz [ Sun Oct 09, 2016 5:54 pm ]
Post subject:  Re: STM32F103 emulating a PDP-8

Hi All,

It is nice to be part of a group of excessively smart people :).

I am still wondering whether LiteBSD will catch on like Retro did?
I still have Retro systems doing real work.

And I am very much pondering the questions of VAX/VMS and DECNET as applied to LiteBSD, etc.

Unfortunately [maybe] I only observed these things from a safe distance so I do not really know the necessary details! Except that they formed the basis for a VERY successful technology company.

Comments most welcome!

Lots of fun :).

Wiz

Author:  majenko [ Sun Oct 09, 2016 6:33 pm ]
Post subject:  Re: STM32F103 emulating a PDP-8

Stay well away from VAX/VMS and DECNET unless you want HP breathing down your neck. They own the copyright and patents and everything for those. You can get OpenVMS for hobbyist use if you pay them for the privilege (I did once years back to experiment with it on an old Alphaserver I had).

It's a pig of a system to use. I used to have to use VAX/VMS at uni. Very powerful, yes, but just doing simple tasks wears out the keyboard worse than using PowerSmell on Windows 10.

Stick to BSD, it's much saner.

Instead you should be pondering things like ccNUMA as regards LiteBSD...

Author:  Pito [ Mon Oct 10, 2016 9:51 am ]
Post subject:  Re: STM32F103 emulating a PDP-8

I think pic32MZ would be great for RetroBSD, as I wrote few times already.
Btw, I still do not understand why is running a C prog on LiteBSD several times slower than on RetroBSD..
Any idea??

Author:  majenko [ Mon Oct 10, 2016 10:05 am ]
Post subject:  Re: STM32F103 emulating a PDP-8

My guess is that LiteBSD is doing more tasks concurrently than RetroBSD is.

Author:  wiz [ Mon Oct 10, 2016 4:29 pm ]
Post subject:  Re: STM32F103 emulating a PDP-8

Hi Matt and Pito,

I think I understand the idea behind VAX/VMS. I am guessing DECNET allows the local CPU to use remote peripherals? Thanks Matt for your thoughts on HP. They certainly did get hosed and they were once such a good company! I have some of the HP Journals. Quite a fun read!

Pito: I haven't tried your speed test on LiteBSD yet, but you make a very good point. Since I am mostly a low level designer I am most curious why that would be. MZ has a much faster clock.

I don't want to disappoint Matt. I still have the LKM question as to whether any BSDs support it. They must I would think. Just gotta do some more research I guess.

warm regards,
Wiz

Author:  majenko [ Mon Oct 10, 2016 7:44 pm ]
Post subject:  Re: STM32F103 emulating a PDP-8

The main problem with LKMs is they use RAM. Portions of the kernel that, up to now, have been solely held in flash, would need migrating to RAM. That eats into the precious RAM that we have.

Maybe on an MZ...DA chip it would be something that is perfectly doable, but doing it on a RAM limited (yes, the MZ is still considered RAM limited in my book) would have a negative impact on the available user space for a limited amount of functionality.

With a microcontroller system adding and removing peripherals just isn't done. Not on a regular basis, anyway. LKMs are only really of any use when you want to be adding and removing things all the time and want to change the configuration of your computer all the time.

Now, FKMs would be good. That's Flashable Kernel Modules. LKMs that you don't load into RAM, but instead flash into Progmem. There's plenty of that to spare on an MZ. Yes, some structures would need to be migrated to RAM as the kernel probes what modules are loaded and builds a list, but much less than if the modules themselves were in RAM as well. Plus it would mean the modules were then permanently installed. Basically a modular kernel ("microkernel") where you flash the core kernel and the modules you want to use without having to recompile the whole lot each time - and maybe have the ability to add and remove kernel modules from flash at runtime from within the system.

Author:  wiz [ Mon Oct 10, 2016 8:29 pm ]
Post subject:  Re: STM32F103 emulating a PDP-8

Hi Matt,

All good points. Thanks.

All that said even in Retro, there is a fair amount of kernel ram that is not used. I am not sure about LiteBSD at this point.

So I did two things.

1. moved kernel ram up from 0 to accomodate my debugger and startup code which needs to use the first few bytes of memory starting at physical 0. Also, I think a RAM buffer could be useful there when rewriting/updating flash memory.

2. I arranged to load my stuff in the upper unused portion of kernel ram above the part used by Retro.

All this works quite well. The only step I need to get off my duff and do is to add to the kernel a device pointer to this RAM. More stuff to do on a rainy day :).

Right now I speed up my SPI driver by loading it into kernel RAM so I can keep up with my RF chip and not miss packets. It gets loaded by the startup script. Works well.

Using flash for anything useful is a great idea. It is slower than RAM but pretty big. At one point I thought of putting forth definitions in it. Serge suggested some library routines.

warm regards,
John

Author:  majenko [ Mon Oct 10, 2016 8:43 pm ]
Post subject:  Re: STM32F103 emulating a PDP-8

Who's John? And where's the fun gone?

On the MZ the flash is zero wait state due to caching. It's as fast as RAM. Or that's the theory anyway. As long as you access through the right KSEG of course...

Author:  wiz [ Mon Oct 10, 2016 8:49 pm ]
Post subject:  Re: STM32F103 emulating a PDP-8

Hi Matt,

You got me :).

Lots of fun :).

Wiz

Author:  wiz [ Wed Oct 12, 2016 8:09 pm ]
Post subject:  Re: STM32F103 emulating a PDP-8

Hi Matt and Pito,

So, can we really edit and compile stuff on a LiteBSD system?

Maybe we will never really escape the 'I need a huge system to compile this' syndrome?

That is what I like most about my Retro system. I can and do write code on it connected to a serial terminal, albeit the serial terminal program is running on a huge [probably not by your standards] linux system.

Just for comparison, the first computer system we built featured a 6502 with 1024 bytes of RAM and with the option of 4096 bytes of RAM. The debugger fit in 256 bytes. Drove a TV set for the video display. Had a nice keyboard. Et cetera....

Now its $10USD for a 'phone'!! Just gotta figure out how to root it and hack it enough to make it useful.

Have we really made progress?

Lots of fun :).

Wiz

Author:  ibara [ Thu Oct 13, 2016 2:15 am ]
Post subject:  Re: STM32F103 emulating a PDP-8

wiz wrote:
Hi Matt and Pito,
So, can we really edit and compile stuff on a LiteBSD system?

The short answer is "yes." The long answer is "it's complicated."
LiteBSD does have an in-base compiler: pcc. It will compile C code.
And the assembler will assemble it in many cases. But the linker needs work. So if your goal is to eventually compile LiteBSD on LiteBSD (I shudder to think how long that would take), improving the linker would be priority one for me.

Author:  wiz [ Thu Oct 13, 2016 9:08 am ]
Post subject:  Re: STM32F103 emulating a PDP-8

Hi Matt,

Thanks for your VERY useful answer :).

Guess I need to learn about linkers.... Never have really looked at them in detail.

Being mostly an assembly language hacker, I have never really gotten along with them. IIRC Serge had some comments about what really needed to be done.

Another route is to abandon PIC in favor of the big fast chip with the big fast DDR and Debian dist. etc. Hmmm....

For me small and simple and easy to modify and configure is where it is at.

So I guess I will still keep playing with PIC right now though I think BBG has some features worth copying.

Have you thought about connecting GSM with PIC? Right now I am looking at that.

warm regards,
Wiz

Author:  majenko [ Thu Oct 13, 2016 10:45 am ]
Post subject:  Re: STM32F103 emulating a PDP-8

I am working on a contract right now that has GSM connected to ATMega (shudder). It's exactly the same connecting it to a PIC. Just a UART connection with AT commands.

All the easier if you can use the Arduino API...

Page 1 of 2 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/