• Please review our updated Terms and Rules here

Cromemco dazzler replica project

Ah look what I found among my boxes if docs.. physical copies! Even have a manual for the D+7A I/O card (which I do not own). If anyone has one they'd part with, let me know. Dazzler Snake needs joystick support! :D

PXL_20240411_041817294~2.jpg
 
Last edited:
Ah, you've even got the Link & Lib manual I was trying to find...

No excuse now for not reading the manual!

>>> I'm sure Dave would barf if he saw my code, but it works.

As long as you are learning stuff and having fun - I can't criticise that can I?

Sure, there will be a learning curve - but that is what VCFED is for - asking questions...

Looks great so far though.

Dave
 
So your Link and Lib manual (023-4026) has most things you want to know about the linker!

Try practicing on a separate little project to see how this works...

Don't use ORG!

Put the directive DATA before your data and the directive REL before your code.

You can then define your data after the DATA directive (e.g.):

Code:
       DATA
BODYX: DS 256 ; Space for ...
BODYY: DS 256 ; Space for ...
...

       REL
       LD A,(BODYX+27) ; Load a byte at offset 27 from BODYX.
       LD HL,BODYX ; Point HL at the start of BODYX.
       LD L,27 ; Index element 27 (counting from 0). This assumes HL is on a 256-byte boundary.
       LD A,(HL) ; Load a byte at offset 27 from BODYX using L as the effective index.
...

When you invoke the linker, you can define where the data is located with a command line switch (/d:4000).

The linker will group together all of the code and load it at an address that it defines. The data will all be grouped together and will be placed at the address defined (4000 hex in this case). The default radix for numbers is HEX.

[There is also a /p:nnnn switch if you want to locate the code yourself].

The beauty of this is that you don't need to change the source code for your program to relocate either the CODE or DATA. In fact, you can issue the SNAKE.REL file to the user and let them link the program as they wish.

I will still look to see if I can find a way of persuading the macro assembler to do what we want in source code though.

EDIT: For CODE read REL (I have edited the above already).

Dave
 
Last edited:
I'll give this a shot. Just wanted to say thanks again, I've wanted to learn Z80 ASM for a very long time.. ever since the 90's when I got my first TI-graphing calculator and was fumbling around learning BASIC for it. Then I found all the far better games/apps you could load for it, downloaded from ti-calc.org that were developed in assembly.
 
I just have added a utility I wrote for testing Dazzler hardware on a real system. Included is a program for converting BMP images to Dazzler memory images (all modes supported), as well as a menu driven program for controlling the Dazzler and loading custom images from disk into video memory. The BMP converter currently is Windows only. See https://github.com/akueckes/Cromemco-Dazzler-RevD for the download.

I used 8080 assembler for wide applicability. BDOS required. Unfortunately, many (if not most) Dazzler software runs on Z80 only. Maybe it is useful. Have fun.
 
I just have added a utility I wrote for testing Dazzler hardware on a real system. Included is a program for converting BMP images to Dazzler memory images (all modes supported), as well as a menu driven program for controlling the Dazzler and loading custom images from disk into video memory. The BMP converter currently is Windows only. See https://github.com/akueckes/Cromemco-Dazzler-RevD for the download.

I used 8080 assembler for wide applicability. BDOS required. Unfortunately, many (if not most) Dazzler software runs on Z80 only. Maybe it is useful. Have fun.
Wow, thanks for that. I will have to try this soon. And it is suited to 8080.

To get a .BMP image into memory suited to the Dazzler was a step by step process for me. It was easy enough for color test patterns as I just wrote directly to the memory with a small amount of code, but for the x4 resolution mode, it took me quite a while and a lot of steps to process a single .BMP image to get it right for Dazzler display.
 
I just have added a utility I wrote for testing Dazzler hardware on a real system. Included is a program for converting BMP images to Dazzler memory images (all modes supported), as well as a menu driven program for controlling the Dazzler and loading custom images from disk into video memory. The BMP converter currently is Windows only. See https://github.com/akueckes/Cromemco-Dazzler-RevD for the download.

I used 8080 assembler for wide applicability. BDOS required. Unfortunately, many (if not most) Dazzler software runs on Z80 only. Maybe it is useful. Have fun.

Works fine under CDOS on a Z80! Impressive work, Ansgar! So what kind of pre-processing do I need to do to a high resolution image to get it down to a 64x64 greyscale image that displays well on the dazzler? I tried a few, and while it does display, nothing looks nearly as good as this GREY.IMG example.

