Any Colour You Like

Profile
Purley, United Kingdom
Z80 and C#-related shenanigans - now with added electronics.
606 comments
1 followers
222 entries
Advertisement
benryves
October 05, 2008
Z80 computer - Lines, cubes and inverted text
I've made a few additions to the operating system for the computer. The Console module, which handles text input and output, now supports "coloured" text - that is you can set the text foreground and background colours to either black or white. This functionality is exposed via the BBC BASIC COLOUR…
2,231 views
benryves
September 24, 2008
Fixed and scaled CHIP-8/SCHIP interpreter
The CHIP-8/SCHIP interpreter now seems happy enough to run games, though the lack of settings to control how fast or slow they run makes things rather interesting.


First of all, I've hacked together a painfully simple read-only file system. Each file is prefixed with a 13-byte header; 8 bytes for th…
1,917 views
benryves
September 22, 2008
64KB RAM and a CHIP-8/SCHIP interpreter
The only major hardware modification since last time is the addition of another 32KB SRAM.


Click to toggle labels

This appears as two 16KB pages in the $4000..$7FFF slot. Currently only the first page is used for OS variables and scratch space, freeing up the upper 32KB entirely for BBC BASIC's use.

O…
2,924 views
benryves
September 14, 2008
Times, backlights and off-page calls
Dates, times and backlights

I'm using a DS1307 real-time clock to provide the computer with real-time date and time functions. It's a great little chip - all it needs is power, two lines for I2C communications, a 32768Hz crystal between two pins and a back-up battery to keep it ticking when main pow…
2,021 views
benryves
September 11, 2008
Bank-Switching Memory and I2C
Cheers for the comments. [smile] As EasilyConfused pointed out, I have done calculator programming in the past, which makes this much easier - learning Z80 assembly to program a calculator influenced the choice of CPU in this computer, and porting BBC BASIC to the calculator showed that with a mini…
2,719 views
benryves
September 07, 2008
Running BBC BASIC on a home-built computer


This computer needs a name - I'd welcome any suggestions!
I have built a circuit on another piece of stripboard that will handle memory, clock signal generation and the Z80 itself.

A few posts ago I was wondering about how I'd partition memory. To date I've been using a very simple circuit where the …
3,417 views
benryves
August 27, 2008
2MHz should be enough for anyone
LCD Timing
Last time I discussed the hardware I mentioned I had LCD timing issues. I have finally resolved them, but this has been the most time consuming part of the project so far.

The first thing to sort out was the LCD's E pin. Once you have set up the LCD's input pins to a state where they're re…
1,946 views
benryves
August 24, 2008
Remapped IO.DLL
A common problem with software that uses the parallel port is that is hard-coded to use particular port addresses, such as 0x378 for LPT1. This is all well and good on older machines that have integrated or ISA ports that can be assigned this base address, but newer machines with PCI cards don't ge…
3,584 views
benryves
August 20, 2008
Z80 computer with a primitive I/O board
A computer needs some way of interacting with the outside world via input and output devices. It's about time, then, that the Z80 computer project acquires a section dedicated to I/O.


The Z80 differentiates between memory and I/O devices, though both share the data bus and the address bus. You can c…
4,086 views
benryves
August 13, 2008
Z80 Light-flasher
Now armed with a flash programmer, I thought it about time to try and build a Z80-based system.


Click for video (829KB WMV)

Not much to look at, and it doesn't do much either. The large IC in the bottom-left, prominently marked Z, is the Z80 itself. To its left is a 555, generating a ~220Hz clock sig…
3,241 views
benryves
August 12, 2008
Emulators and neatened wiring
I've decided to switch to a regular 10MHz Z80 rather than a Z180, given the difficulty of using an SDIP 64. I now have a DIP 40 Z80 ready for use, but as I don't have the programmer for the Flash chip (which will hold the OS) there's not much I can do with it physically. I have therefore cobbled to…
2,560 views
benryves
August 04, 2008
Experimenting with a 32KB RAM
The next component I thought I'd experiment with is the RAM. The project is an analogue recorder - a circuit that samples an analogue input periodically and saves it in RAM, and can be configured to play the recorded signal back afterwards.


Yes, it says plating.

A single RAM chip offers 32K with an e…
2,246 views
benryves
August 01, 2008
Back to Hardware
I enjoy dabbling with low-level programming, but have never actually built a computer to run these programs. I think it's time to correct that, and as the BBC BASIC project has required me to develop an almost complete Z80 OS (the only thing that's left for the TI-OS to do is manage files) I though…
2,272 views
benryves
July 29, 2008
Graphical text, BASIC tokeniser and flood-filling
I've got a fairly hackish "graphical text" mode set up (enabled with VDU 5, disabled with VDU 4) that causes all text that is sent to the console to be drawn using the current graphics mode (at the graphics cursor position, using the graphics colour and logical plotting mode and graphics viewport).…
2,263 views
benryves
July 21, 2008
Text viewports and sprites
Back to work on the TI-83 Plus port of BBC BASIC! To complement the graphics viewport I've added support for text viewports -- this lets you define the area the text console uses. The following VDU commands are now supported:
  • VDU 24,;;;;
    Define a graphics viewport.
  • VDU 28,,,,
    Define a text viewport.…
