Crap 0.1 first assembly project

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

Re: Crap 0.1 first assembly project

Post by Nomad »

Seven.FFF wrote: Fri Apr 13, 2018 11:35 pm Excellent. I've never read this, and would love to see your version!
I am just fixing the formatting :lol: should be done by end of the day.

Geoff A. Bobker did a ton of work but seems to have been a bit of a fringe figure, none of his stuff get's much exposure either back in the day or now. It seems kinda weird as this fella did everything - he wrote applications, developed and marketed hardware peripherals and published a newsletter/book.

And this fellow seems to be a ghost, there is no information beyond a few references on WOS related to the guys output - but its not like this stuff was reviewed except for a few cases.

One of the big questions I had when I began all this was 'what would people who wanted to create professional level applications/games/hardware get the information to do this.' and his stuff had to have been a source.

Edit: This is gold. Read 'Feet of clay'

https://spectrumcomputing.co.uk/mag.php ... 80&page=42

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

Re: Crap 0.1 first assembly project

Post by Nomad »

Today was spent tiding up the 'spiritual successor' to trade secrets :lol:

Now at the stage adding in screen shots - something the original never had. This is where the original text was kinda confusing. Unless you were sat in front of the spectrum with an active project to test these little snippets/hacks out on it gets a little cryptic sometimes. The text needs a lot of work. I read through it again and its as if a space alien wrote some of it. :lol: A little bit of love and try and get as much of the code working in +3 basic and I think things will be looking up.

There was a tape that went with this back in the day but that seems to be MIA.

Re-creating a tape & disk seems to be a good idea.
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Crap 0.1 first assembly project

Post by Nomad »

I saw a A Moore assembly snippet about testing if a machine was +2 +3 or 48k system in assembly. I thought this technique was very useful and added it to my swipe file of cool routines 8-)

I thought to myself - I wonder how I would do this in BASIC. :lol: Its semi pointless but you never know right? right? ... Ok I'll get my coat. :lol:


Image

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

Re: Crap 0.1 first assembly project

Post by Nomad »

Here is a 1 liner version of a program from Trade secret.

Its just a simple memory peeker, semi pointless but for me a simple program has no reason not to be a 1 liner. :lol:

The one liner:

Image

Code: Select all

10 FOR I = 30000 TO 66666 : PRINT I ; "=" ; PEEK I : NEXT I
The screen:

Image

Here is the original program.

Image

Code: Select all

10 FOR I = 30000 TO 66666
20 PRINT I ; "=" ; PEEK I
30 NEXT I
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Crap 0.1 first assembly project

Post by Nomad »

Failed to get anything ready for the Spectrum Birthday :'(.

Nobody to blame but myself for that :lol: Happy birthday Spectrum!
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Crap 0.1 first assembly project

Post by Ast A. Moore »

Nomad wrote: Mon Apr 16, 2018 8:16 am I saw a A Moore assembly snippet about testing if a machine was +2 +3 or 48k system in assembly.
Hey, I planned to take that secret to the grave!

To be more precise, it detects a +2A/+3 (the only information I needed to differentiate between the two floating bus routines). The three other guys—48K, 128K, and +2 could be all lumped together. The proper messages should read:

“It’s a +2A/+3.”

and

“It’s not a +2A/+3.”

That’s all we can deduce from it. ;)
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Crap 0.1 first assembly project

Post by Nomad »

Cheers. I will amend the listing.

[media]https://www.youtube.com/watch?v=iDEh6CGOFXM[/media]

Ok game pickers..

I saw a A Moore assembly snippet about testing if a machine was +2A +3 or not +2A +3 system in assembly 8-) 8-) . I thought this technique was very useful and added it to my swipe file of cool routines 8-)

The next thought that entered my potato brain was - I wonder how I would do this in BASIC. :lol: Its semi pointless but you never know right? right? ... Ok I'll get my coat. :lol:

Image

Image

Thank you to A Moore for spotting my error.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Crap 0.1 first assembly project

Post by Ast A. Moore »