PXL_20240412_020659186_exported_500_1712887661144.jpg
 
Here are the steps for greyscale images:
  1. crop to quadratic shape
  2. reduce canvas size to 64x64
  3. save as 24bit BMP image
  4. use bmpconvert with -greyscale option
The GRAY.IMG example was created exactly that way with paint.net. If you like, you can also already convert to greyscale and reduce the color depth to 4 bit within your favorite image program using dithering (ordered or floyd steinberg), but the results are not that much better, due to the low resolution of 64x64. Photoshop fo instance can handle custom color tables which reflect exactly what the hardware can support. Attached is a suitable 4-bit greyscale custom color table for Photoshop, just in case. Just experiment with what gives you the best results.

For color images, it is of importance that the source image is suitable for the very reduced number of colors, since the reduction to Dazzler's small color palette is brute. And Dazzler's low resolution with up to 64x64 is not really suitable for applying dithering. But of course the steps above also work in principle with bmpconvert with the -color option. So you should do whatever is possible to optimize the source image to the Dazzler palette with your image program before handing it over to bmpconvert. You will probably get the most impressive color images drawing them manually (the Monkey Island way...).

Remember that the IBM PC offered the same color depth not before EGA was released. And this was 8 years after the Dazzler. CGA was not capable showing 16 colors at the same time without tricks.
 

Attachments

  • greyscale.zip
    186 bytes · Views: 1
Remember that the IBM PC offered the same color depth not before EGA was released. And this was 8 years after the Dazzler. CGA was not capable showing 16 colors at the same time without tricks.

It is something of a “trick”, in the sense it’s a mode that has to be manually set up and is kind of awkward to program, but CGA has a perfectly serviceable way to display 160x100x16 colors. (I would probably argue it’s actually less awkward, or at least no worse, than the Dazzler’s weird four quadrant coordinate system.)
 
Last edited:
It is something of a “trick”, in the sense it’s a mode that has to be manually set up and is kind of awkward to program, but CGA has a perfectly serviceable way to display 160x100x16 colors. (I would probably argue it’s actually less awkward, or at least no worse, than the Dazzler’s weird four quadrant coordinate system.)
Oh yes. As Hugo already wrote programming the Dazzler x4 mode is mind twisting. I would not say that it is impossible to create sophisticated and fast algorithms for it, but it goes towards the limits of what my brain can handle. I have a Vector Graphics video card which implements bilevel with 256x240 which has exactly the same scheme as the Dazzler in x4 mode, but it at least doesn't use quadrants. I wonder, though, whether games implementation might still be with same speed or even faster with color/grayscale than with x4 mode, although more data has to be moved.
 
What can be done with some tweaking with an IBM CGA is nicely shown by the famous 8088 MPH demo (see
). The Youtube link is to a version with composite monitor. Here also is a link to my own setup at home trying to demonstrate the difference between composite monitor and original CGA monitor, which has TTL inputs for the primary colors (left display composite, right display CGA monitor) a couple of years ago:
.

Guess we have a long way to go to create something similar on a Dazzler.
 
What can be done with some tweaking with an IBM CGA is nicely shown by the famous 8088 MPH demo (see
). The Youtube link is to a version with composite monitor. Here also is a link to my own setup at home trying to demonstrate the difference between composite monitor and original CGA monitor, which has TTL inputs for the primary colors (left display composite, right display CGA monitor) a couple of years ago:
.

Guess we have a long way to go to create something similar on a Dazzler.

Hi,

The thing is the DAZZLER is not designed for that kind of graphics, it's like if I compared a 2K/inch pixel image comparing it to your IBM image.

Also, besides resolution and speed problems is memory limits.


.
 
The point is that the CGA actually also wasn't designed for this. I agree that the Dazzler lacks many of the features of a 6845, but it will be still a challenge to drive it to its limits.
 
After I saw the K scope program, and noticed its 4 quadrant symmetry, I realized in this case that they had exploited the 4 quadrant architecture to aid the K.scope image. It was almost as though the designers had decided from the start, they wanted the K.scope effect to be their very first image, so they set up their video memory mapping like this. Then it gets much more awkward later if you decide you want to display a regular picture with a linear array of pixels line by line.

In a strangely odd way, with the relatively low resolution of the Dazzler and the blocky images, it almost turns the image into a kind of "graphic electronic art" or computer based impressionism which peculiarly, adds to its charm. Not unlike the kind of simple, but oddly effective graphics, that were more common in the late 70's and early 80's.

