LearnAsm.net

Learn Assembly Programming...
With ChibiAkumas!

New Domains! Bookmark www.LearnAsm.net or www.AssemblyTutorial.com for all your Assembly programming needs!

68000 Resources

Resources related to these tutorials

68000 Cheatsheet - Commands and info
Cheatsheet for 68000 assembly development - contains 68000 commands details
DevToos - My collection of 68000 Development tools and scripts
Download these to get started with my 68000 tutorials quickly and easily.
Sources.7z - All sourcecode for my tutorials
Download this to get all the source code for my tutorials

Basics Series

A warm up to assembly with no actually programming, discusses concepts and terminology, and is designed for those who find jumping straight in too intimidating!

Lesson 1 - Getting started with Retro Programming in Assembly
Interested in Retro programming, Want to learn the concepts of Assembly and retro computers?... This is for you! This episode will go over the concepts of computing, and what assembly assembly language is, and what it can do for you!
[Documentation] [Video]



Lesson 2 - Basics… The Mysteries of the CPU!
When we program in assembly, we need to know more than 'The CPU does processing'!... We'll need to understand what it can do, and how it does it!
[Documentation] [Video]



Lesson 3 - Basics… More Detailed Mysteries of the CPU!
We learned quite a lot about the CPU last time, but there's some more specialist stuff we'll need to know for certain CPUs. Lets look at some more technical CPU wonders!
[Documentation] [Video]



Lesson 4 - Data Representation
Knowing different representations of numbers tends to be more important in Assembly than languages like Basic and C++ that tend to do everything for us.
[Documentation] [Video]



Lesson 5 - Assembler Terminology.
The Assembler is the program we will use to turn our text source file into an assembled program we can run. Lets learn the terminology we're likely to come across in our quest to go from source to something we can run!
[Documentation] [Video]



Lesson 6 - More Assembler Terminology!
The Assembler is the program we will use to turn our text sourcefile into an assembled program we can run. Lets learn the terminology we're likely to come across!
[Documentation] [Video]



Lesson 7 - Even More Assembler Terminology!!!!111
The Assembler is the program we will use to turn our text sourcefile into an assembled program we can run. Lets learn the terminology we're likely to come across!
[Documentation] [Video]



Lesson 8 - Programming Techniques
Assembly programming has some common programming techniques and methods it's worth pointing out, as they may help you design your programs.
[Documentation] [Video]



Lesson 9 - Graphics Terminology
Lets look at some of the terminology we'll come across when it comes to graphics and video hardware when programming retro hardware in Assembly.
[Documentation] [Video]



Lesson 10 - Sound Terminology.
In this lesson, We'll look at some of the concepts of making sounds for the 'less musical' programmer!
[Documentation] [Video]



Lesson 11 - Other Hardware Terminology
There's a few other weird and (somewhat) wonderful terminology we may come across, that it's worth discussing at some point.... and that point is right here!
[Documentation] [Video]



68000 Tutorials

Basic 68000 Assembly tutorials - We'll use Notepad++ and Vasm in these tutorials.

Lesson 1 - Getting started with 68000  [68000]
Lets get started with the 68000 CPU, we'll learn how to assemble a program with VASM, we'll look at the template file we'll be using in these tutorials, We'll look at the basics of moving values into registers with MOV, jumping to subroutines with JSR... adding and subtracting with ADD and SUB and working with memory
[Documentation] [Video] [Forum]
Lesson 2 - Addressing Modes of the 68000[68000]
In this tutorial we'll look at 'addressing modes' these are how the CPU selects a source or destination address for an operation - here we'll go through each addressing mode with practical examples
[Documentation] [Video] [Forum]
Lesson 3 - Loops and Conditions  [68000]
This tutorial covers using LEA to load an effective address, we'll look at labels and defining Symbols with EQU... we'll cover JMP and BRA for jumping and Branching, Bcc condition codes like BEQ, BNE, BCS and BCC... we'll also look at loops with DBRA
Lesson 4 - Stack, Traps, and Maths! [68000]
In this tutorial we'll learn how the stack works on the 68000 CPU - we'll learn the concepts of stacks, the PUSH and POP commands, how the JSR uses the stack... using MOVEM to move multiple registers onto the stack, PEA to push an effective address onto the stack.
We'll also cover mathematical operations: NEG for negation, DIVS,DIVU for division, MULS and MULU for multiplication... we'll also cover the concepts of TRAPs for OS calls
[Documentation] [Video] [Forum]
Lesson 5 - Bits and swaps! [68000]
In this lesson we'll learn about Logical ops like AND, OR ,EOR and NOT... We'll look at how to test and change one bit of a register with BTST, BSET, BCLR and BCHG... we'll look at rotation with ROL, ROR, LSL and LSR... we'll also look at 'Scc' - set on condition.
As well as bit ops, we'll look at SWAP and EXG for swapping register values
Lesson 6 -  More Bits... Extends and Macros [68000]
This tutorial covers the Extend flag, the CCR / SR flags register, Rotating with eXtend bit with ROXR and ROXL, arithmetic  shifts with ASL and ASR... also using the extend bit for 64 bit + maths with SUBX, ADDX and NEGX... Sign extending with EXT, and doing nothing with NOP!... last but by no means least, we'll cover conditional compilation.
[Documentation] [Video]

