Windows toolkit for Spectrum Assembly?

The place for codemasters or beginners to talk about programming any language for the Spectrum.
Post Reply
YanKleber
Drutt
Posts: 20
Joined: Mon Nov 19, 2018 6:06 pm
Location: Brasil (Somewhere in the mountains)

Windows toolkit for Spectrum Assembly?

Post by YanKleber »

If I am going to code in Assembly for the Spectrum 48, what would be the starter kit for Windows? Thanks!

PS: I do NOT have a Spectrum.

:geek:
Yeah, I'm a berk.
User avatar
Cosmium
Microbot
Posts: 156
Joined: Tue Dec 04, 2018 10:20 pm
Location: USA

Re: Windows toolkit for Spectrum Assembly?

Post by Cosmium »

I found the easiest entry to Spectrum assembly programming on the PC is via the ZX Spin emulator.

You can simply start it up, go to the menu item Tools > Z80 Assember, then type in your assembly listing into the window that appears, e.g.:

ORG 32768

LD HL,16384
LD (HL),42
RET

Then File > Assemble. Click OK, and your code is now assembled to the ORG location specified.

From Spectrum BASIC type in RANDOMISE USR 32768 to test your code.

There's also a capable disassembler available from the Tools menu too :)

Personally I found ZX Spin a lot easier to get right into than heavy hitters like Zeus but I know others love that!

For bigger projects, once you progress, you can use a dedicated source code editor and set it up to assemble with one key press using, say, Pasmo, then output a .TAP file to run straight away in an emulator for testing.

But I think ZX Spin is the easiest "starter kit" to get right into programming and seeing results without a steep learning curve.
User avatar
djnzx48
Manic Miner
Posts: 730
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Re: Windows toolkit for Spectrum Assembly?

Post by djnzx48 »

Try one of these maybe.

http://hype.retroscene.org/blog/dev/946.html
https://dotneteer.github.io/spectnetide/

Or use a standard text editor + batch file and assembler.
User avatar
Joefish
Rick Dangerous
Posts: 2057
Joined: Tue Nov 14, 2017 10:26 am

Re: Windows toolkit for Spectrum Assembly?

Post by Joefish »

I use Crimson Editor to write Z80 code. You can program its function keys to:
1. Run PASMO assembler on the command line, which can create a .TAP file with a BASIC loader.
2. Launch the .TAP in ZXSpin.
User avatar
Alessandro
Dynamite Dan
Posts: 1910
Joined: Wed Nov 15, 2017 11:10 am
Location: Messina, Italy
Contact:

Re: Windows toolkit for Spectrum Assembly?

Post by Alessandro »

I would avoid the ZX Spin Z80 Assembly editor if I were you, it is buggy and sometimes cannot assemble standard Z80 code properly.

I write the code with Notepad++ and then assemble it with Pasmo (version 0.5.4.beta2; 0.6.0 is an experimental version and it can also give you troubles) with the aid of a simple batch file:

Code: Select all

@echo off
pasmo --name %1 --tap %1.asm %1.tap 
Finally, it is not a problem if you do not own a genuine Spectrum, or even a clone (I see you are from Brazil, land of the TK90X and TK95 :)) other than if you wish to test your programs on it. These days, nobody in their right mind would ever code on the actual target hardware - major software houses didn't even do this back in the day ;)
YanKleber
Drutt
Posts: 20
Joined: Mon Nov 19, 2018 6:06 pm
Location: Brasil (Somewhere in the mountains)

Re: Windows toolkit for Spectrum Assembly?

Post by YanKleber »

Thank you very much you all, I'll check this tools out!

:)
Yeah, I'm a berk.
YanKleber
Drutt
Posts: 20
Joined: Mon Nov 19, 2018 6:06 pm
Location: Brasil (Somewhere in the mountains)

Re: Windows toolkit for Spectrum Assembly?

Post by YanKleber »

Alessandro wrote: Wed Nov 13, 2019 9:30 am I would avoid the ZX Spin Z80 Assembly editor if I were you, it is buggy and sometimes cannot assemble standard Z80 code properly.

I write the code with Notepad++ and then assemble it with Pasmo (version 0.5.4.beta2; 0.6.0 is an experimental version and it can also give you troubles) with the aid of a simple batch file:

Code: Select all

@echo off
pasmo --name %1 --tap %1.asm %1.tap 
Finally, it is not a problem if you do not own a genuine Spectrum, or even a clone (I see you are from Brazil, land of the TK90X and TK95 :)) other than if you wish to test your programs on it. These days, nobody in their right mind would ever code on the actual target hardware - major software houses didn't even do this back in the day ;)
Thank you so much for this. Yeah, I am from Brasil. I had a genuine TS-2068 in 1984 and since then I never had any other Sinclair machine (not even a TK90x or a TK95!). Nowadays I have a non-working replica of a TS-2068 that I built myself a couple months ago, and I don't have the intention to buy one of those computers. This is the advantage of live in 21 century and have a lot of powerful computers around capable of emulate those gems! My idea here is just to code and perhaps produce something that may be cool for someone else.

