English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 10 March 2013, 16:28   #1
Vikke
Registered User
 
Join Date: Feb 2013
Location: Lovisa / Finland
Age: 47
Posts: 80
First tutorial on ASM- and HW-coding

So, let's see if there is any real interest in tutorials about coding the Amiga - the old way.

Assembled with ASM-ONE v1.20 and only tested on WinUAE at the moment.

The first code is about "copperbars", nothing really fancy, but I have to start somewhere, and nothing is more Amiga than copperbars.


The site: vikke.net


Many other codesnippets are planned, if people are interested in reading such things.

It is possible to download an LHA-package with all files (asm source, executable and resources)

Any questions regarding the code, or related things?
Vikke is offline  
Old 10 March 2013, 19:11   #2
BippyM
Registered User

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 43
Posts: 8,642
Yes very interested, but I think you need to start earlier with tutorials
BippyM is offline  
Old 10 March 2013, 19:23   #3
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 786
kudos for the initiative, but maybe the resources would be better spent digging up and rating such tutorials from the past!? there's lot's of them in old disk mags, etc...
hooverphonique is offline  
Old 10 March 2013, 19:48   #4
Vikke
Registered User
 
Join Date: Feb 2013
Location: Lovisa / Finland
Age: 47
Posts: 80
Quote:
Originally Posted by hooverphonique View Post
kudos for the initiative, but maybe the resources would be better spent digging up and rating such tutorials from the past!? there's lot's of them in old disk mags, etc...
Perhaps, but this is my way of doing this. Somebody else can gather old tutorials.
You can read about my motives here: http://amigaworld.net/modules/newbb/...37325&forum=15
Vikke is offline  
Old 10 March 2013, 19:52   #5
BippyM
Registered User

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 43
Posts: 8,642
I'll go into more detail:

If you are doing tutorials then you should assume the person wanting to learn has very little asm knowledge, and build up from that.

Your first tutorial assumes the person reading has knowledge of both asm and the Amiga hardware. It would be better with something much simpler like opening a screen, then displaying a copper, then displaying a picture logo etc and build on it.

Be prepared to answer lots of questions too

I think the website design is great and your source has plenty of commenting
BippyM is offline  
Old 10 March 2013, 19:56   #6
Vikke
Registered User
 
Join Date: Feb 2013
Location: Lovisa / Finland
Age: 47
Posts: 80
Quote:
Originally Posted by bippym View Post
Yes very interested, but I think you need to start earlier with tutorials
You mean like more basic stuff regarding assembler coding? I could do a tutorial as simple as possible, if wanted.
Vikke is offline  
Old 10 March 2013, 20:21   #7
BippyM
Registered User

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 43
Posts: 8,642
There are a few members here who would like to learn asm, but it needs to be done properly.

I'm sure there'll be a few more replies
BippyM is offline  
Old 10 March 2013, 20:23   #8
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 19,265
I am very interested but I need to be walked along teh basics. I can read a bit of ASM and can do some 6502 ASM but that's it.
Akira is offline  
Old 10 March 2013, 20:38   #9
BippyM
Registered User

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 43
Posts: 8,642
Vikke, I have downloaded notepad++. Where can I get the syantax higlighting you are using??
BippyM is offline  
Old 10 March 2013, 21:04   #10
Vikke
Registered User
 
Join Date: Feb 2013
Location: Lovisa / Finland
Age: 47
Posts: 80
I can try to make an introductory to MC68000 assembly and a little about how to set up the display and such things.

Of course all of this is available in books already, but I know the books aren't the easiest to read. The original Amiga Hardware reference Manual is a very good starting point for learning how the original Amigas worked and how to use them in your code.

But, as I said, I will try to make introductory chapters into MC68k ASM and the Amiga hardware registers, with examples.
I will be doing these simultaneously as I continue with other demoeffects. So there is going to be something for everyone.

Nice to know there are people interested in this.
Vikke is offline  
Old 10 March 2013, 21:05   #11
pmc
rebooting...
pmc's Avatar
 
Join Date: Apr 2007
Location: Elsewhere
Posts: 1,595
All I'll say on this is don't confuse having source codes with learning assembly language coding. Source codes are how somebody else would do something, not how you would do it.

If source codes were the answer to the question "how can I be a coder" then that question wouldn't need answering any more - there are already lots of source codes available all over the place. There's even a few I've posted

There are, in my opinion, several fundamental things that source codes won't help you with in any way, shape or form, namely:

Independent thought. Taking time, sitting down and thinking how to solve something in code can only be done by taking time, sitting down and thinking. Nothing else.

Experience. Actually writing code, getting it wrong, working out why, fixing it, trying something else, over and over is the only real way to learn - from your own mistakes.

Time. There are no shortcuts. I would say going from complete beginner to confidently tapping out good clean, compact, decently optimised code that you're pretty sure will work first time takes at least two years of good solid effort ie. not five minutes of playing around with a bit of code here and there.

Even doing all of the above more difficult stuff still might not make you a brilliant coder - I've done all the things I said and I'm still nothing more than solid but average.

Anyway, just my tuppence on the actual process of learning.