Nomad wrote: Mon Apr 23, 2018 2:26 pm Thank you to A Moore for spotting my error.
Don’t thank me; thank Ziggy. I’m just a hologram.
Image
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Crap 0.1 first assembly project

Post by Nomad »

Before in this starchy journal I had described a plan to figure how psychological contagion worked. For those not reading along - the idea is to understand how games become popular. That is a polite way to describe the effect of psychological contagion.

All successful games have this but sometimes its harder to perceive the mechanics with elaborate games. Its hidden under layers of finesse and graphic finery. But with casual mobile games, there are less layers of finesse than with other categories of games.. so the addiction/meme/psychological contagion mechanics are much easier to perceive.

There are two main books on the subject -

Richard Brodie - Virus of the MInd: the new science of the Meme (2009).

This is a good introduction to the theory of contagion. Don't take my word for it find a copy and get at it.

and

Kate Distin, The Selfish Meme: A Critical Reassessment (2004)

Next is a bunch of other interesting books that I found helped understand the subject. I had read stuff on direct advertising before but I didn't really have a idea of the theory behind it.

Cialdini - Influence: The Psychology of Persuasion (1993).

and

D Rushkoff. Media Virus! (1994).

Media memes and everyday persuasion techniques, to get a game/application played you first have to convince a peasant to actually get the idea in his head to want to use it.. This book explains how.

So what's the crack? Why spend this time on obscure theory. My thought is that its much easier to show these techniques with 8-bit system. To show that its not all pseudo science and there might be something to this. It might be interesting to define how its used in existing games in the archive.
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Crap 0.1 first assembly project

Post by Nomad »

Not sure if I posted this already as the image host seems not to be working on the earlier pages.

This is from cracking the code just converted to a one liner.

Code: Select all

1 CLEAR 31999: FOR X=32000 TO 32014 : READ A : POKE X,A : NEXT X : RANDOMIZE USR 32000 : DATA 33,0,64,1,0,24,54,255,35,11,120,177,32,248,201
Image

Image
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Crap 0.1 first assembly project

Post by Ast A. Moore »

Nomad wrote: Wed Apr 25, 2018 2:39 pm This is from cracking the code just converted to a one liner.
Suboptimal. This is smaller and faster:

Code: Select all

1 CLEAR 39999: FOR X=4e4 TO 40010: READ A: POKE X,A: NEXT X: RANDOMIZE USR 4e4: DATA 33,255,87,125,119,43,203,108,40,250,201
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Crap 0.1 first assembly project

Post by Nomad »

Image

That is awesome.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Crap 0.1 first assembly project

Post by Ast A. Moore »

Nomad wrote: Wed Apr 25, 2018 5:40 pm That is awesome.
Well, Awesome is my middle name. :lol:
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Crap 0.1 first assembly project

Post by Nomad »

Unless the search box is broke that is the first appearance of the 4e4 trick on the forum :lol:

Program pickers might remember this being used in PAUSE 4E4 from the Tim Hartnell '49 explosive games for the ZX Spectrum' (1983) Scott Vincent's Three D Maze, p.214 But I figure this can be traced back even further. (considering this was one of his cash grab books - a compilation of other peoples work with his name on the front. :lol: ) I am guessing the technique had to have been published earlier.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Crap 0.1 first assembly project

Post by Ast A. Moore »

Hmm. I didn’t know using the exponent notation in BASIC was a trick. I’ve been using it for decades, primarily because it’s faster to type than 40000.

My optimization wasn’t really about that (although moving machine code into non-contended memory is part of it). I just rewrote the machine code part making it both smaller and faster. In this day and age, every microsecond counts, doncha know . . .
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Crap 0.1 first assembly project

Post by Nomad »

Yes always good to apply Kaizen style management to spectrum coding :lol:

Thanks for the help, I learn a lot from you guys - a lot of the information that is on this forum is very difficult to find elsewhere. Seems that this place is distinguishing itself as the place to find serious information on the spectrum.
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Crap 0.1 first assembly project

