View Single Post
Old 06 February 2015, 06:25   #2

Join Date: Dec 2014
Location: Montreal
Posts: 129
You can find some examples of OS-respectful programming in the Rom Kernel Manuals "Libraries Manual":

However, this is quite far away from the metal and you will have quite a few graphics.library structures to initialize and prepare before you can just display an empty screen.

If you want to toy directly with the hardware (which frankly is more fun) you can start reading the real bible of the Amiga, the Hardware Reference Manual: Inside you will find low level descriptions of the machine and how to program it via its custom chips registers. There's a lot to read but it's quite fascinating and very well written overall: if you know nothing about bitplanes for example you will find a complete explanation of how they are used to construct the display.

As for programming the hardware using C, all the hardware registers can be written-to/read-from using pointers. For example, changing the colour 0 of the palette can be done via:

*((unsigned short*)0xDFF180) = 0x0FFF; // Set colour 0 to white.
I believe there is a header file somewhere which already contains macros or structs to use to access all the custom registers so you don't have to type raw addresses such as 0xDFFxxx but I can't recall its name or where it is.

I guess more seasoned Amiga coders will point you to more recent and/or elaborated examples and/or docs though since I essentially gave you what I started with back in the days where there was no Internet yet.
Nekoniaow is offline  
Page generated in 0.07945 seconds with 11 queries