I am a programmer by career and have been a prolific game coder in the past decade (wrote over 200 games) in Flash environment. Now to do the same in pure Assembly is something completely new for me! This is exciting but I confess that I am afraid of a possible big frustration!

:roll:
Yeah, I'm a berk.
User avatar
Joefish
Rick Dangerous
Posts: 2057
Joined: Tue Nov 14, 2017 10:26 am

Re: Windows toolkit for Spectrum Assembly?

Post by Joefish »

Retro Virtual Machine seems to have a pretty good debugger and memory monitoring tools.
I like how you can monitor both the visible and hidden screens of a 128K machine in separate windows.
I haven't tried its assembler yet though.

https://www.retrovirtualmachine.org/en/
Ralf
Rick Dangerous
Posts: 2282
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: Windows toolkit for Spectrum Assembly?

Post by Ralf »

I am a programmer by career and have been a prolific game coder in the past decade (wrote over 200 games) in Flash environment. Now to do the same in pure Assembly is something completely new for me! This is exciting but I confess that I am afraid of a possible big frustration!
Be prepared that in assembler you are buliding everything yourself from the very small bricks.

In higher level languages you may have simply a command DrawSprite(spriteNr,X,Y) and that's all.

In assembler drawing a sprite means copying a set of bytes from one location to another and you have to deal with each byte in a loop. Your instructions are: read a byte from memory to register, increase register, copy a register value to memory etc.

The first big wall you are going to bump into almost instantly is organisation of ZX Spectrum display screen in memory. If you hope that it's just byte after byte, line after line then you may be quite negatively surprised ;)

But don't give up and don't be afraid to ask questions here. We try to be friendly and helpful to anybody willing to learn about Speccy.
YanKleber
Drutt
Posts: 20
Joined: Mon Nov 19, 2018 6:06 pm
Location: Brasil (Somewhere in the mountains)

Re: Windows toolkit for Spectrum Assembly?

Post by YanKleber »

Ralf wrote: Thu Nov 14, 2019 2:03 pm The first big wall you are going to bump into almost instantly is organisation of ZX Spectrum display screen in memory. If you hope that it's just byte after byte, line after line then you may be quite negatively surprised ;)
If I am not mixing things up, I remember to have read somewhere that the columns are sequential but rows are chunked in thirds (or vice-versa)... something like that... and that it may turn things very complicated. :?
Yeah, I'm a berk.
User avatar
Morkin
Bugaboo
Posts: 3265
Joined: Mon Nov 13, 2017 8:50 am
Location: Bristol, UK

Re: Windows toolkit for Spectrum Assembly?

Post by Morkin »

YanKleber wrote: Tue Nov 12, 2019 11:31 pm PS: I do NOT have a Spectrum.
Image

:lol:

...Just joking - good luck with the development of your game. :)

I started learning assembly with ZX Spin as it's a low barrier to getting started, but if you're an experienced developer proficient in other languages you'll be at home and probably prefer the other tools and combinations suggested.

Always interesting to see modern game design being brought to the humble Speccy. One good thing is that unlike many games released in the 80s, modern Speccy games occasionally let me to get off the first screen/level... ;)
My Speccy site: thirdharmoniser.com
YanKleber
Drutt
Posts: 20
Joined: Mon Nov 19, 2018 6:06 pm
Location: Brasil (Somewhere in the mountains)

Re: Windows toolkit for Spectrum Assembly?

Post by YanKleber »

Morkin wrote: Thu Nov 14, 2019 8:33 pm ...Just joking - good luck with the development of your game. :)

I started learning assembly with ZX Spin as it's a low barrier to getting started, but if you're an experienced developer proficient in other languages you'll be at home and probably prefer the other tools and combinations suggested.

Always interesting to see modern game design being brought to the humble Speccy. One good thing is that unlike many games released in the 80s, modern Speccy games occasionally let me to get off the first screen/level... ;)
LoL, I loved the joke!

I have almost 40 years of background coding, but always in hi-level languages. I remember to have attended a class of Assembler Z80 in the middle of the 1980s but I didn't moved forward and never wrote any code other than the class exercises.

Funny is that regardless I had coded so many games, I am not a gamer myself. I had a small spoon of curiosity about games but my problem is that I get bored very easily, so long games are a turn off for me. Maybe because this all the games I wrote were all small, simple and very straightforward ones. Let's see what happens in the next!

;)
Yeah, I'm a berk.
User avatar
g0blinish
Manic Miner
Posts: 282
Joined: Sun Jun 17, 2018 2:54 pm

Re: Windows toolkit for Spectrum Assembly?

Post by g0blinish »

How about this one?
User avatar
R-Tape
Site Admin
Posts: 6394
Joined: Thu Nov 09, 2017 11:46 am

Re: Windows toolkit for Spectrum Assembly?

Post by R-Tape »

g0blinish wrote: Sat Nov 16, 2019 8:30 am How about this one?
Don't know why, but when you miss out the "http://" from the link, the forum adds a spectrumcomputing.co.uk/forums/ prefix. Fixed ^above^.
Post Reply