Hello World Series

Lets look at simple Hello World examples - each with a single ASM file.

Lesson H1 - Hello World on the X68000 [X68]
Lets learn how to write 'Hello World' on the Sharp x68K - we'll cover the code itself, the format of the X File executable used by the x68...  Building an executable XFile with VASM, putting it onto a disk, and running it with an X68k emulator.
[Documentation] [Video]
Lesson H2 - Hello World on the Atari ST [AST]
In this tutorial we'll learn how to write 'Hello World' on the Atari ST, compile and link it it with VASM to make an executable TOS, and load it in our emulator via hard disk emulation
[Documentation] [Video]
Lesson H3 -  Hello World on the NeoGeo [NEO]
In this tutorial we'll learn how to write 'Hello World' on the Neo Geo, we'll use a basic template ROM file, set up our font in the FIX ROM, and show Hello world... we'll compile with VASM, and then learn how to make an XML file so our ROM will load in MAME
[Documentation] [Video]
Lesson H4 - Hello World on the Sinclair QL [SQL]
In this tutorial we'll learn how to write 'Hello World' on the Sinclair QL, we'll write Hello World, Compile it with VASM, and attach a directory of windows as a virtual drive in our emulator, we'll then write a boot program to start and run our program on the QL
[Documentation] [Video]
Lesson H5 - Hello World on the Genesis / Megadrive [GEN]
In this tutorial we'll learn how to write 'Hello World' on the Genesis, we'll learn how to build a rom file with VASM and start it with the Fusion emulator,
[Documentation] [Video]
Lesson H6 - Hello World on the Amiga [AMI]
In this tutorial we'll learn how to write 'Hello World' on the Amiga, we'll compile it with VASM, and load it with WinUAE via an folder on our hard drive, which we'll set up to emulate a hard disk
[Documentation] [Video]
Lesson H7 - Hello World on the X68000 with native tools. [X68]
We looked at writing a 'hello world' example before using cross compilation from windows. This time we'll compile using an assembler from within the X6800 itself!... Lets learn how!
[Documentation][Video]

Simple Series

Basic Tutorials doing common game programming tasks in a single ASM file