To a large extent a lot was left to the human imagination to fill in. All of us know that a good sketch artists, with just a few lines on a page can create a human face with some emotional expression. Our minds do the rest of the work filling in the details. In many ways I like this, rather than being spoon fed visual perfection where nothing is asked of the mind to contribute.
 
Last edited:
After I saw the K scope program, and noticed its 4 quadrant symmetry, I realized in this case that they had exploited the 4 quadrant architecture to aid the K.scope image. It was almost as though the designers had decided from the start, they wanted the K.scope effect to be their very first image, so they set up their video memory mapping like this. Then it gets much more awkward later if you decide you want to display a regular picture with a linear array of pixels line by line.

In a strangely odd way, with the relatively low resolution of the Dazzler and the blocky images, it almost turns the image into a kind of "graphic electronic art" or computer based impressionism which peculiarly, adds to its charm. Not unlike the kind of simple, but oddly effective graphics, that were more common in the late 70's and early 80's.

To a large extent a lot was left to the human imagination to fill in. All of us know that a good sketch artists, with just a few lines on a page can create a human face with some emotional expression. Our minds do the rest of the work filling in the details. In many ways I like this, rather than being spoon fed visual perfection where nothing is asked of the mind to contribute.
Hugo, you wrote what I think. Despite of and actually because of its limitations, creating images and visual effects with early computers *was* an art of its own. And still is. It had been a great challenge to create artifacts and even worlds within the limits of its time, and it was highly fascinating, despite of the limitations. It is reported that Kaleidoscope caused traffic jams when being shown in a store window (see https://www.quaxio.com/kaleidoscope_part1). When creating artwork at that time we literally draw every individual pixel. The nice thing was, that we also spent more creativity, time and reasoning in language, stories and gameplay. Low resolution was of course a challenge, but also a driver for innovation and imagination.
 
Thought I'd share a status update, I have Dazzler Snake basically to the point where I'd call it a beta release. All the game logic is there, I have collision detection, stages, scoring, a "hud" of sorts (shows how many lives you have left and how many points left on the stage) - basically everything for a working 1-player version of the game. Just a couple small things to add still and a bug or two remain. Then it'll be onto adding 2-player support, sound & joystick control!


Attached is what I'm going to call beta 0.1. I'll be starting a Github page for this soon.
 

Attachments

  • snakez80.txt
    22.5 KB · Views: 4
Well I have no idea how a Dazzler dazzles but if I had one and also my sadly long-gone S-100 system I would probably re-key Microsoft Level II BASIC (surely someone's done that since I did 40-odd years ago from the BASIC Decoded book) then modify the command table to add some graphics commands to call the Dazzler library. I added HLIN, VLIN (because I thought they were so cool!) and later a point to point line plot routine a friend wrote in Z80 code for me which I still have somewhere. I suppose a COLOR command would be needed too.
 
Fortunately Cromemco already did that! There was a version called 16K Extended Basic that incorporated all of Dazzler graphics commands. I haven't tried it yet though...
 
You are enjoying yourself too much!

Considering you have taught yourself how to code in Z80 assembler, and use the Cromemco assembler Dazzler Library I would call that a success. Well done!

To be clear though (and for education), Cromemco did not actually 'modify' their BASIC to support the Dazzler. You download a driver that stays resident within the machine and then you run BASIC.

From BASIC you then send "formatted strings" to a named device that passes the strings on to the initially-loaded library.

By using this mechanism, you can interface to virtually anything from BASIC.

Breakfast and then to my business meetings!

Dave
 
clear though (and for education), Cromemco d
Thought I'd share a status update, I have Dazzler Snake basically to the point where I'd call it a beta release. All the game logic is there, I have collision detection, stages, scoring, a "hud" of sorts (shows how many lives you have left and how many points left on the stage) - basically everything for a working 1-player version of the game. Just a couple small things to add still and a bug or two remain. Then it'll be onto adding 2-player support, sound & joystick control!


Attached is what I'm going to call beta 0.1. I'll be starting a Github page for this soon.

Hi,

Cool ... great start to new gaming ...

Sans joysitcks, two people could be in this game via dial-up modem connections to make it more exciting. Both players would try to get to the dot first and a collision would cost maybe 10% of their snake length where snake length is the scoring ... or vice versa ... gain 10% so each player is trying to minimize their snake length to a dot?

.
 
Back
Top