Regardless, kudos to you Vikke for making the effort to get a resource like this together
pmc is offline  
Old 10 March 2013, 21:27   #12
Vikke
Registered User
 
Join Date: Feb 2013
Location: Lovisa / Finland
Age: 47
Posts: 80
bippym,

Notepad++ doesn't have a syntax highlighter for MC68k ASM, I'm using Sublime Text 2 for that. I found this: https://github.com/stevenjs/M68k-Assembly for Sublime Text 2.

There is a syntaxhighlighter for Notepad++, but it needs a little work to be usable. I'll try to do something to it.
Vikke is offline  
Old 10 March 2013, 21:29   #13
BippyM
Registered User

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 43
Posts: 8,642
pmc,

I agree totally and that isn't what I am suggesting here. I am saying that to "Teach" requires more than source code. It requires explanation, examples and ensuring your audience understands.

I think "teaching" something and then setting a task to fulfill is the way to learn!
BippyM is offline  
Old 10 March 2013, 21:35   #14
Vikke
Registered User
 
Join Date: Feb 2013
Location: Lovisa / Finland
Age: 47
Posts: 80
pmc,

Of course learning to code in assembly isn't the easiest of things. And time is something you have to spend, and "trial-and-error" is the best of methods to learn things.

I didn't set out to make a course in how to do code, at first I just wanted to make a demo or two, the oldskool way. But, now this has taken a different route.

I try to keep the sources as short as possible for others to be able to find something of interest in them, and also with a lot of remarks in the source. As I wrote earlier I'll try to make some kind of tutorials for how to start coding on the Amiga.
Vikke is offline  
Old 10 March 2013, 21:51   #15
BippyM
Registered User

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 43
Posts: 8,642
I've already started it, and have most of the hardware names in.

It has some issues and limitations which I will post on the notepad++ forums.

Here is a screenshot
Attached Thumbnails
Click image for larger version

Name:	Amiga_notepad.png
Views:	313
Size:	74.1 KB
ID:	34616  
BippyM is offline  
Old 10 March 2013, 22:29   #16
Vikke
Registered User
 
Join Date: Feb 2013
Location: Lovisa / Finland
Age: 47
Posts: 80
Quote:
Originally Posted by bippym View Post
I've already started it, and have most of the hardware names in.

It has some issues and limitations which I will post on the notepad++ forums.

Here is a screenshot
Well, it seems its not easy to get a working syntax highlighter for Notepad++ in its current stage. It doesn't understand hex- or binarynumbers. Also a lot mor should be possible to do with delimiters. It seems Sublime Text does utilize regexp for the highlighter engine.
Vikke is offline  
Old 10 March 2013, 23:39   #17
demolition
Unregistered User
demolition's Avatar
 
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 38
Posts: 3,696
I started working a bit with 68k ASM a few months ago, and was also looking for some good tools, and I came across this:
http://www.pouet.net/topic.php?which=8593&page=1

It's a crosscompiler for C/ASM with automatic execution in WinUAE. Very straightforward setup for anyone who wants to start coding. It even has a project file for VS2010, although I'm guessing the syntax highlighting in there will not work with 68k ASM?
demolition is offline  
Old 11 March 2013, 00:13   #18
Lonewolf10
AMOS Extensions Developer
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 39
Posts: 1,919
Quote:
Originally Posted by pmc View Post
All I'll say on this is don't confuse having source codes with learning assembly language coding. Source codes are how somebody else would do something, not how you would do it.

If source codes were the answer to the question "how can I be a coder" then that question wouldn't need answering any more - there are already lots of source codes available all over the place. There's even a few I've posted
I have a collection of stuff (some example, demo code and game code from various people) that I use to help guide myself where necessary, but I much prefer to write my own code (even if it is less efficient) as it helps me learn as I go along


Vikke, I will certainly be checking out your site.
Lonewolf10 is offline  
Old 11 March 2013, 13:16   #19
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 19,265
Notepad++ 68k asm highlighting available here:
http://sourceforge.net/apps/mediawik...Language_Files
Akira is offline  
Old 11 March 2013, 13:22   #20
BippyM
Registered User

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 43
Posts: 8,642
Akira,

I have taken that one and added highlighting for the Amiga chipset access.

The problem comes with the registers not being highlighted for example

Code:
move. l d0, d1
Will highlight correctly, but

Code:
move.l d0,d1
Will not due to the comma not having a space.

I will upload the file for highlighting once it's finished

Last edited by BippyM; 10 July 2013 at 22:56.
BippyM is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
4th tutorial on ASM- and HW-coding Vikke Coders. Asm / Hardware 11 10 April 2013 20:32
3rd tutorial on ASM- and HW-coding Vikke Coders. Asm / Hardware 6 26 March 2013 15:57
2nd tutorial on ASM- and HW-coding Vikke Coders. Asm / Hardware 10 17 March 2013 11:49
REQ: AF 115 (C Coding Tutorial) quenthal AMR suggestions and feedback 2 23 July 2007 14:08
Help coding alexh Coders. General 14 15 August 2006 09:24

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 18:25.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.08987 seconds with 14 queries