Lesson S1 - Simple Bitmap Drawing on the x68000 [X68]
Let's look at the basics, Lets learn how to draw a simple bitmap onto the screen... effectively a software sprite. We'll be able to use this to make a simple game!
[Documentation][Video]
Lesson S2 - Simple Bitmap Drawing on the Atari ST [AST]
Let's look at the basics on the Atari, Lets learn how to draw a simple bitmap onto the screen... effectively a software sprite.
[Documentation][Video]
Lesson S3 -Simple Bitmap Drawing on the the Amiga [AMI]
Lets take a look at the Amiga, We'll learn how to draw a small 8x8 smiley on the screen, and a larger bitmap.
[Documentation][Video]
Lesson S4 - Simple Bitmap Drawing on the Sinclair QL [SQL]
Lets take a look at the Sinclair QL - we'll use 8 color mode to draw a simple smiley, and our mascot
[Documentation][Video]
Lesson S5 - Simple Tilemap Drawing on the Sega Genesis [GEN]
We're looking at various systems, and learning how to draw bitmaps.Being a tile based system, the Genesis doesn't work the same, but we can split our graphics up into 8x8 tiles, and draw them in almost the same way.
[Documentation][Video]
Lesson S6 - Simple Tilemap Drawing on the NeoGeo [NEO]
We're looking at various systems, and learning how to draw bitmaps.Being a tile based system, the Neo Geo doesn't work the same, but we can split our graphics up into 8x8 tiles, and draw them in almost the same way.
[Documentation][Video]
Lesson S7 - Simple Joystick reading on the x68000 [X68]
We've learned how to draw a small sprite to the screen... lets extend that example by adding joystick control, so we can move the sprite around.
[Documentation][Video]
Lesson S8 - Simple Joystick Reading on the Atari ST [AST]
Lets extend our Atari Example, and use traps and vectors to read in the Joystick
[Documentation][Video]
Lesson S9 -Simple Joystick Reading on the the Amiga [AMI]
Let's extend that previous example, and add joystick control to the Amiga sample. We'll need to process the data of the joystick port (mouse port) and convert it to digital directions
[Documentation][Video]
Lesson S10 - Direction key reading on the Sinclair QL [SQL]
The Sinclair QL uses keypresses for it's 'joystick' Lets learn how to use the OS TRAP to read from the keyboard, and move our previous smiley around
[Documentation][Video]
Lesson S11 - Joypad Reading on the Sega Genesis [GEN]
Lets extend the previous bitmap example, and learn how to move an 8x8 smiley tile around the screen.
[Documentation][Video]
Lesson S12 - Joystick reading on the NeoGeo [NEO]
Lets look at the NeoGeo… lets add Joystick reading and move our smiley around the screen. We're going to use the 'fixmap' for simple graphics in this example.
[Documentation][Video]
Lesson S13 - Simple Sprite Clipping on the x68000 [X68]
We drew a bitmap on the screen before and move it around the screen, but this time we'll improve the routine, and allow the bitmap to go partially offscreen! Lets give it a go.
[Documentation][Video]
Lesson S14 - Simple Sprite Clipping on the Amiga [AMI]
We drew a bitmap on the screen before and move it around the screen, but this time we'll improve the routine, and allow the bitmap to go partially offscreen… We'll use Blitting to make smooth movement easier!
[Documentation][Video]
Lesson S15 - Simple Sprite Clipping on the Atari ST [AST]
Lets extend our Atari Example, and add sprite clipping so the sprite can go partially offscreen.
[Documentation][Video]
Lesson S16 - Per-Pixel Simple Sprite Clipping on the Atari ST
Our last example was a bit jerky moving horizontally. Because of the bitplane layout we were moving in 1 byte chunks… this time we'll add bit shifting for some smooth moves!
[Documentation][Video]
Lesson S17 - Tilemap clipping on the Genesis
We drew our chibiko character on the screen before with the tilemap and moved it around the screen, but this time we'll improve the routine, and allow the bitmap to go partially offscreen!
[Documentation][Video]
Lesson S18 - Hardware Sprite Clipping on the Genesis [GEN]
Our last example was distinctly disappointing!... using the Tilemap is easy, but gave jerky movement! Lets smooth things over and make things move more neatly!
[Documentation][Video]
Lesson S19 - Simple Sprite Clipping on the Sinclair QL
Lets extend our Sinclair QL example, and allow the sprite to go partially offscreen
[Documentation][Video]
Lesson S20 - Fix layer clipping on the NeoGeo [NEO]
Lets take our previous NeoGeo example where we drew a graphic on the 'Fix layer' and add clipping, so the image can go partially offscreen.
[Documentation][Video]
Lesson S21 - Hardware Sprite clipping on the NeoGeo [NEO]
Lets do more sprite clipping... this time with hardware sprites!
[Documentation][Video]
Platform Specific Series
Now we know the basics, lets learn about the systems we're covering

