Latest update (Dec 2016) - Tetris game in dflat!
I felt the need to do something more sophisticated than the Invaders game in dflat, so have attempted a decent implementation of Tetris. The screenshot below shows the game - I am quite pleased with it, as it uses only my custom dflat interpreter. I am using sprites, sound, user defined graphics and a multi-colour palette to give the game a nice look and feel. In addition, to optimise for performance of scrolling the game map when a line is completed, I am using fairly intense string handling to maintain the game map rather than the original 20x10 integer array. Whilst developing this game, I decided to add timer functions to dflat, to help with timing various animations in the game loop - a beneft to building one's own computer language!
Invaders retro game done!
I've been a bit busy with work, but have managed to create a small and simple space invaders type game entirely in dflat. It takes me right back to around 1984 when I learnt to program from magazine listings! Also, I have added a couple of videos with commentary on youtube - one on the hardware (see below) and one on dflat (see dflat log).
First for a bit of context (back to around late 2014)
I guess I have always been interested in the lower level details of computers and their operations. As a kid of the 80s in the UK, getting to know the inner workings of my old Oric-1 and Atari 800XL entailed learning 6502 assembly and the I/O chips (including sound and video).
Then I had to grow up. I went to University, and went in to the world of work. My first couple of jobs were low-level (sort of), building software for embedded systems using a mixture of C, C++ and Assembly.
But for almost 20 years, I have been designing, architecting and consulting around distributed business systems. So I went completely away from the low level, working at the business outcome level - which is great in many, many ways.
However I still had a passion for being able to wield the computer at its lowest levels. By the 2010s I started to gain a desire to build my own computer - (almost) the ultimate expression of this. I did some research and found not only loads of homebrew computer enthusiasts, but even homebrew processor enthusiasts. But as is often the way, life and work took over and I put it to one side.
Around late 2013, the desire to build my own computer hadn't gone away, and I had continued my research and looking longingly at other enthusiasts' efforts. Finally, I resolved to stop pondering and actually get on with it. I needed a hobby that would work around a demanding job and home life, so this would be something I could let progress as my time allowed.
Current State (April 2016)
As of the last update, my home brew has the following features:
- 65c02 at 2.68Mhz
- 2 x WDC6522 at 2.68Mhz
- 1 x TMS9918 at 10.7Mhz
- 1 x AY-3-8910 at 1.34Mhz
- 1 x HM628128 128K SRAM 70ns (using only 44K)
- 1 x W27C512 64K EEPROM 45ns (using only 16K)
- Serial I/O using 6551 ACIA
- Atari compatible joystick port using 8910 port lines
- SD card interface using CIA port lines
- Original BBC Micro keyboard integration through a 6526 CIA
- Original BBC Micro case
I had a number of initial goals:
- Serial, SD, Screen and Keyboard with a common I/O approach : Done
- Basic operating system mainly focussed on I/O and interrupts : Done
- Built-in interpreted language with editor to enable machine to be standalone : Done
- Built-in mass storage to not rely on a host PC for input/output and mass storage : Done
- Output to a standard LCD TV : Done
So what is left.. I have achieved most of the things I wanted and feel quite pleased with it's current position. However there are some more things I want to do:
- Simple banked RAM - use 6526 I/O line(s) to make better use of 128K SRAM
- Simple banked ROM - use 6526 I/O line(s) to make better use of the 64K ROM
- Write some demo games using my built in dflat language!
I have had a think about banked memory for RAM and ROM and decided they are not M but...Read more »