Difference between revisions of "Motorola 68000"

From SizeCoding
Jump to: navigation, search
(Created page with "== Introduction == Wanting to start sizecoding on a 6502 platform in this day and age can be tough. So here is a bit of help to get you started: === The 6502 processor ===...")
 
(Introduction)
Line 1: Line 1:
 
== Introduction ==
 
== Introduction ==
Wanting to start sizecoding on a 6502 platform in this day and age can be tough.  
+
Wanting to start sizecoding on a Motorola 68k platform in this day and age can be tough.  
  
 
So here is a bit of help to get you started:
 
So here is a bit of help to get you started:
  
=== The 6502 processor  ===
+
=== The Motorola 68k processor  ===
The 6502 processor can be seen as the 8bit micro ARM chip.  
+
The Motorola 68k processor...
It has only has 3 registers (Accumilator, IX and IY registers) and only a handful of instructions to work with.
+
 
 +
Note:  Assigment direction is source,dest instead of dest,source !!!
  
 
=== Registers ===
 
=== Registers ===
 
To be added.
 
To be added.
 
=== Zero page ===
 
When using the 6502 for sizecoding, you'll mostly be working from zeropage
 
  
 
== Atari ST ==
 
== Atari ST ==

Revision as of 03:46, 6 July 2020

Introduction

Wanting to start sizecoding on a Motorola 68k platform in this day and age can be tough.

So here is a bit of help to get you started:

The Motorola 68k processor

The Motorola 68k processor...

Note: Assigment direction is source,dest instead of dest,source !!!

Registers

To be added.

Atari ST

The Atari ST systems consists of the M68k system with custom hardware for graphics and sound.

Setting up

Setting up your development platform for the Atari ST systems is quite easy, first get the following tools:

  • Assembler: VASM - This assembler is able to assemble directly to a TOS image

https://sourceforge.net/projects/sjasmplus/

  • Emulator(s): -. Make sure to use the original TOS 1.62 Image for best compatibility.


Compiling to a TOS image

Vasm -Ftos source.s -o source.tos

Video diplay

Video display on the Atari 8bit systems use the TIA chip, it has the following video modes:

To be added soon.


Setting a palette

pea palette(pc) move.w #6,-(sp) trap #14

Palette data

palette: dc.w $000,$100,$200,$311,$422,$533,$644,$755 dc.w $575,$464,$353,$242,$131,$020,$010,$000

Getting something on screen

Here is a bit of code to get you started:

;----------------------- ; Line-A Initialization ;-----------------------

After calling this function, data register D0 and address register A0 point to a table ; with the starting address of the Line A variables.
Address register A1 points to a table with the starting addresses for the three system ; font headers,
and address register A2 points to a table that specifies the starting addresses of the; 15 Line A opcodes. There's no parameter required for this function, so all you have
to do is call the word opcode label that you specified for the $A000 (Initialize)
function.

dc.w $A000 movem.l (a0),a1-a4 ; A3=INTIN, A4=PTSIN

;--------- ; For X&Y ;--------- frameloop: move.w #200-1,d7 ; y yLoop: move.w #320-1,d6 ; x xLoop:

; Putpixel put_pixel: move.b d6,d0 ; d0=x eor d7,d0 ; d0=x^y lsr.b #2,d0 ; d0>>=4 and #42,d0 ; d0&42

move.w d0,(a3) ; a3=color(d0) movem.w d6/d7,(a4) ; a4=x,y`

dc.w $A001 ; put pixel command

dbra d6,xLoop ; decrease and branch

   dbra	d7,yLoop
Wait loop

bra frameloop ; .s *


Sound

The Atari ST systems use the YM8192 chip to generate sound. To be added soon.

Make some noise

To be added soon.