Support for the NEC V25 microcontroller#2436
Conversation
These are the changed files to get a minimal port (ROMFS, 512KB RAM, 512KB ROM, 1 serial port, 1 timer, IRQ controller) for the NEC V25 microcontroller compiling.
These are the new files to get a minimal port (ROMFS, 512KB RAM, 512KB ROM, 1 serial port, 1 timer, IRQ controller) for the NEC V25 microcontroller compiling and running.
The clock application hangs in an endless loop if no propper clock hardware is present. This hangs the init process. This change outputs the text "Sorry, clock not supported on this system." and exits. The init process can continue.
…cation This commit adds an empty host-necv25.c to get the basic application compiling and running on the NEC V25 port.
|
Hello @swausd, Wow!! What a nice job you've done on this, very impressive. Would you like me to fix the elkscmd/Makefile merge issue for you? I modified that file in my last burst of PRs late last night. The single only issue I see is the duplicate definition of USER_FLAGS in config.h. I can fix that after commit. Beautiful job, the inline assembly and use of ASM include files with C ASM is very nicely done. Thank you! |
|
Thanks for including the boot screen, the whole port is very cool! I notice it's taking 1.25 seconds to boot, on ROMFS. I see the timer is ticking at 10ms also, so it seems this CPU is running on par with the speed of 8088s or so? What's the clock rate you're running? Is 512k flash and 512k ROM standard on the V25? This seems quite a capable single-chip system! |
|
Hi @ghaerr, please fix what is necessary - that makes it very easy for me. And sorry I missed the USER_FLAGS change. It sneaked in again while I was struggling with git :-( RAM and ROM is external with extra chips. The CPU has no ROM and only 256 byte of RAM in top memory. This RAM is share with the switchable register banks. I use a clock crystal with 14.74560 MHz. Divided by 2 in the CPU the system clock is 7.3728, which gives best fits for baud rate generation. The CPU was available for 5, 8 or 10 MHz system clock. |
|
Very nicely done @swausd, in particular the use of extension asm in some routines with super formatting and embedded include files. I'll remember that for some of my own work :)
It seems that struggling with git is a required barrier to entry, but this was pretty painless on my end. I'll fix the small USER_FLAGS issue with a subsequent commit, thank you! |
|
Hi @ghaerr, Thank you very much for your help and the motivating kind words! Feels good to see something I have done included in this fine project. Again thanks for your time spend for the community! |
|
Make a photo of the whole setup please! :) I still think a PCB is a perfect continuation of this project. It will allow other people to build it and wait ... they have a cool compatible OS now! |
|
There are several NEC 25 micro controllers uPD70320. Which one do you use exactly? The 84-pin plastic LCC? |
|
Hi @toncho11, on special request ;-) this is my setup. Please notice, that I changed the crystal from the 14.7456 MHz (CPU Clock = 7.3728 MHz) stated above to now 22.1184 MHz (CPU clock = 11.0592 MHz). The max clock for the used uPD70320-8 I am using is 16 MHz (CPU clock = 8 MHz). So the CPU is overclocked. |
Haha - so the 1.21 second boot was getting long, huh? What's the boot time reading now? |
|
It's a whooping 0.94 secs now and I think it could be sped up with setting the serial port to 230400 baud ;-) |
|
I had to go back to 14.7456 MHz (CPU Clock = 7.3728 MHz) again. Overclocked system did not run stable. OK, so I have a chance to win at ASCII Invaders again :-) |
|
curious if this might suggest the NEC V20-based HP 95LX might be a viable target? 🤔 |
|
Hi @ishotjr, I don't think the V25 port is of any special use for your hardware. My V25 system is in no way PC compatible. There is no video card functionality and no BIOS, for example. |
|
Looks very nice! Show a video of ascii invaders if it is not too much to ask! |
|
The Gravity 2.0″ IPS Color Serial Display (DFRobot DFR0997) accepts commands as ASCII text sent over UART. Command-based interface The display is graphical, but its firmware provides a text-based command protocol. Commands are sent as ASCII strings (terminated with \r or \n depending on mode). Example command categories: Font & text Colors
Screen control
Graphics / images (optional)
Here is an example program: |
|
Here is a potential drop-in replacement for standard ELKS console (targets Open Watcom) for NEC 25: |
A couple quick comments about that:
|
|
Thank you @ghaerr |
|
Actually uPD70320-8 has GPIO ports. It is a microcontroller after all. I am starting to love it :) I am trying to understand how to control the GPIO ports from ELKS. |
|
Yes, the NEC 25 microcontroller GPIO ports are used for serial port, but can be used for a CF card reader, etc. The alternative for the GPIO ports is to use Arduino Nano or ATtiny85 through the serial port where on the Arduino Nano or ATtiny85 a program is running that accepts text commands. This way you can send a command "PIN1 1" for example. So you control the GPIO ports of the Arduino Nano or ATtiny85. |
I am not a (youtube-) video guy, so no video from me, sorry.
I really like to tinker with old processors, espacialy when I can salvage them from scrap. They can be soldert with an iron without the use of a microscope. But if it comes to solve a real life problem, then it's time to use ESP32s, Raspberry Pis, Picos or Arduinos.
What do you want to achieve? With it's 2" size its only a quarter of my perfboard. An 8088 compatible CPU as the V25 is not a good mobile device, so why not use a display with proper size?
If you have any specific questions, I am happy to help. Next I am going to look into the ELKS SPI and SD drivers to connect a SD-Card as mass storage device to my little system. It's only 3 GPIO-pins away ;-) |
|
I realize that you probably do not have the time to release the schematics on how it is built. This means that I can not reproduce your hardware setup, so ... I need to lower my excitement :). |
|
Hi @toncho11, didn't realized you want to build this right now. Do you already have the CPU at hand? The schematics is no secret. See this link; https://forum.classic-computing.de/index.php?file-download/162383/ It is functional identical to my build. Except crystal and reset chip. If you have questions, please contact me. For such a straight forward design, there is nearly no deviation possible. Sorry, I have seen that this file is not available for the public. I will ask and come back to you. |
@cocus's 8018X-based SD subdriver is ssd-sd.c, with the bit-banging SPI portion in ASM in spi-8018x.S. (The other ssd_asm.S is 25 year old code from Psion and not used at all). These lower-level "subdriver" files are used by the master SSD block device driver ssd.c, which interfaces only through a few ssddev_read/write/ioctl routines. With any luck, you might be able to use some of the 8018X SPI code. If so, we might want to talk about how to separate that out so it can be further shared. Having or creating a defined API helps in these situations. |
|
Thanks also from my side for V25 target, |


This PR includes all files necessary to get a minimal system with the NEC V25 microcontroller up and running. Next to the V25 (which includes among other periphery 2 serial ports, 2 timers, one interrupt controller) only 512KB RAM and 512KB ROM are needed. The system boots from ROMFS.
Capture of boot screen:
