English Amiga Board


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

 
 
Thread Tools
Old 10 May 2019, 18:11   #21
Hewitson
Registered User
 
Hewitson's Avatar
 
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,771
The problem is, what you want to do is far from simple. I think you really underestimate how difficult it is to code a demo or game. Out of thousands who try only a few succeed.
Hewitson is offline  
Old 10 May 2019, 20:43   #22
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,209
Quote:
Originally Posted by Hewitson View Post
The problem is, what you want to do is far from simple. I think you really underestimate how difficult it is to code a demo or game. Out of thousands who try only a few succeed.
Utter nonsense....

I learned very quickly in 1990 from just 2 books... the Hardware Reference Manual, and the System Programmers Guide.

Most of the first steps in Amiga programming (setting up a copper-list, bitplanes etc..) can be accomplished with only a very basic "sub-set" of 68000 instructions (primarily the MOVE instructions)

Take baby steps... start simple.. and then explore...
DanScott is offline  
Old 10 May 2019, 23:45   #23
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
Many people on this forum have helped me massively in my own quest to make games and achieve something I thought was beyond me.

I joined the board on 31 October 2017 after 25 years of not really touching an Amiga or assembler... one of the first bits of code I created with Devpac was to draw a simple picture to the screen.

Here is that assembler.... (yes it's shit)

http://www.seismicminds.com/downloads/disp1.s

and the required image....

http://www.seismicminds.com/downloads/bombjack.iff

As Dan says.... take small steps, experiment with others code.. change the code, try and understand what it does, before long you will start to break down barriers and it will begin to click.

2 years on and I've learned so much, and even in another 2 years I'll probably not know as much as some of the coders here have forgotten, but we all must start somewhere.

Below is the thread that got me started back into the Amiga, if you want I am happy to upload all of the early source files for you to experiment with, I would caveat it though in that I made lots of mistakes.... the biggest one being not using memory management.... ALWAYS USE MEMORY MANAGEMENT.

http://eab.abime.net/showthread.php?t=89271


Edit... If you want to make games... an understanding of the principles of Object Orientated Programming will be a massive help.

Last edited by mcgeezer; 10 May 2019 at 23:47. Reason: OOP
mcgeezer is offline  
Old 10 May 2019, 23:55   #24
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,986
Quote:
Originally Posted by DanScott View Post
Utter nonsense....

I learned very quickly in 1990 from just 2 books... the Hardware Reference Manual, and the System Programmers Guide.

Most of the first steps in Amiga programming (setting up a copper-list, bitplanes etc..) can be accomplished with only a very basic "sub-set" of 68000 instructions (primarily the MOVE instructions)

Take baby steps... start simple.. and then explore...
I think your progression was one of the more drastic, as I remember you as primarily a graphics artist before you became a coder,
Galahad/FLT is online now  
Old 11 May 2019, 10:40   #25
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,160
The main problem is often time. When you have a full-time job already it's difficult to put in extra effort to learn a completely different topic.

I remember in 1991 I had my amiga I wanted to do something with it beside games. Someone gave me a copy of some Micro application asm book, and I bought Action Replay MKIII (excellent investment) to crack games (I already knew 6502 asm & C)

I also got hold of the amiga bible (translated in french, that helped at the time), comprehensive book about custom chips & CIAs

I was young, no children, a lot of time on my hands. Certainly helped.

That said, I never got into proper game coding. I "just" coded an emulator then JST & all the hd game stuff.

It's difficult to want to embrace all the goals at the same time though: a game is complex: there are graphics, level design, sound, file I/O, controls, tasks, interactions with the OS... you can't learn all that in one day. One step at a time as Dan said.

And even mcgeezer admitted that he shouldn't have written Rygar in asm. Better do a mix of C & asm. C does the tedious loading/organizing/hiscore/computation parts that don't require too much speed. asm does the "fast" parts.

note that a lot of games are coded in C only. They're not the fastest, but still... (Marble Madness, Cinemaware games, Lucas Arts, Sierra)
jotd is offline  
Old 11 May 2019, 15:37   #26
deimos
It's coming back!
 
deimos's Avatar
 
Join Date: Jul 2018
Location: comp.sys.amiga
Posts: 762
My recommendation would be to spend some time with a good disassembler. Find a bit of code to analyse that's big enough to be interesting and start adding labels and comments until you end up with a fully documented piece of code that you understand well. Then improve it. If it wasn't originally written in optimised assembly then optimise it. Rinse and repeat until you've reached the level you're looking for.

Another similar suggestion, if you're comfortable with C, would be to write something in C, make it feature complete, then find the handful of functions that are "hotspots" and rewrite them in assembler. You can even start with the compiler generated assembly to give you a working, if non-optimal, starting point.
deimos is offline  
Old 11 May 2019, 16:40   #27
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,209
Quote:
Originally Posted by deimos View Post
My recommendation would be to spend some time with a good disassembler. Find a bit of code to analyse that's big enough to be interesting and start adding labels and comments until you end up with a fully documented piece of code that you understand well.
This actually requires a more serious knowledge of assembler though...

I believe that the OP is starting from scratch with learning 68k
DanScott is offline  
Old 11 May 2019, 18:15   #28
nogginthenog
Amigan
 
Join Date: Feb 2012
Location: London
Posts: 1,309
On the bright side 68000 assembly probably has one of the easiest syntaxes to learn. It has a very orthogonal instruction set (even if it's the assembler that's doing the work).

Many CPUs have specialised registers but on the 68000 you often don't care (apart from the address/data register split). Lots of registers too!
nogginthenog is offline  
Old 13 May 2019, 10:27   #29
zero
Registered User
 
Join Date: Jun 2016
Location: UK
Posts: 428
With 68k you can do a lot with a small number of instructions. You only really need the more obscure ones when you start optimizing.

The biggest pain is the toolset itself. WinUAE helps a lot with the build-in debugger, even if it's not the most friendly. But stuff like cross-development with a source level debugger doesn't exist.

Also it's easy to crash the machine and there are no exceptions when you have a bad pointer, so you have to get good at debugging stuff with minimal help.

Not even a decent modern C compiler... So you have to struggle at first.

Some kind of cross development system would be very helpful I think. I saw one for the Megadrive (also 68k based) which was kinda like an Action Replay but connected to a PC, so you could single step and debug at source level and see the results in real-time.

Might be possible with an A500, or with WinUAE.
zero is offline  
Old 13 May 2019, 10:35   #30
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
WinUAE does let you single step through code. Though if you're running with the OS it will show you the code from interrupts as well as they happen. Which might be confusing for a beginner.

But you hit the nail on the head: one of the biggest challenges with assembly language is the lack of 'help' the system/assembler/etc give you. Even in the best case it can still be difficult to pinpoint errors.

Last edited by roondar; 13 May 2019 at 11:45.
roondar is offline  
Old 13 May 2019, 10:38   #31
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
I use WinUAE, Notepad++ with VASM.

I have notepad++ configured like below...

If I press shift+F10 I can build a project in under 1 second.
If I press shift+F11 I can test a project... takes about 2 seconds with Warp mode
If I press shift+F12 I can debug the project with MonAm hooked

It's an extremely fast tool chain and works really well for all of my needs.
mcgeezer is offline  
Old 13 May 2019, 11:21   #32
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,209
Quote:
Originally Posted by zero View Post

Some kind of cross development system would be very helpful I think. I saw one for the Megadrive (also 68k based) which was kinda like an Action Replay but connected to a PC, so you could single step and debug at source level and see the results in real-time.

Might be possible with an A500, or with WinUAE.
SNASM was a pretty useful cross development system back in the days of Amiga game development... the debugging was great!
DanScott is offline  
Old 13 May 2019, 14:23   #33
kasio
Registered User
 
kasio's Avatar
 
Join Date: Jan 2011
Location: Stockholm
Posts: 40
I quite enjoyed this beginners introduction to 68k asm:
http://mrjester.hapisan.com/04_MC68/
kasio is offline  
Old 13 May 2019, 14:40   #34
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
Quote:
Originally Posted by DanScott View Post
SNASM was a pretty useful cross development system back in the days of Amiga game development... the debugging was great!

I remember some Amiga demo mentioning it probably being the first developed using snasm on a 386 - might even have been an Anarchy demo
hooverphonique is offline  
Old 13 May 2019, 15:01   #35
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,209
Quote:
Originally Posted by hooverphonique View Post
I remember some Amiga demo mentioning it probably being the first developed using snasm on a 386 - might even have been an Anarchy demo
Could even have been Anarchy - Seeing Is Believing... that I coded
DanScott is offline  
Old 13 May 2019, 15:18   #36
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Quote:
Originally Posted by zero View Post
But stuff like cross-development with a source level debugger doesn't exist.

Yes it does exist with Visual Studio Code and this extension: https://github.com/prb28/vscode-amiga-assembly .

prb28 is offline  
Old 13 May 2019, 20:56   #37
nogginthenog
Amigan
 
Join Date: Feb 2012
Location: London
Posts: 1,309
Quote:
Originally Posted by zero View Post
Not even a decent modern C compiler... So you have to struggle at first.
Bebbos GCC (6.x?) cross compiler is good.
https://github.com/bebbo/amiga-gcc

There was some talk of a LLVM/CLANG port (was it the Rust guys?)
nogginthenog is offline  
Old 14 May 2019, 02:32   #38
turrican3
Moon 1969 = amiga 1985
 
turrican3's Avatar
 
Join Date: Apr 2007
Location: belgium
Age: 48
Posts: 3,913
Quote:
Originally Posted by Ami View Post
I've read dozens of asm books but I learned nothing, until I've read this -> http://chaozer.ikod.se/asmtut.shtml. But this is only step 1, you need step 2, so I would recommend one of the suggestions above, especially look for something which teach you asm+os coding. Good luck!
Thank you,
i hope it will help everyone, i'm sure i'm not alone to try to code in ASM.
Every amigans should try, we need more tools, more games, etc...
Thank you guys.
turrican3 is offline  
Old 14 May 2019, 10:24   #39
zero
Registered User
 
Join Date: Jun 2016
Location: UK
Posts: 428
Quote:
Originally Posted by DanScott View Post
SNASM was a pretty useful cross development system back in the days of Amiga game development... the debugging was great!
That's the kind of thing we want but in WinUAE. Source level debugging, very fast.
zero is offline  
Old 14 May 2019, 13:36   #40
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
Ah, that'd be the holy grail really.
I love the WinUAE debugger, but source level debugging would be the bee's knees.
roondar 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
Tool to convert asm to gnu asm (gas) Asman Coders. Asm / Hardware 13 30 December 2020 11:57
Learning C nobody Coders. C/C++ 28 15 June 2016 08:07
I need help with my intro... I´m learning... Skillion76 Coders. General 10 27 September 2014 17:36
Wanting to start learning to code amiga in asm fishyfish Coders. Asm / Hardware 5 03 March 2012 06:11
Help needed!!Random octal numbers generator(asm) sheryn88 Coders. General 6 01 August 2010 07:19

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 11:56.

Top

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