Post by Nomad »

I was kind of curious if the initial memory location for the above code could be randomized hmmm

I think a memory location could be selected that the randomize code knows to avoid (at most its two memory locations). this memory cell(s) is then the container for the base number used in the memory calculation. The assembly would need to operate using this value + offset.

The idea is every time the program is run, it occupies a different location in memory.

It would make pokes less effective, to overcome it you would need to rewrite the basic loader.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Crap 0.1 first assembly project

Post by Ast A. Moore »

For the short snippet above—sure, easy peasy. For larger programs it would become extremely complicated, to the point of being unmanageable. Good old encryption would do a much better job. Besides, emulators have rendered this kind of trickery moot, anyway.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Crap 0.1 first assembly project

Post by Nomad »

Emulators are brilliant but at the same time frustrating :lol:

Well back from vacation now all refreshed and ready to actually finish some open projects :twisted:

Today's project time was spent procrastinating and deciding to re-organize the den to improve 'productivity'.

New PC on the way, on of those AMD Ryzen 2200g. Like all hacks I have blamed my lack of progress on the tools and not myself :lol: now comes the acid test - no more crutch of 'I have a crap PC' to rely on.

555 posts! Charlatans and hippies would have you believe that the number signifies positive change, my first thought is of one of the most useful basic IC circuits.

Image
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Crap 0.1 first assembly project

Post by Ast A. Moore »

Nomad wrote: Tue May 01, 2018 10:39 am New PC on the way, on of those AMD Ryzen 2200g.
That’s pretty lightweight for a desktop. Less than 2.5 kilos. :D
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Crap 0.1 first assembly project

Post by Nomad »

:lol: *found the documentation for the Ryzen*

I am curious about the thermal performance of the AMD - I am somewhat out of touch with the hardware side of life, years ago AMD was notorious for thermal issues with the chip but now according to the inter-webs they have resolved this. If I can fry eggs off the case will know the internet deceived me :lol:

I was going to go for a mini-form factor case but I was worried about the thing overheating during heavy continuous use.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Crap 0.1 first assembly project

Post by Ast A. Moore »

No idea, man. I’m on a Mac, and I fry my eggs the conventional way on a skillet with bacon fat. Mmm, eggs.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Crap 0.1 first assembly project

Post by Nomad »

Today's project time was spent looking at custom fonts. Here is an open major project for an interested person - a great retirement project actually.
Spoiler
Go through the archive, and rip every instance of a custom font.
Found an unintentional great source for inspiration on the youtubes - I was just watching some early silent films (hey it's a hobby right?) anyway. I realized its a good source for inspiration for graphics/cut scene ideas.

With the +3 you have a lot of latitude, I don't think that the full potential of the +3 was really ever completely explored. Once you accept the limitations of the spectrum graphics you can do a lot with the system. Multi-loaders become a lot more feasible with the disk system compared to say a Tape.
User avatar
Kweepa
Manic Miner
Posts: 311
Joined: Sat Feb 03, 2018 6:14 pm
Location: Albuquerque, New Mexico

Re: Crap 0.1 first assembly project

Post by Kweepa »

The font ripping project sounds pretty cool.
It could be done automatically for all the Quill/Paw adventures.
Einar(?) ripped 65 from a bunch of major games for ZX-ALFA.
https://spectrumcomputing.co.uk/index.p ... id=0025283
(Then there are all the other 8 bit computer platforms...)
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Crap 0.1 first assembly project

Post by Nomad »

Looking at the archive I was curious

a.) how often custom fonts were used
b.) did the same group of fonts get used across many different games or was it a case of many individual fonts getting designed?

Because its a continuous block of memory, of a known length. I think it could be extracted automatically from an image. In the case of frameworks where you know the memory location of the font (like the Quill) it would be pretty straight forward to batch process this.

Data mining of the archive has the potential to answer a bunch of open questions. Not sure how useful it would be but the nerd hoarder in me would be super-satisfied I had every font used in the archive :lol:
Post Reply