6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 9:32 am

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Sat May 14, 2022 11:36 pm 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 1043
Location: near Heidelberg, Germany
Hi there,

here's some information on my Ultra-PET Commodore PET clone.

- 65816 running up to 12.5 MHz
- Commodore PET compatible (when running at 1MHz)
- USB, RTC, SD-Card
- Boot from SPI-Flash

- Colour-VGA! (using RGBI output)

- based on a 64 pin CS/A bus design, to allow the use of many existing I/O boards

The Ultra-PET CPU board is here on github https://github.com/fachat/csa_ultracpu
You can find the PETIO board here http://www.6502.org/users/andre/csa/petio/index.html

https://www.youtube.com/watch?v=iMmVOPfir1c

Note, that the actual CPU board is agnostic to the type of machine it simulates. Only with the right CPLD programming and the PETIO board does it make a Commodore PET.
In other words, using a different mapping in the CPLD, other types of 6502 computers could be emulated.

_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/


Last edited by fachat on Sun Oct 27, 2024 3:35 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Sun May 15, 2022 6:40 am 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
so you're using the 25MHz pixel clock to also generate the 12.5MHz clock for the CPU. in that case why not have a software controlled switch in the CPLD to allow it to run at the full 25MHz as well?
the CPU should easily be able to run at that speed if the rest of the system is able to handle it.


Top
 Profile  
Reply with quote  
PostPosted: Sun May 15, 2022 9:33 am 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 1043
Location: near Heidelberg, Germany
The rest of the system is, in my opinion a challenge. Access to video RAM runs through the CPLD with its delay for example. Address mapping takes its time. RAM access time is 25ns, which is above the phi2 time at 25MHz. Maybe there are faster chips. Maybe my CPLD programming skills are not up to par with this.

The design is open source. I invite you to show how this would run at 25MHz, I'm happy to learn!

André

Edit: this is an honest question. I don't see right now how it would work, but if I can learn I can make it faster the next time!

_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/


Top
 Profile  
Reply with quote  
PostPosted: Sun May 15, 2022 12:30 pm 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
oh i thought the speed was just picked because it's still within spec of the CPU, not because you already considered something faster but couldn't do it due to hardware limitations.
hmm, sorry on the spot i can't help much, the video circuit alone is already way more complex than everything i've made so far (though i only ever had 128 Macrocells to play with)

the fastest 5V SRAM i could find is this 10ns 512kB one: https://www.mouser.com/ProductDetail/87 ... 28AL-10KLI
it's pretty cheap right now, though the price is slightly higher than when i bought a bunch of them like half a year ago.

If i'm reading the documentation correctly, accessing VRAM is done via a small memory window through the CPLD.
if your Video Circuit always fetches data at 25MHz (and in the opposite half-cycle to the CPU), then bumping the CPU up to 25MHz shouldn't cause any issues when accessing VRAM at the same time.
technically that would also mean you could throw away the whole "trhough the CPLD" thing and have the CPLD and CPU share the same data bus to the VRAM chip via a simple buffer between the CPU bus and CPLD bus.
Attachment:
gimp-2.10_iCbQq8j0ec.png
gimp-2.10_iCbQq8j0ec.png [ 100.75 KiB | Viewed 4082 times ]

