Page 4 of 6
Re: 6502 Sandbox
Posted: Fri Mar 22, 2013 11:49 am
by Arlet
And a text buffer with light and dark letters. I just copied this from an earlier project, but modified the spacing a little bit.

- text.jpg (46.71 KiB) Viewed 1695 times
Re: 6502 Sandbox
Posted: Fri Mar 22, 2013 12:40 pm
by cjb
Image no longer available: http://kildall.apana.org.au/~cjb/fry_money.gif
Re: 6502 Sandbox
Posted: Fri Mar 22, 2013 3:11 pm
by Arlet
Improved Acorn Atom font.

- atomfont2.jpg (37.72 KiB) Viewed 1685 times
I got the font from
here. The original Atom font (generated by a MC6847) only had upper case, which as the web page says, was just about acceptable in 1982. The improved font adds lower case letters, and cleans up a few of the original characters, while still keeping most of the upper case characters the same as the original. I see a few mistakes in the
copy I used (the 'd' is narrower than the 'b' for instance).
Re: 6502 Sandbox
Posted: Sat Mar 23, 2013 9:08 am
by Arlet
Combined video output using the new Atom font with OS + BASIC ROMs loaded in SRAM. I've modified the OS ROM to read input from the UART instead of the keyboard matrix, but I've kept the text output the same, so whatever you type on the UART, appears on the screen. The cursor is still missing, for some reason. I'll have to look into that. Edit: the cursor is drawn by setting bit 7 of the character code, which results in an inverted character. In my new font, I use those code for lower case letters, and I don't have inverted characters, so this trick doesn't work.

- atom.jpg (18.99 KiB) Viewed 1657 times
And another test with the semi graphics mode. This is a mode from the 6847 which supports mixed text and low resolution graphics by dividing each character cell in 2x3 pixels and using a 64-character range to represent all combinations. The Atom ROM has support to draw lines in this mode. Resolution is quite limited at 64x48

- clear0.jpg (14.58 KiB) Viewed 1652 times
Re: 6502 Sandbox
Posted: Sat Mar 23, 2013 12:16 pm
by Arlet
Found some old Atom tape archives, and made a simple tool to extract programs and preload them into SRAM before starting the OS. Here's the output of the "8 queens" program from the user manual. As you run the program, it shows all the solutions on the screen. Pretty impressive, actually, for a 429 byte program.
Re: 6502 Sandbox
Posted: Sat Mar 23, 2013 12:25 pm
by BigEd
Excellent!
Re: 6502 Sandbox
Posted: Sat Mar 23, 2013 2:47 pm
by Arlet
Added support for graphics mode 2 (128x96 monochrome bitmap). The weird stuff to the left of the diagonal line is text because I entered the commands interactively. The screen memory for the text overlaps the memory for the graphics, so the text characters show up as bitmap graphics.
The Atom has 9 graphics modes: one text/semigraphics, plus 4 monochrome graphics, and 4 color graphics modes. This mode 2 was easy to add, because it only uses 1.5kB of memory, so everything fits in one block RAM that I already had for the text mode. I'm planning to put the video memory in external SRAM, but this was easier for a quick test.
Re: 6502 Sandbox
Posted: Sun Mar 24, 2013 11:08 am
by Arlet
Now fetching video data from external SRAM instead of internal block RAM. Picture resolution is 256x192, which is the highest that the Atom supported. Monochrome only. Back in the days, this took about 4 minutes to load from cassette tape... or 1 minute if you had the extension EPROM with fast tape routines

- clear4.jpg (53.02 KiB) Viewed 1613 times
Re: 6502 Sandbox
Posted: Sun Mar 24, 2013 1:58 pm
by MichaelM
Pretty neat.
You really know you've been around electronics too long when you recognize DIP resistor packages such as those in your image.
Re: 6502 Sandbox
Posted: Sun Mar 24, 2013 2:15 pm
by Arlet
I got the image from
this collection. I didn't realize they were resistors, but now that you mention it, I can see the 4.7K and 10K markings on there. Funny to think that those huge DIP packages were once used as convenient space savers.
Re: 6502 Sandbox
Posted: Sun Mar 24, 2013 3:09 pm
by GARTHWILSON
I expect it was really more about saving work and reducing manual-stuffing errors, and easing inspection. When we were still doing thru-hole, I was packing 1/8W resistors in tighter than that in our designs. It was one of the things that held our competition at bay. I do have a bunch of surplus resistor DIPs and SIPs here though. I did use a few SIPs to increase density.
Re: 6502 Sandbox
Posted: Sun Mar 24, 2013 5:19 pm
by bogax
I expect it was really more about saving work and reducing manual-stuffing errors, and easing inspection. When we were still doing thru-hole, I was packing 1/8W resistors in tighter than that in our designs. It was one of the things that held our competition at bay. I do have a bunch of surplus resistor DIPs and SIPs here though. I did use a few SIPs to increase density.
I expect you're correct.
We used SIPs to save space.
But they also made (make?) special purpose
networks with matched resistors (binary ladders
and stuff)
Re: 6502 Sandbox
Posted: Tue Mar 26, 2013 9:52 am
by Arlet
Screen shot from Acornsoft game 'Dodgems'. Works in graphics mode 4.

- dodgems.jpg (28.09 KiB) Viewed 1570 times
The game itself doesn't work. I guess because it's directly reading the keyboard matrix, and that's not supported in my hardware model because I only have a serial port right now. That's why I'm planning to add a USB interface in rev2.
Re: 6502 Sandbox
Posted: Wed Mar 27, 2013 7:00 am
by Arlet
Hmm.. I was thinking I can emulate a true keyboard interface using some software help on the PC side. I could make a small PC program that captures raw keyboard events when a key is pressed or released, and translate these events to a byte (1 bit for press/release, 7 bits scancode), and send that over the serial interface to the sandbox board. The FPGA can then decode the events and present an accurate I/O interface for a keyboard matrix on the 6502 bus.
This would also allow some PC keys to be mapped to special keys or functions on the target. For instance, pressing an (unused) function key on the PC keyboard could pull down the RESET signal on the 6502.
Re: 6502 Sandbox
Posted: Thu Mar 28, 2013 8:21 pm
by Arlet
I've implemented the keyboard matrix emulation, and now I'm running with unmodified Atom ROMs. The Dodgems game also works now.

- dodgems2.jpg (36.5 KiB) Viewed 1497 times
The Atom had very poor keyboard support. No n-key rollover, so you have to type slowly and in staccato fashion, otherwise it would skip the keys. Another problem is that the Atom keyboard layout does not match a modern PC keyboard. Not only are there different keys on there, but some keys are also in strange places, or work differently when combined with 'shift'. This is a tricky problem because for games you'd like to have the keys mapped based on position, but for text entry, you'd like to have the keys mapped according to meaning.