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
September 22, 2006
Emerson Beta 2
Sorry about the lack of updates, but I have been incredibly busy with work related programming.

One small project I've had a chance to update is Emerson - my keyboard and mouse library for the TI-83 series calculator.



I know, I can't type layout. [rolleyes] Download the library (and demo) here.
1,894 views
benryves
August 22, 2006
Stuff and nonsense
Brass

Important: all versions <= 1.0.4.5 have a major bug with ZIDX instructions (eg rr (ix+1)) meaning that they are not output correctly. Please upgrade to 1.0.4.6 as soon as possible.

Other stuff

I haven't had much of a chance to do anything especially exciting of late. I found my PICAXE chips a…
1,462 views
benryves
August 03, 2006
Multithreading on the TI-83 Plus
I'm not really clued up on the way these new-fangled modern operating systems handle running multiple threads, so I apologise in advance if this isn't really proper multithreading.

Basically, I was pondering (as one does) whether it would be possible to run any number of threads on the TI-83 Plus. I…
2,071 views
benryves
July 26, 2006
Map Editing
I added five-level grey:



The greyscale effect is optional (adds about 8 lines of code, only runs once per frame and can be disabled with a single switch in the engine package's Settings.inc file.



Anyway, I've started throwing together a very primitive level editor. (GDI+)



Insert inserts a new vertex a…
1,861 views
benryves
July 17, 2006
Coloured walls and FPS counters
I fixed most of the wall filling code. It now fills by scanline (so is considerably faster), which gives me more flexibility over what I can do with it.

For the moment, I have sacrificed speed with a routine that can handle three different fills - black, white, or 50% dithered. The routine will alwa…
2,056 views
benryves
July 07, 2006
Filling


I chucked some simple filling in to the engine as a test. It scans along the top and bottom edges of the shape, then fills columns. This is rather inefficient (filling scanlines is much faster - the screen is shorter than it is wide, so tracing Ys for the boundaries is faster than scanning Xs, and …
1,496 views
benryves
July 03, 2006
Clipping works! (Almost)
Clipping now works in nearly all cases:



One of the problems was lack of precision. Here's the typical case that worked, running in my mockup:



In this case, where |dX| > |dY|, all is good. However, switch that around so that |dY| > |dX|, and you get the following:



(Fixed point isn't so good for h…
1,645 views
benryves
June 27, 2006
Clipping
Clipping (adjusting walls to ensure that they are in the field of view so that they can be drawn correctly is being a right pain).

Firstly, I rewrote some of the really ugly wall-handling code:



Clipping follows the fairly simple maths:

Clip = (Y0 - m x X0) / (1 - m)

(Where m is the gradient of the wall…
1,519 views
benryves
June 20, 2006
Latenite 1.0.6.0
There's a new Latenite beta - 1.0.6.0 - available from my site. I hope this is the last Latenite 1 release; I'm moving away from the current IDE towards a revised Latenite 2, the focus more on interactivity with the assembler and the debugger (better 'Intellisense', breakpoints, variable watching a…
1,570 views
benryves
June 15, 2006
Text Editing Woes
I've had enough of my syntax-highlighting text editor in Latenite (it's a hack on top of the RichTextBox control, using all sorts of ugly Win32 hacks to beat it into submission). I'd much rather have a control I had some... 'control' over, so have taken to writing my own custom control.



One useful t…
1,812 views
benryves
June 07, 2006
Applications
I've been attempting to add native TI-83+/TI-73 application support to Brass. Testing with Flash Debugger has been an entertaining experience, not least thanks to helpful messages like:



I haven't managed to get a signed application running in Flash Debugger or on hardware yet - I suspect the header …
1,759 views
benryves
May 30, 2006
JavaScript Raycaster


A silly project from over the weekend: JavaScript raycaster.

I couldn't work out how to handle keypresses in Firefox, and Firefox is too slow and flickery to make it worthwhile. IE runs it fine but at less than 1FPS, meaning that more often than not you end up walking through the walls. Opera is a…
2,937 views
benryves
May 22, 2006
Debugging fun
One part of the Latenite 'suite' that's needed some dire attention is the PindurTI interface. This talks to the excellent TI emulator via a non-interactive mode, and can therefore sit between Latenite (and your source code) and the emulated calculator (which is running your binary).

The current inca…
1,760 views
benryves
May 15, 2006
Patch files
I added Emukon patch file export to Brass - Brass will export all the labels, variables and breakpoints from the source and Emukon can then load them in. It makes debugging much simpler...


Click for legible


In my Game Gear-related fiddling, I optimised the tween demo code significantly, but then slow…
1,601 views
benryves
May 09, 2006
Structs and sensible variable layout
When developing an assembly program, you need to 'declare variables' by attaching an address (in RAM) to a label.

The problem here, of course, is having to calculate all the relevant positions in RAM for each variable. For example,
ram = $C000 ; Assume RAM starts at address $C000

var1 = ram+0
var2 = ra…
1,500 views
benryves
May 03, 2006
A productive weekend
What with the weekend having an extra Monday tacked on for good measure (Labour Day), I felt the need to be productive.

I also felt the need to listen to VGM files converted to MIDI, so rustled up a VGM to MIDI converter. There already is one (available on the SMS Power! site), but I could never get…
1,563 views
benryves
April 28, 2006
Further Brass development
One of my ongoing projects is Brass, a Z80 assembler.

The newest release adds all sort of goodness, especially nested modules - for example:
.nestmodules
.local
.module Animals

.module Cat
Legs = 4
.endmodule

.echo "Humans have ", Human.Legs, " legs.\n"

.module Human
Legs = 2
1,227 views
benryves
April 20, 2006
DOOM Source
You can download the source to the DOOM project below here.
It's a real mess in places, mainly in the way it loads level geometry. DirectX initialisation is hard-coded with no fallback code if some feature is missing or unsupported.

Usage: DOOM
eg:
DOOM DOOM2.WAD MAP31
DOOM DOOM.WAD E1M3
DOOM TNT.WAD M…
1,768 views
benryves
April 12, 2006
Variable height sectors
I switched from 16/8 division to 24/16 division, and wall heights are now calculated rather than being dragged off a lookup table.



There's also backface culling (the cylinder around the central cube is marked as double-sided, hence no culling there) but there is still no clipping or occlusion.

@phili…
1,669 views
benryves
April 05, 2006
Oldschool 3D
All this DOOM work had got me interested again in simple 3D engines, and so thoughts turned to my favourite Z80 platform, the TI-83 Plus.

There are a handful of 3D engines out there for it already; Matt3D is a vector-based wireframe engine put to good use in a roller-coaster builder/simulation game …
2,008 views
benryves
March 22, 2006
Lights, camera - action!


I've also added a MUS lump (music format used by DOOM) player, using the MIDI message functions in winmm. The only feature left unsupported is the pitch wheel, as I can't quite work out the MIDI command for it.

If somebody could please explain the logic behind MUS, please tell me. It's essentially t…
1,490 views
benryves
March 20, 2006
Making the world live
It might have looked liked I'd got all the walls drawing and texturing correctly, some particular combinations were still wrong.
Some walls looked completely wrong until you got up close, and with a flickering burst of z-fighting they'd resolve themselves. Or rather, fuzzy patches would resolve them…
1,857 views
benryves
March 17, 2006
No more holes.
With the exception of some very bizarrely shaped sectors, I've patched up the holes by making the floor splitter a bit more intelligent. It also removes some redundancies.
The more exotic levels generate about 5000 triangles, which is fairly reasonable.



Now I need to do battle with the physically imp…
1,662 views
benryves
March 16, 2006
World's Worst Sector Splitter
As with many programming problems, a potential solution presents itself at about 2AM when you suddenly awake and hunt paper and pencil before the brilliant idea vanishes into the groggy murk that is forgetfulness.

In this instance, a solution did present itself, but it's far from 'brilliant'.

I was p…
1,856 views
benryves
March 13, 2006
Managed DirectX is awesome
A few years back I had a go with DirectX 8, helped along by the excellent DirectX4VB website and tutorials.
The best thing I cranked out was a simple DOOM-ish 3D engine, minus sprites (just walls and floors).



(All images are click-for-big).

I fancied another go, this time not in VB6 but in C# and not …
2,072 views
benryves
March 02, 2006
Web design
Seeing as I spend my working time doing web development, I thought it might be time to rework my site and remove the nested mess of tables [wink]

For once, I actually have content, but at the moment it's spread out in seperate mini websites in my "bin" folder. It would be nice to unify it...

After an…
7,767 views
benryves
February 27, 2006
CHIP-8/SCHIP
It's not as if I didn't already have an excess of projects, but anyway...


Vinegar - CHIP-8/SCHIP interpreter for the TI-83 (+)


The binaries are here. I've tested them fairly extensively on my TI-83 Plus, but be warned that (as it's beta) they might cause odd crashes. Back up any important files!
1,824 views
benryves
February 23, 2006
Next Latenite Beta
Seeing as the MaxCoderz fora have died (I can't read or post on them at the temporary hosting), and I know at least kv reads this... [wink]

Latest beta: http://benryves.com/bin/latenite/ (full install).

General

  • No more hanging or locking up when running the PTI debugger (huzzah!) PindurTI debugger is …
1,839 views
benryves
February 21, 2006
TI-83 Plus Mouse
I had another go with my AT protocol routines to see if I could persuade a PS/2 mouse to do anything.
It would appear that I could...


Click to view a video clip (1MB WMV)


There are two cables for the mouse as there were for the keyboard - one goes to the TI, the other goes to the power supply. The mou…
2,471 views
benryves
February 13, 2006
Microhertz
They say that pictures are what make a journal interesting... but I don't really want to show the pretty pictures I have, as they'd spoil the surprise. Of what, you might ask? Well, I've been developing a TI-83/83+ scene demo, entitled "Microhertz" (for no particular reason). You can download it (a…
1,885 views
Advertisement

Popular Blogs

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