but that wouldn't work that well since the CPLD is also responsible for loading the boot code into the CPU's RAM. (unless you use 74x245's for both the data bus and the address bus so the CPLD can take over the CPU bus for a short amount of time through the buffers)

on a side note i'm a bit confused by your comment "parallel ROMs are getting harder to come by", Parallel FLASH chips are the modern versions of EEPROMs, they are still being made and are pretty cheap. the SST39SF0x0 series of FLASH chips are a great example. though the speed is still lacking, with an access time of 70ns my 20MHz 65C02 needs 1 wait state to properly access the chip.
but i can still understand the reasoning for using an SPI flash, it's more compact on the PCB and allows the boot code to run in RAM with no wait states or extra address decoding.

overall it's a very nice looking project you got and i wish you luck with any overhauls of the system that you might do (if any)


Top
 Profile  
Reply with quote  
PostPosted: Sun May 15, 2022 12:58 pm 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 1043
Location: near Heidelberg, Germany
Thanks Proxy.

The SRAM (both the "fast" and the "video" RAM) are driven at 12.5 MHz. No opposite phase bus sharing is used - but could potentially be used with faster chips on the video RAM.

Each are 512k in size, with the fast RAM mapped to the lowest 512k, and video RAM just above it. So, not a window, but the full area (in the 65816 address space). In the lowest bank I can map in indeed a video memory window if you mean this, it is required for PET compatibility.

As the CPLD can only write to VRAM (thinking about it now, I'm not actually sure why. Maybe because /BE is missing on the CPLD to decouple the CPU from the bus, or the number of additional bus drivers/registers required to actually use the CPU address lines also as output, or I just didn't try, ... I don't remember), on reset the two chips are swapped in address space, SPI boot is written in VRAM, where the CPU starts, then swaps the memory mapping again via configuration register.

Your diagram is about right, only that both the VGA and the buffer resides inside the CPLD. In the Micro-PET with the monochrome output the pixel shift register is in the CPLD as well, but in the Ultra-PET this is pulled out due to space reasons.

For colour video display, I need 3 video RAM accesses per 8 pixels: 1st character, 2nd character generator, 3rd colour byte. That leaves a single access left for the CPU during that 8 pixel time (25 MHz pixel clock). So, for VRAM, the CPU is waitstated down to about 3 MHz. Fast RAM is just that - unrestricted 12.5 MHz. That reminds me I still need to check the benchmark for the Ultra-PET.

I thought about splitting up diverse parts of the CPLD to be able to use smaller (and maybe less costly) CPLDs and make the whole thing more modular, but in the end I always ended up with so many connections between the different parts, it was easier to put it all into a single CPLD.

The Micro-PET originally started (in 1.0) with a parallel ROM. But as you noted, these are slow compared to SRAM. So, I experimented with SPI boot, which gave me the speed of SRAM, and the low board area needed for the cost of a small SPI boot code in the CPLD.

Somehow I was probably looking for the wrong types of chips maybe (EEPROM vs FLASH), so it's fine that they are still available, but I would not use them anymore in such a setup.

I was actually glad that the design worked at 12.5 MHz. I didn't even consider it being faster, due to the mentioned considerations about SRAM speed, and signal delays in the CPLD etc.

_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/


Top
 Profile  
Reply with quote  
PostPosted: Sun May 15, 2022 7:00 pm 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 1043
Location: near Heidelberg, Germany
Btw, here is the screenshot from the benchmark. You can see that running the code in the video memory gets slowed down due to video fetch. Although maybe not by the expected amount - as CPU cycles where VDA/VPA indicate they don't use memory are run in parallel to video fetches of course.

Also note that the system clock is not at all hampered - it stays at 1 MHz. This is a difference from the Micro-PET where the I/O chips are also clocked at the higher speeds. In the Ultra-PET the bus is not "rated" for that, so it stays slow.

Edit: and of course I forgot to change the copyright to 2022 ;-)


Attachments:
20220515_205342.jpg
20220515_205342.jpg [ 1.35 MiB | Viewed 4050 times ]

_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/
Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 12, 2023 9:43 am 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 1043
Location: near Heidelberg, Germany
The next board rev is going to production, now with an FPGA instead of a CPLD (actually the second FPGA rev, but the first did not autoconfigure the FPGA and other woes.) Also, the color hardware is pulled into the FPGA as it has way more space.


Attachments:
files_mastodon_online_media_attachments_files_110_871_453_540_358_827_original_f4bb895c5ef1e386_png.png
files_mastodon_online_media_attachments_files_110_871_453_540_358_827_original_f4bb895c5ef1e386_png.png [ 173.44 KiB | Viewed 3870 times ]

_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/
Top
 Profile  
Reply with quote  
PostPosted: Sun Jun 16, 2024 7:29 pm 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 1043
Location: near Heidelberg, Germany
Just an update on this series of boards, the Micro-PET, Ultra-CPU, and Ulti-PET:
Attachment:
20240525_153100.jpg
20240525_153100.jpg [ 4.04 MiB | Viewed 1133 times ]


These are essentially Commodore PET clones, but with many more features. This is a family of boards with a set of core features, and different additional features depending on the board variant.

The Ultra-CPU core is based on my CS/A bus system, and as an FPGA is used that contains the memory mapping, could be used in different types of system, not just the PET.

The Micro-PET is the core, plus all the standard PET I/O, mainly IEEE488, keyboard, and tape (but without 9V), on a single 100x190mm board.

The Ulti-PET finally, is a fully integrated PET clone, with many many features. Most notably, I used the 6502.org original SPI-10 specs and included a 5V (based on the VIA SR), and a 3.3V (based on the FPGA) variant. Also, an UEXT connector is on board, including I2C, 3.3V-TTL serial, and SPI (based on the FPGA SPI interface).

Specs are:

Ultra-CPU:
* CS/A bus-based 65816 CPU board
* Up to 17.5 MHz 65816 CPU, with 1MB RAM (512k fast, 512k media RAM)
* 768x576 VGA with 16 colours out of 64, various modes incl. Colour-PET and C64-alike, incl. sprites
* USB host for keyboard and mouse
* DAC (DMA) audio output
* Port for SD-Card adapter (2 variants)
* Port for Network, with either Ethernet or Wifi options

Micro-PET removes the CS/A bus, but adds:
* Standard PET I/O, plus ability to work as IEEE488 device

Ulti-PET integrates, on top of the Micro-PET, the following features from other CS/A bus boards
* (Fast) Serial IEC, incl. ability to work as IEC device, based on the VIA SR
* RS232, plus 2nd TTL serial (shared with UEXT)
* Dual SID with mixer (that includes the DAC audio and the beeper); Speaker amp included.
* Keyboard shift lock / reset (needs Shift lock key on separate keyboard matrix position)
and adds these features on top:
* 2 Joystick ports, switchable between single- and dual mode ("stupid pet tricks" compatible)
* SPI-10 5V, SPI-10 3.3V, and UEXT extension ports (partially shared, see schematics), incl. I2C
* Fully functional Tape incl. 9V for Tape drive power supply
* Expansion ports for the CS/A bus - single wide port, single shortbus port for Ultrabus expansion board
* Accompanying bus extender board to use CS/A, RC2014, Apple-II, or C64 cards

The new revision of the UltiPET going into production:
Attachment:
File comment: picture of the Ultipet board
Ultipet.png
Ultipet.png [ 279.68 KiB | Viewed 1133 times ]


P.S.: Not all of the boards are already on github, but definitely will be soon. Open Source Hardware.

_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 20, 2024 2:04 pm 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 1043
Location: near Heidelberg, Germany
I've put all the boards, config, firmware etc on a linked set of repositories on github, with https://github.com/fachat/upet_family being the root directory.

_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 27, 2024 11:07 am 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 1043
Location: near Heidelberg, Germany
Here's the newest video on the Micro-PET family of boards, that include

  • Ulti-PET: full fledged PET clone with tons of extra I/O
  • Micro-PET: minimal PET clone with better graphics and sound compared to the PET
  • Ultra-CPU: CPU board for my bus that can be extended to a PET clone

https://youtu.be/lE_l2G_fu_0

Hope you like it
André

P.S.: maybe a moderator can change the thread title to "The Micro-PET family project" as this is what I am using as umbrella across those boards? Thanks

_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 31, 2024 8:16 pm 
Offline

Joined: Sun May 13, 2018 5:49 pm
Posts: 255
fachat wrote:
P.S.: maybe a moderator can change the thread title to "The Micro-PET family project" as this is what I am using as umbrella across those boards? Thanks
If you edit the subject of your first post, you can change the title of the thread.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: