Crap 0.1 first assembly project

Show us what you're working on, (preferably with screenshots).
User avatar
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Crap 0.1 first assembly project

Post by Nomad » Fri Mar 09, 2018 8:23 am

Day 67, 300 days left!

What have I been up to? Re-learning grafx2. :lol: Why? Because I am a potato and its much easier for me to use something that is the spiritual successor to deluxe paint than try and get my head round these other pixel editors. I just always found it much easier to use.

Besides that - been in a fruitless search for a flexable source editor i can use on the actual +3 (or emulator), paired with a assembler so I could develop my technical demos without having to stop using the emulator. Kind of the same thing that I do with the Atari. (Everything is contained, I use MEDIT for writing the source and AMAC to assemble the source listing, i then debug it all with AMOEBA. All this runs on the Atari 800 so I can write, assemble and test & debug without leaving the emulator.)

I wanted this for the spectrum but I have been hitting a dead end with crappy applications. I get the feeling most of the serious development must have been done on other microcomputers or PCs. Nobody would have seriously used these assemblers.. :lol: But it was worth a shot I figure. Ya never know till you try.

Devpac - sucks. :lol: Compaired to the professional Atari assemblers.

Still - I have one other avenue to explore...

Pentagon baby! If there was going to be a powerful development program that would be designed from the jumpstart to be run on the actual system it was going to target. Would logically be this. Plus because a lot of the software would have be refined in the early 90s you should have the more modern application design ideas present.

Well I got Prometheus 128 to have a look at, will play with that and see whats up. Hopefully its easier to use than devpac was.

Found a new disk magazine on spectrum computing thread that was very interesting. This was pretty much last nights project time. Aside from that I have been playing around with my double sided Maxwell disk :lol:

This is just a random thing - but my memory is not the best and trying to remember the spectrum keyboard template is a pain in the butt. It makes using the emulators so much more difficult. Why can't you just type using the pc keyboard?

I read the +3 manual again. That and the little tutorials retro coder put on youtube are nice.

Plan for today's project time is stringing together a template for a self loading +3 disk. With a loading screen, menu and a game screen.
0 x

User avatar
RMartins
Manic Miner
Posts: 328
Joined: Thu Nov 16, 2017 3:26 pm

Re: Crap 0.1 first assembly project

Post by RMartins » Fri Mar 09, 2018 11:01 am

When I started developing SteelBall, I started using Zeus, and I can assure you that it has a very nice workflow.
You edit some assembler, then assemble it, and execute it.

Just be sure that you know what you are doing, since a BAD error, might destroy/corrupt your source code that is also in memory.
You can always exit out of Zeus, and SAVE as usual in BASIC.

I stopped using it, when I reached the limit of memory, where I had about 20K assembly source code,plus the assembled output, plus the Zeus app running.
It would be possible to continue working using Zeus, like in the old days, but I would have to split the code base in chunks so that it would be possible to compile in blocks, so that everything would fit in memory at compile time. This approach would also require concatenating the result blocks into a single file for loading.
Time constraints prevented me to continue like that, so I switched to using Pasmo on a PC, and cross compiles for ZX.

Resuming, it surely is possible to build stuff with the tools from that time.
Last edited by RMartins on Fri Mar 09, 2018 11:42 am, edited 1 time in total.
1 x

User avatar
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Crap 0.1 first assembly project

Post by Nomad » Fri Mar 09, 2018 11:31 am

The thing that frustrates me the most about the spectrum emulators is the token keyboard layout. This makes sense when you can actually see the tokens. Not so much on a PC keyboard. But then that is another inexplicable choice for most emulators.

I looked at Zeus but it uses line numbers, plus there is the memory restriction as you say..

Will just stick with PC zeus/pasmo till someone figures out how to design a spectrum emulator interface that relates to the PC keyboard layout. :lol:

Were i enamored with the use of arcane/obscure keybindings I would just use emacs :lol:

That is one of the infuriating things about fuse is it forces you to remember key combinations, then when you try and look up the keyboard help its the size of a postage stamp on the screen. It's like the program is trolling you. First it forces you to use a keyboard layout for a keyboard you don't have - then when you go to look up the tokens its impossible to check. :lol:
0 x

User avatar
RMartins
Manic Miner
Posts: 328
Joined: Thu Nov 16, 2017 3:26 pm

Re: Crap 0.1 first assembly project

Post by RMartins » Fri Mar 09, 2018 11:51 am

Nomad wrote:
Fri Mar 09, 2018 11:31 am
The thing that frustrates me the most about the spectrum emulators is the token keyboard layout. This makes sense when you can actually see the tokens. Not so much on a PC keyboard. But then that is another inexplicable choice for most emulators.
...
That is not a problem of the emulators, since they are actually emulating the behaviour of the machine.

If that is a problem, which I understand it is when programming, then the best solution, is to use a different ZX ROM, that provides that feature, like a 128K ROM or for 48K you can use The Gosh Wonderfull ROM
1 x

User avatar
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Crap 0.1 first assembly project

Post by Nomad » Fri Mar 09, 2018 11:58 am

I tried the Gosh Wonderful rom, ok It took out the tokenizer but you still have the problem that the " $#@ type characters are still in the wrong place.

But granted its 1/2 the problem fixed.

RMartins, thanks for all of the info - I didn't know about this useful rom until now. Appreciate the assist.
0 x

User avatar
RMartins
Manic Miner
Posts: 328
Joined: Thu Nov 16, 2017 3:26 pm

Re: Crap 0.1 first assembly project

Post by RMartins » Fri Mar 09, 2018 7:28 pm

Nomad wrote:
Fri Mar 09, 2018 11:58 am
...
RMartins, thanks for all of the info - I didn't know about this useful rom until now. Appreciate the assist.
You are welcome ;)

You can also program on the real machine, using a DivMMC or similar, to help out on the LOAD/SAVE part of things :D
I did that for a few days :mrgreen:

Or eventually use a Spectrum Next (board), if you have one.
1 x

User avatar
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Crap 0.1 first assembly project

Post by Nomad » Sat Mar 10, 2018 1:55 am

Yea that would be really neat :lol:

I doubt much is going to get done project wise today as I discovered schism tracker last night.

Ever since milkytracker decided it didn't want to work on my computer anymore I been at a loose end for a modern tracker for a few months now. I tested a few but none were very easy for me to work with. This one was pretty intuitive.
0 x

User avatar
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Crap 0.1 first assembly project

Post by Nomad » Sat Mar 10, 2018 5:52 pm

My entry to the April 23 comp..

I decided to do a utility program that would give various calculations that are useful in simulation.

Here we can see one of the programs - it calculates the equivalent megatonnage of a weapon system on a soft target.

The calculation is simple

EMT = N * Y2/3

where EMT = equivalent megatonnage of a weapon system on a soft target
N = Number of re-entry vehicles or bombs carried.
Y = Yield of each bomb or re-entry vehicle in megatons.

Image

Image

Image

You can see there is a little bit of work to be done with the interface :lol: . I was kind of torn on doing it in assembly language.. I figured get it working in basic then think about if its worth it in assembly...

You get some weird rounding errors if you try and input a megatonne value that is too high. (for example a tsar bomba type ( 1 bomb, 50.00) ).. Stick to kiloton yields / low megatonne (so 0.01 - 5.0 seems to work ok).

Try the SS-18 Satan Mod 2 stats..

8 re-entry vehicles
0.5 megatonne yield.
0 x

User avatar
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Crap 0.1 first assembly project

Post by Nomad » Wed Mar 14, 2018 2:07 pm

For a little fun I was playing around with 1 liners (well almost one liner.. its really 3.)

Image

Image

Image

Image

When I saw the listing in 'spectrum programmer' I knew it could be a one liner :lol: I couldn't help myself.

I figure there is a way to make all three screens into 1 line but that is beyond a simple potato such as myself.
0 x

User avatar
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Crap 0.1 first assembly project

Post by Nomad » Thu Mar 15, 2018 12:10 pm

Update:

Eyes are square after reading so many damn papers on wargaming and reviewing the following flawed classic.

I figured for the upcomming compition I would see if I could put my new 'skilz' to work in doing a sam becket 'putting right what once went wrong'.

To explain - when I was young for one birthday my parents had bought Battle of Britain' my young self loved the tension of being RAF commander defending the homeland from a sometimes insumentable foe. (you had a variable number of luffwaffe - going from even balance to 5 x your resources). You could define the fail state (how many bombers got to complete their mission 0-100.

I remember this game being awesome, its one of the reasons I got into wargaming later. But I thought to myself 'I wonder if I could make it run better?' I remember the game was slow.

Then I recalled that the magazines had panned this title. I loaded it up and sure enough its got some issues with input (its pretty non-responsive & slow).

But when I looked at the code a number of things became obvious.

1. This was a combination of machine code + basic. Not as claimed in the magazine reviews as 'just a program written in BASIC'. Had they looked at the source they would have seen that on the first few lines you have a machine code portion (to load the map.)

Code: Select all

40 LOAD "MAP" SCREEN$
50 LET A=58580
60 POKE 23658,0
70 LET A=A+1
75 IF A<58603 THEN GO TO 60
80 DATA 33,0,64,17,238,228,1,0,27,237,176,201,33,238,228,17,0,64,1,0,27,237,176,201
90 RANDOMIZE USR 58580
Just a BASIC game eh... facepalm...

2. The speed and control issues, its because there are huge test conditions all in basic and these stack. This all is happening in the input /core game loop. Thus the speed issue and probably the response problem...

The screen update is slow because its calculating all of the elements in basic.

All of these things can be given a whole lot of love by doing them in Assembly.

The nice thing is the guy that coded this tried to make it in a modular way. There is extensive use of go sub structures. I get the feeling this was on the verge of being converted to a full assembly project.

Anyway - its a interesting game and got some nostalgia for me. I was surprised how 'simple' the game is when you break it down. The desire to get this running as the creator obviously wished it to became overwhelming.

I am not planning any crazy graphics, I just want to prove to myself that this game could remove all of the issues that got it panned in review.

Image

Image

Image

Image

Image

Image

Here is the start of the code, figured nobody wants to see 40 screens of basic :lol: You can see what I am talking about in the way the code is set up, and the room there is for improvement for conversion.

Image

Here is the graphics - basic and its probably what caused the majority of the poor reviews but it does the job...

Image

Image

The nostalgia feels when I saw this were epic.

Image

Image

I knew after this I could do it. It's essentially a input evaluation problem that hamstrings this more than anything. If I were to just get this in assembly it would 'fix' the issues that most of the reviews had.
0 x

Post Reply