-
More cycles counted?
06/03/2021 at 12:46 • 0 commentsNo, not really. But I have worked more on the documentation and converted it to a plain text document, 78 characters wide in true retro fashion. Will print very nicely :D
-
Cycle counting
05/29/2021 at 14:31 • 0 commentsWhen I rebuild the PZ1 HW, the SW has to wait for later. This was not ideal, so yesterday I built a second PZ1 that has only a Teensy and a 65C02 connected on a bread board. This platform is perfect for testing new 65C02 code, and also to test new HW ideas in a simulated environment.
Today I wrote a lot of code to test and document the instruction timings of the 65C02. Available documents disagree on many of the timings, and/or are very hard to decipher.
Now, if I could only find how to enclose the document...
EDIT: the pdf is now available under project files
EDIT2: updated the pdf -
Back from a pause
04/09/2021 at 12:55 • 0 commentsI've moved and that takes much more time than expected. Today was the first day in a very long time that I had an opportunity to play with PZ1. It took 2-3h to get back to the previous point since I had reinstalled the OS and build environment and the display library just had to have an older version installed. The latest version disrupts the sound for some reason :(
Since the move I have a slightly bigger hacking cave, even though the apartment is smaller. YAY!
I had some time to think about the future of my HW endeavours, and I've decided that until I get a proper CPLD (ATF1504) running, I won't change the current Teensy4.1 / 65C02 / 512KiB SRAM configuration.
An annoyance I have is that I cannot find proper/non-cryptic 65C02-docs with consistent cycle-timings. There are some holes and I really want to know! The good thing about my current HW setup is that it is possible to actually write test-code, single step it and count the cycles on a real 65C02. Code and docs coming up :D
-
Pico adventures
02/13/2021 at 19:37 • 0 commentsI bought a Raspberry Pi Pico, couldn't help myself! The RP2040 is a very nice micro-controller, and the $4 is extremely cheap for what you get!
I've spent some time reading the very good datasheet to get a fuller understanding of what it can do, and I am sure that I will spend more time in the near future to try out PZ1 6502 emulation on the Pico. Such a cheap chip might be a very good fit for a nice portable 6502-computer :D
Of course I spent a lot of time coding the PIO, which is a very simple but good accelerator for doing various I/O stuff. It might be nice to create a proper VGA output from the PZ1, maybe as an add-on card...
-
Even more real HW
01/21/2021 at 10:24 • 0 commentsThis is the latest incarnation of PZ1:
- W65C02 cpu
- 512KiB SRAM memory
- 2x 74HC670 used as bank register
- Teensy 4.1 used as glue logic and I/O
- Small speaker for sound output
So more real HW instead of emulation. The sound is still generated via SID-emulation on the Teensy, serial access is also done via the Teensy.
The glue logic to get memory accesses and bank registers working was nice to do in SW, so much faster and easier than doing in a CPLD. I still haven't got the CPLD programming working, will have to give up on that specific chip/programmer. The itch to get it working is still present, so I might get some ATF1504 and program them to do both glue logic and bank register functions.
Bank registers using the 74HC670 was a bit of a disappointment. They work as intended, but I had not read the data sheets thoroughly enough and the read/write-access times @3.3V are way longer than I'd thought. My memory accesses need double the time with bank registers. BUT: it works great at the speeds I use. Running the CPU @2MHz equivalent taxes the Teensy at just below 50%. No problem doing sound-generation and other I/O-tasks.
Oh how I wish the Teensy had more pins aligned for 8-bit access. Also, it is not the easiest trying to get nanosecond-level timing. An oscilloscope or using the built-in CPU-cycle counter (ARM_DWT_CYCCNT) is essential.
I still need to decide in what direction I want to pursue the HW of this project.
Next up is (re)connecting the GD3x display, and writing some 6502 multitasking demo code.
![]()
-
Banks and blocks, again
01/15/2021 at 14:00 • 0 commentsHW memory and bank registers are connected now, waiting to get them enabled and working in SW.
I did a small detour and updated the picture on memory banks and blocks. I wasn't happy with how it looked, and there were some thread variants missing. Hope this is easier to understand.
![]()
-
2021: PZ1 in more HW
01/05/2021 at 06:18 • 0 commentsThe parts I ordered from Mouser finally came, the holidays were not kind to the delivery date :)
The first revision is up and running correctly now. A Teensy 4.1 is hooked directly to a W65C02 with address, data and 6 control lines. The Teensy sets the pace by controlling the clock, so it is possible to run really slow or quite fast. I've tested the code I have to run 2 million cycles which takes around 0.285 seconds. No problem doing an emulated environment on the Teensy and still run the 6502-cpu in a 2 MHz equivalent. Not bad for such a rats nest of wires.
Everything is emulated for the 6502: memory and whatever I/O deemed necessary. This is rather nifty, since the C++ code is much easier to write than any HDL, and the emulation can even be cycle exact if needed.
![]()
-
End of year report
12/24/2020 at 10:40 • 0 commentsThis week I ordered HW: 65C02, ATF750 CPLD, 4x4 register chips and 512KiB SRAM. The urge to build a "real" HW PZ1 was simply to great.
I've done quite a lot of 3D-modeling for a compact case, but am nowhere near complete. I know what I want in the end, getting there takes time.
The code has seen little improvements since last report. Sprites are working and fun to use.
All in all, I realize I do lots of things in parallel without completing anything major. BUT it is very enjoyable, which is what matters most to me. Getting it all done is a long term goal.
-
Sprites and 3D
10/18/2020 at 08:26 • 0 commentsLast week I implemented ports to access sprites from the 6502. Quite interesting how much HW-sprites offloads work from old CPUs, it really pays off! Not quite done yet, but good enough to test from basic.
Yesterday I got an Ender-3 V2 3D-printer, so now I can finally build a proper case for the PZ1. It is really different to work with 3D-CAD compared to coding, but I like both. Nice to be able to swap between different tasks and ways of working, and the result seems to come out very good. Pictures later, when I've passed the alpha levels of case design. As with code, (almost) nothing is correct on the first try.
-
A sea of pixels and power
10/07/2020 at 14:25 • 0 commentsMore HW has arrived!
The long awaited Gameduino 3X screen has crept slowly to me from USA, and finally landed at my doorstep. It is a marvellous screen with its own GPU, and a totally different way of programming. More similar to modern 3D-accelerators, but limited to 2D.
4.3", 480x272 pixels, 24-bit colour, 1024KiB screen ram, built in fonts and 8MiB flash. WOW! The tricky part is that it really doesn't have a simple frame buffer, but instead uses commands in a display list. Takes some time to get used to.
After some frustrating manual reading and testing I've finally gotten what I want for a start: an 8x8 text-mode with back- and foreground colours and way too many sprites :) All synced at a buttery smooth 50Hz.
The screen with the Teensy 4.1 and its 8MiB PSRAM makes this emulated 6502-system extremely capable.