Lesson P1 - Bitmap Functions on the X68000 [X68]
This Tutorial will teach us the basics of drawing bitmap graphics on the Sharp X68000 (x68k), we'll set up the screen and Show a bitmap and print characters to the screen from a bitmap font. also learn about VBLANK
[Documentation] [Video] [Forum]
Lesson P2 - Bitmap Functions on the Atari ST [AST]
In this lesson we'll cover the Atari ST - We'll learn how to Set up the screen, calculate screen positions and create bitmap data in the correct format for the Atari ST
[Documentation] [Video] [Forum]
Lesson P3 - Using the FIX layer to draw bitmaps on the NeoGeo [NEO]
Learn about the NeoGeo Fix Layer - designed for text - we'll learn about the pixel format of the FIX ROM, include a FIX ROM in our Mame XML, and use it to get a bitmap to the screen... we'll also cover VBlank
[Documentation] [Video] [Forum]
Lesson P4 - Bitmap Functions on the Sinclair QL [SQL]
Learn about the Sinclair QL screen modes, both 4 and 8 color - including the flashing option!... we'll turn on the screen, define our bitmap and show it... we'lll also learn how to detect Vblank.
[Documentation] [Video] [Forum]
Lesson P5 - Bitmap Functions on the Genesis [GEN]
This tutorial covers the Genesis / Megadrive... we'll learn how to set up the screen, define Mega Drive Tile patterns, then use the tilemap to show a bitmap to the screen... we'll also learn how to use vblank on the genesis
[Documentation] [Video] [Forum]
Lesson P6 - Bitmap Functions on the Amiga [AMI]
In this lesson we'll learn about the Amiga, we'll learn how to set up the copperlist, use Chip Ram to define a screen, and how the screen is made up of bitplanes... we'll use this to get our image to the screen, and learn to use Vblank to control the speed of our game.
[Documentation] [Video] [Forum]
Lesson P7 - Joystick Reading on the X68000 [X68]
Let's learn how to use Joypads on the Sharp X68000... The x68k can use MSX or Genesis type Joypads! we'll learn how to read in from joypads, and show the results to the screen
[Documentation] [Video] [Forum]
Lesson P8 - Joystick Reading on the Atari ST [AST]
Let's learn how to use Joypads on the Atari ST... we'll need to use a Bios Trap to read in from the joysticks.
[Documentation] [Video] [Forum]
Lesson P9 - Joystick Reading on the NeoGeo [NEO]
Let's learn how to use Joypads on the Neo Geo AES / MVS
[Documentation] [Video] [Forum]
Lesson P10 - Cursor reading on the Sinclair QL [SQL]
Let's learn how to read the Cursor keys of the Sinclair QL - these are also used by the joystick ports
[Documentation] [Video] [Forum]
Lesson P11 - Joystick Reading on the Genesis [GEN]
In this Lesson you'll learn how to read the Cursor keys of the Sinclair QL - these are also used by the joystick ports
[Documentation] [Video] [Forum]
Lesson P12 - Joystick Reading on the Amiga [AMI]
This tutorial teaches how to read in the Joysticks of the Amiga.
[Documentation] [Video] [Forum]
Lesson P13 - Palette definitions on the X68000  [X68]
This tutorial teaches how to define screen colors on the Sharp x68k
[Documentation] [Video]
Lesson P14 - Palette definitions on the Atari ST [AST]
Learn how to define screen colors on the Atari ST
[Documentation] [Video]
Lesson P15 -  Palette Definitions on the NeoGeo [NEO]
This Lesson teaches you how to define the screen colors on the Neo Geo AES or MVS
[Documentation] [Video]
Lesson P16 - Palette Definitions on the Genesis [GEN]
This Tutorial covers how to define the screen colors on the Megadrive / Genesis
[Documentation] [Video]
Lesson P17 - Palette Definitions on the Amiga [AMI]
This Tutorial covers how to define the screen colors on the Amiga
[Documentation] [Video]
Lesson P18 - Sound on the X68000 [X68]
Learn how to make simple sounds on the Sharp x68k
[Documentation] [Video]
Lesson P19 - Sound on the NeoGeo via FM with the YM2610 (and Genesis!)  [NEO] [GEN]
This tutorial covers the YM2610 - this relates to the Neo Geo and Mega Drive / Genesis
[Documentation] [Video]
Lesson P20 - FM Sound on the Genesis via the Z80 [Z80] [GEN]
Lets learn how we can control the Megadrive / Genesis FM chip via the Z80
[Documentation] [Video]
Lesson P21 - FM Sound on the Genesis via the 68000 [68000] [GEN]
Lets learn how we can control the Megadrive / Genesis FM chip via the 68000
[Documentation] [Video] [Forum]
Lesson P22 - Sound on the Sinclair QL [SQL]
This tutorial teaches how to make sound on the Sinclair QL
[Documentation] [Video] [Forum]

