Welcome, Guest. Please login or register.

Author Topic: How to Hijack the classic Amiga hardware?  (Read 5117 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline msh5150

  • Newbie
  • *
  • Join Date: Nov 2005
  • Posts: 10
    • Show only replies by msh5150
Re: How to Hijack the classic Amiga hardware?
« Reply #14 from previous page: November 09, 2005, 03:23:39 PM »
"But that will leave me in user mode won't it? Is code in the bootblock of a floppy started in system or user mode? Is there a guide on the format of the bootblock somewhere?"

Yes it will. If you want to be in supervisor mode use the exec call _LVOSupervisor() and then take over the machine after that.

The bootblock is 1K long.  The first 4 bytes are 'DOS' and then a number. Usually 0, but can be others. You can also use the word 'BOOT' for the first 4 bytes (I think).

The next 4 bytes are the checksum. Amiga won't boot your code unless this is correct.

The next 4 bytes are a block pointer to the root block (this can be ignored as you are making your own system and don't need to adhere to AmigaOS specs).

You can find more info about it here:
http://amiga.emugaming.com/adfaq.html

IMHO you might be best off doing some 'oldskool' hardware bashing code first to learn about the hardware (like trackloaders or copper/blitter effects).  Then try to build on this experience later. I'm sure most people reading this topic will have gained thier experience that way.
 

Offline MskoDestnyTopic starter

  • Sr. Member
  • ****
  • Join Date: Oct 2004
  • Posts: 363
    • Show only replies by MskoDestny
    • http://www.retrodev.com
Re: How to Hijack the classic Amiga hardware?
« Reply #15 on: November 09, 2005, 04:05:27 PM »
Quote

IMHO you might be best off doing some 'oldskool' hardware bashing code first to learn about the hardware (like trackloaders or copper/blitter effects).  Then try to build on this experience later. I'm sure most people reading this topic will have gained thier experience that way.

Well that was the basic plan. I doubt I'll write anything too intersting demo-wise in the near future. The immediate goal is just to figure out how to setup an appropriate screen mode, write some pixels to the screen (since the Palm OS graphics primitives are largely based around the assumption of a dumb framebuffer) and talk to the mouse and keyboard.

At the moment, I'm still having trouble finding decent information on the hardware itself. I don't really need anything beyond OCS level at the moment, but I haven't found a good resource for that kind of info.
 

Offline msh5150

  • Newbie
  • *
  • Join Date: Nov 2005
  • Posts: 10
    • Show only replies by msh5150
Re: How to Hijack the classic Amiga hardware?
« Reply #16 on: November 09, 2005, 04:33:11 PM »
Get yourself the 3rd revision of the Hardware Reference Manual - that should help a lot! I still use mine quite a bit  :-D

Also this might be of interest on some other bits:
http://www.mways.co.uk/amiga/howtocode/

This should point you in the right direction  :-)

The first things I ever coded on the Amiga was some copper bar type stuff - this will teach you how to work with setting up the display.
 

Offline MskoDestnyTopic starter

  • Sr. Member
  • ****
  • Join Date: Oct 2004
  • Posts: 363
    • Show only replies by MskoDestny
    • http://www.retrodev.com
Re: How to Hijack the classic Amiga hardware?
« Reply #17 on: November 10, 2005, 03:33:58 AM »
Quote

msh5150 wrote:
Get yourself the 3rd revision of the Hardware Reference Manual - that should help a lot! I still use mine quite a bit  :-D

Tracking down an out of print book is a bit more trouble than making an Amiga port of my little OS is worth to me.

Quote
Also this might be of interest on some other bits:
http://www.mways.co.uk/amiga/howtocode/

I found that via google, but by itself it's not very useful. It sort of assumes you already have the hardware manual. A lot of it also geared at using OS functions to get things done.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: How to Hijack the classic Amiga hardware?
« Reply #18 on: November 10, 2005, 07:42:10 AM »
@MskoDestny
Quote
Tracking down an out of print book is a bit more trouble than making an Amiga port of my little OS is worth to me.

Buy the Amiga Developer CD 2.1, it has full Hardware Reference Manual included (among other priceless documentation). It seems to be available for about 25 eur (or ~30 usd).

Hardware Reference Manual really is essential for programming the HW directly.