Thanks Polluks. Yes, we found the problem and it was not easy to find. The code was good but we got carried away and code grew too large so when loading maps the lookup table for HIRES graphics got corrupted and the bottom part of the map was being drawn on the wrong place. It is fixed now with 1.04 version that is available on David's web site.
This short tutorial is a very simple comparison of three main languages used to develop software on Commander X16. Instead of printing standard Hello World message, let’s do something more interesting and specific to the platform but still try to keep it as simple as possible. There is nothing more unique to Commander X16 than using VERA and let's throw in reading a mouse . I will not go into details on how to install development tools and what editor to use etc. but will focus on coding to highlight differences between approaches to make it easier to choose or transition between languages regardless of what your background is. The only background required is a basic understanding of VERA (Versatile Embedded Retro Adapter). If you need a quick overview, I wrote a post here . Goal We will write simple drawing programs in default text mode. We will use the mouse for drawing and pressing the left mouse button will draw by filling the character over which we are hovering and t...
Commander X16 uses 256 color palette, each of the component colors (R, G and B) gets 4 bits therefore we can choose from total of 16*16*16 = 4096 combinations. At startup we get pretty good collection of default colors. First 16 colors are similar to Commodore 64 colors, the next 16 are all possible clean gray colors followed by spread of other colors of different hues and intensities. Below are the table of defaults. I exported these colors directly from Commander X16 emulator using a simple Basic program that can be downloaded below. I also included links to two versions of bitmaps that can be used to import into paint programs or sprite design tools. Please note that Color 0 in 256 color mode is actually replaced by transparent "color" and black indexed 16 can be used instead. Index R G B 0 0 0 0 1 15 15 15 2 8 0 0 3 10 15 14 4 12 4 12 5 0 12 5 6 0 0 10 7 14 14 7 8 13 8 5 9 6 4 0 10 15 7 7 1...
*** Mostly obsolete, valid for Emulator versions before R.37 - Check the VERA Overview instead *** In this short post we will discuss access to graphics using direct access. We will explain the memory organization and test it with Basic and later translate it into Assembly program When programing in Basic we have few handy commands that make access to graphics simple and seamless. For example using VPOKE and VPEEK we can write and read to and from any address in video memory. With VLOAD we can load chunks of data directly into Video memory. So why would accessing it with machine code be any different? To explain let’s look at the (simplified) memory map of Commander X16. The CPU is using 16 bit address bus and therefore can directly access 64 Kbytes of memory. We call it CPU memory. Commander X16 actually has more memory which CPU can access through “banking switching” however it can still only address 64 at any given time. On the other hand we 128K of Video mem...
There's a glitch in the map routine of 1.03
ReplyDeleteThanks Polluks. Yes, we found the problem and it was not easy to find. The code was good but we got carried away and code grew too large so when loading maps the lookup table for HIRES graphics got corrupted and the bottom part of the map was being drawn on the wrong place. It is fixed now with 1.04 version that is available on David's web site.
Delete