Lesson P23 - Sound on the Amiga [AMI]
This tutorial teaches how to make sound on the Amiga with digital samples
[Documentation] [Video] [Forum]
Lesson P24 - Hardware Sprites on the X68000 [X68]
This lesson covers hardware sprites on the Sharp x68k
[Documentation] [Video]
Lesson P25 - Hardware Sprites on the NeoGeo [NEO]
Learn how to use hardware sprites on the Neo Geo
[Documentation] [Video]
Lesson P26 - Making a tilemap from Hardware Sprites on the NeoGeo [NEO]
As the NeoGeo doesn't have a tilemap, we have to simulate one via sprites... This tutorial covers how to do this
[Documentation] [Video]
Lesson P27 - Hardware Sprites on the Genesis / Megadrive [GEN]
Lets look at how to use hardware sprites on the Megadrive / Genesis
[Documentation] [Video]
Lesson P28 - Hardware Sprites on the Amiga [AMI]
This tutorial teaches how to use and combine Amiga sprites for 4 or 16 color sprites on the amiga.
[Documentation] [Video]
Lesson P29 - Multiple Tilemaps on the Genesis
No Description Available
[Documentation] [Video]
Lesson P30 - The X68000 Mouse
No Description Available
[Documentation] [Video]
Lesson P31 - 4x 16 color layers on the X68000
No Description Available
[Documentation] [Video]
Lesson P32 - The x68000 Text Layer
No Description Available
[Documentation] [Video]
Lesson P33 - Other screen modes of the X68000
No Description Available
[Documentation] [Video]
Lesson P34 - Creating a game for the NeoGeo CD!
No Description Available
[Documentation] [Video]
Lesson P35 - Creating a game for the MEGA CD
No Description Available
[Documentation] [Video]
Lesson P36 - 32 color and Multiple Playfields (layers) on the Amiga
No Description Available
[Documentation] [Video]
Lesson P37 - Amiga Sprite Blitting and Interleaved bitplanes (68000 Assembly Lesson P37)
No Description Available
[Documentation] [Video]
Lesson P38 - Mouse Reading on the Genesis
Lets look this week at that rare species of rodent… The Genesis Mouse! The mouse connects to the standard ports, and with the right commands, we can get mouse movements from it!
[Documentation] [Video]
Lesson P39 - PSG Sound on the Genesis (ChibiSound Pro) [GEN]
We'll write a new multi-platform sound driver, which will give us control over the hardware, and allow us to write a music player which will work in a common way on all systems.
[Documentation] [Video]
Lesson P40 - FM Sound on the Genesis (ChibiSound Pro) [GEN]
This time we'll use the superior (but harder to understand!) FM sound
[Documentation] [Video]
Lesson P41 - AY Sound on the Atari ST (ChibiSound Pro) [AST]
Lets take a look at the ATARI-ST version of ChibiSound PRO!
[Documentation] [Video]
Lesson P42 - Sound on the Amiga (ChibiSound Pro) [AMI]
Lets take a look at the Amiga version of ChibiSound Pro!
[Documentation] [Video]
Lesson P43 -Sound on the x68000 (ChibiSound Pro) [X68]
Lets take a look at the x68000 of ChibiSound Pro!
[Documentation] [Video]
Lesson P44 - Sound on the Sinclair QL (ChibiSound Pro) [SQL]
Lets take a look at the QL version of ChibiSound PRO!
[Documentation] [Video]
Lesson P45 - Sound on the NeoGeo (ChibiSound Pro) [NEO]
Lets take a look at the NeoGeo version of ChibiSound PRO - which actually runs on the Z80!!
[Documentation] [Video]

Grime Series

In this series I remake the old DOS game 'Grime'. This series teaches simple tile drawing.
0. Grime 68000 - The 14 days of Grime-Mass
No Description Available
[Video]

1. Grime 68000 - Tiles for all!
No Description Available
[Video]