2,036 views
benryves
July 03, 2008
XNA DOOM3
This journal is starting to look a little drab, so here's a splash of colour.


Not really all that colourful, on second thoughts. [smile] I fancied a short break from BBC BASIC, and seeing that the current XNA CTP supports VS 2008 I thought I'd try a bit more work on hardware-accelerated 3D. I've nev…
1,927 views
benryves
June 23, 2008
Clipped graphics and ellipses
qarnos -- author of the superb Aether 3D engine -- has been lending a hand with the BBC BASIC graphics API and contributed a large amount of very useful code.


First up is some code to clip 16-bit line coordinates down to 8-bit coordinates. This allows for lines to be partially (or completely) off th…
1,553 views
benryves
June 12, 2008
Gyrating cubes in BBC BASIC
Work has been keeping me busy recently, but I've tried to set aside a small amount of time each evening to reclaim some sanity and do a little work on BBC BASIC. Not much progress has been made, but there has been some at least.


On the left is the program running on an 83+ SE at 15MHz, on the ri…
2,204 views
benryves
June 03, 2008
BBC BASIC running as an application
Richard Russell has kindly supplied the project with the BBC BASIC relocatable modules -- compiled object files which can be relocated to any memory address by a linker -- which means that BBC BASIC can now be configured to run on the TI's hardware.

The tools to relocate the modules run under CP/M, …
1,708 views
benryves
May 22, 2008
Z80 BBC BASIC - Emulated on Windows
I've started working with the actual BBC BASIC interpreter. As it won't run in its current state on the TI calculator (it relies on a jump table at &FF80..&FFFF to interact with the host, which is protected) I'm using the Z80 emulator I wrote for Cogwheel to try and puzzle out what the host…
3,104 views
benryves
May 19, 2008
BBC BASIC
This is a project I initially attempted to get off the ground about four years ago, but never did. Anyhow, I've started work on it, and thanks to help from Richard Russell (the original developer) and J.G.Harston (who comparatively recently developed the Sinclair ZX Spectrum port) it looks like it …
1,915 views
benryves
May 05, 2008
CSG, fisheye and spotlights.
One way of constructing solids is to use a method named constructive solid geometry (or CSG for short). I added two simple CSG operators - intersection and subtraction - that both take two surfaces and return the result.


In the above image, the surface that makes up the ceiling is created by subtrac…
2,281 views
benryves
April 29, 2008
Cylinders and translucent surfaces


The first addition to the raytracer was a cylindrical surface, represented by two end points and a radius. In the two screenshots above, the cylinder is infinitely long - not very useful. However, by calculating the point on the cylinder's axis that is closest to the struck point on its surface yo…
1,934 views
benryves
April 27, 2008
Fixed reflections and proper textures
Quote:Original post by downgraded
How long does that scene take to render?
Just over a minute, so not very good performance at all. I've made some changes since then (including multithreading) that drop it down to about 30 seconds.


There is definitely something wrong with the reflections.
I decided to …
1,234 views
benryves
April 26, 2008
Raytraced shadows, reflections and chessboards
I thought that better lighting might help the scene look a bit nicer, so decided removed all the existing lighting code (and reflection code, to make life easier) and tried to add some basic shadowing.


Simple shadowing test.
When a ray's intersection with the world is found, a ray is cast back from t…
1,873 views
benryves
April 25, 2008
Raytracing - Beware of the coder colours
As much as I claim to be interested in software rendering (be it as part of a game engine or as an effect in a demo), I've never actually written a raytracer. Having written some basic vector and plane arithmetic code for physics in the XNA Quake project, I thought I'd give it a stab.


No apologies m…
1,524 views
benryves
April 20, 2008
SC-3000 keyboard and a final release
The latest addition to Cogwheel is SC-3000 keyboard emulation.


The SC-3000 was a home computer with similar hardware to the SG-1000 console, with the main addition of a keyboard. Software cartridges could add, for example, BASIC programming capabilities.

Due to lack of time and motivation, and the fa…
2,177 views
benryves
April 07, 2008
3D glasses and CPU cycle counting
I reintroduced joystick support to the emulator front-end over the weekend, using a much more sensible input manager. The control editor form uses the same interface design for keyboard and joysticks - you click the button you wish to edit, it appears pressed, you press the key (or joystick button)…
1,973 views
benryves
April 03, 2008
ColecoVision and TMS9918 Multicolor
One notable gap in my TMS9918 (video) emulation was its "Multicolor" mode. This mode broke the screen down into 4x4 pixel squares, resulting in a 64x48 grid. Each cell could be assigned a unique colour, giving you a crude bitmapped video mode.

No Master System or SG-1000 software used this mode to m…
4,361 views
benryves
March 31, 2008
SaveStates and Key Names
It's a good feeling when issue 1 is finally marked as Fixed - in this case it was another interrupt-related bug. The IFF1 flag was being used to mask non-maskable interrupts; I don't think it should and it hasn't seem to have broken anything just yet by making non-maskable interrupts truly non-mask…
2,276 views
Advertisement

Popular Blogs

shawnhar
Generalist
101 Entries
10 Followers
15 Entries
11 Followers
johnhattan
Programmer
1,277 Entries
48 Followers
ApochPiQ
Generalist
628 Entries
44 Followers
dgreen02
Generalist
338 Entries
56 Followers
Advertisement