2. Grime 68000 - Scrolling message working!
No Description Available
[Video]

3. Grime 68000 - Something is moving!
No Description Available
[Video]

4. Grime 68000 - The Trouble with Tilemaps!
No Description Available
[Video]

5. Grime 68000 - Mostly Playable!
No Description Available
[Video]

6. Grime 68000 - Now with added Vblank!
No Description Available
[Video]

7. Grime 68000 - Done and Dusted!
No Description Available
[Video]
8. Grime 68000 - Code overview
No Description Available
[Video]

Yquest Series

In this series I remake the old DOS game 'X-quest'. This series teaches simple tile drawing and hardware sprites on systems where they are available.

Lesson YQuest1 - Introduction and Data Structures
Lets start by having a quick look at the game, and the structure of the game RAM, and the settings which define levels and enemies.
[Documentation][Video]
Lesson YQuest3 - Sinclair QL Specific code [SQL]
The Sinclair QL also uses a bitmap screen - with 8 color graphics.... let take a look at the QL version
[Documentation][Video]
Lesson YQuest4 - Amiga Specific code [AMI]
Lets Port to the Amiga... we won't use hardware sprites on this system, we'll do the graphics in software
[Documentation][Video]
Lesson YQuest5 - Genesis Specific code [GEN]
Let's look at making Yquest work on the Genesis... we'll use the tilemap to draw graphics to the screen.
[Documentation][Video]
Lesson YQuest6 - NeoGeo Specific code [NEO]
Let's look at the NeoGeo... we'll use the Fix Layer to draw graphics to the screen. We need to define our tile bitmaps in the XML file - as they are defined by ROM.
[Documentation][Video]
Lesson YQuest7 - Atari ST Specific code [AST]
Lets Port to the Atari ST... The ST can't do hardware sprites, and unfortunately it's screen layout is a bit of a pain.
[Documentation][Video]
Lesson YQuest8 - x68000 Hardware Sprites [X68]
The old x68000 version with bitmap sprites had pretty smooth movement, but as there's so little documentation online for X68k hardware sprites, we'll use them anyway! Lets learn how.
[Documentation][Video]
Lesson YQuest9 - Per pixel movement on the Amiga and Atari ST [AMI] [AST]
The Amiga + Atari ST store data in bitplanes... one byte contains 8 pixels... Our old code wasn't smart enough to allow our 8x8 sprite to be 'half on' a byte - so our movement was jerky... lets improve the code and make the movement smooth!
[Documentation][Video]
Lesson YQuest10 - Hardware sprites on the Genesis [GEN]
We got Yquest working before with tilemap graphics, but that's not really enough! Lets extend Yquest and use hardware sprites.
[Documentation][Video]
Lesson YQuest11 - NeoGeo Hardware Sprites [NEO]
Let's look at the NeoGeo... we'll use the Fix Layer to draw graphics to the screen. We need to define our tile bitmaps in the XML file - as they are defined by ROM.
[Documentation][Video]
Lesson YQuest2 - x68000 Specific code [X68]
The x68000 version was the first port of the game on the 68000. its a bitmap based system, with software sprites, and a simpler screen layout than the AtariST or Amiga.
[Documentation][Video]

Photon Series

In this series I make a classic 'Tron' game... this series teaches Pixel plotting and line drawing on all systems

Lesson Photon1 - Introduction and Data Structures
No Description Available
[Documentation][Video]
Lesson Photon2 - Atari ST- ASM PSET and POINT for Pixel Plotting
No Description Available
[Documentation][Video]
Lesson Photon3 - Amiga - ASM PSET and POINT for Pixel Plotting
No Description Available
[Documentation][Video]
Lesson Photon4 - Sharp x68000 - ASM PSET and POINT for Pixel Plotting
No Description Available
[Documentation][Video]
Lesson Photon5 - Sinclair QL - ASM PSET and POINT for Pixel Plotting
No Description Available
[Documentation][Video]
Lesson Photon6 - Genesis / Megadrive - ASM PSET and POINT for Pixel Plotting
No Description Available
[Documentation][Video]
Lesson Photon7 - NeoGeo - ASM PSET and POINT for Pixel Plotting
No Description Available
[Documentation][Video]