What 128k model to buy for homebrew development testing and homebrew gaming?

For experts to discuss very technical stuff and newbies to ask why the Spectrum they bought off ebay doesn't work.
Post Reply
User avatar
Mozartkügel
Drutt
Posts: 27
Joined: Fri Jun 07, 2019 8:19 am
Location: Finland

What 128k model to buy for homebrew development testing and homebrew gaming?

Post by Mozartkügel »

Hi, I went and bought my first 48k Speccy, wohoo! I found a cheap one on a local Finnish auction site (Haven't gotten it yet). I really love that beautiful look of the classic speccy. However then I realized that in the end I care more about the new games than about the looks of the machine, and I got a little bit bummed when I realized for example Manic Pietro and Nixy the Glade Sprite wouldn't be working on the 48k speccy. (That's what happens when you buy before reading up on things) :oops: :lol:

Sooo, now I'm looking to get a 128k spectrum! :mrgreen: mostly from a "homebrew" development and homebrew gaming point of view. I never had a Speccy back in the day (I started with a Commodore 128), but I've gotten really excited about the lively Spectrum homebrew scene, the unique palette of the speccy and the wonderful homebrew games like for example Manic Pietro, Nixy the Glade Sprite, Sophia II, Percy Penguin, Laetitia, Gandalf, Pooper Scooper, the Amazing Rocketeer etc. etc...

I'm looking for some help because I got slightly confused from reading about the different models on wikipedia.

Obviously the real Sinclair original 128 looks by far the best but it seems to be too way too expensive for me right now.

1. Wikipedia says that " The ZX Spectrum +2A was a variant of the Spectrum +3", so would that mean that black +2 spectrums have the busted AY sound and compability issues?

Wikipedia again says about the +3 "Such core changes brought incompatibilities" and " Some older 48K and 128K games were incompatible with the machine."

Do I understand it correctly then that a black spectrum +2 is indeed a +3 with a cassette drive instead of a floppy drive? Or how do I know if a Speccy is a +2, +2A or +2B?

If this is correct it would seem to me it would make more sense to buy a grey +2 instead of a black +2? Since the grey one doesn't seem to have sound issues and not compability issues?? What do you guys think. Non busted sound would be pretty important I think, and compability too.

Then a couple of follow up questions.

2. Does 128k homebrew from the last 10-20 years usually support all 128k models?

3. Are there coming out more homebrew games for the 48k speccy or for the 128k speccy now a days?

4. Are new 48k speccy games usually made to be compatible with 128k spectrums or would I in the end need to own both a real 48k speccy and a real 128k speccy?

5. What ZX Spectrum computer would make most sense to own from a development point of view? I guess you'd get most compability when testing on an emulator of course, but for testing on real hardware I mean.

6. It seems the joystick ports on the 128k spectrums are for sinclair joysticks and not for kempston/atari joysticks? (I googled some photos and it says "use only sinclair SJS1 joysticks" next to the joystick ports) If I'd for example would buy an divMMC, could I then use the kempston port on that with my TAC-2 on a 128k speccy model?

Unrelated question number 7: I love cassette loaders on the c64, so I was just wondering if there are some loaders on the speccy that would play music too while displaying a loading image? I'd love them without that too, but just out of curiosity.

Cheers and thanks for any help!
User avatar
Alessandro
Dynamite Dan
Posts: 1908
Joined: Wed Nov 15, 2017 11:10 am
Location: Messina, Italy
Contact:

Re: What 128k model to buy for homebrew development testing and homebrew gaming?

Post by Alessandro »

Hi Mozartkügel,

1. +2As are black machines similar in shape to the +2 first produced in 1988, with a different Datacorder, much simpler than the one mounted on the +2, and a different ULA circuitry inherited from the +3 - remember the +2A came out after the +3, and was the last machine of the canonical succession being produced and marketed, up to 1993. Other slight differences with the +2 include a different start menu and a different syntax for the management of the "silicon disk", i.e. the extra RAM banks as they are normally available from BASIC; you can switch them in BASIC and in Assembly with an OUT instruction, or you can employ the USR0 mode which, simply speaking, makes the computer "behave" like a 48K with all RAM available at once for particular purposes such as memory banks management and DivIDE/DivMMC compatibility. However, on the external case, the machine is still named a "Spectrum +2", which induces confusion into those who do not know the whole story behind.

The +2A "busted" AY only affects some of those early models which were built recycling +3 unused boards when the +3 went out of production in 1990. The +3 sound flaw causes AY sound to be rather muffled and slightly distorted, and can be cured by substituting a couple of components or so if you are skilled with soldering/desoldering and substituting components (definitely not my case). As an example, my two +2As produce crystal clear AY sound while my +3 has the sound issue. The +2, just like the 128K, can be affected by another kind of sound issue - the beeper is much louder than the AY sound. My 128K and +2 both have this problem. Again, you can find some guides on the Web explaining how to resolve it by yourself - if you dare :mrgreen:

On the other hand, my +2As are newer +2A specimens - also referred to as +2Bs because they have a simpler circuit board without the room for the disk drive controller and ROM v4.1, whereas the +3 and +2A machines of the first production run have a v4.0 ROM. Actually, given the notorious incompatibilities between the +2A/+3 and a number of titles produced for the earlier models, I think a +2B is the best platform to test software for the 128K Spectrums with: not only AY sound output is great and at the same volume of the beeper, but if a program runs on a +2A, you can be sure (except for a couple of titles that take advantage of the +2A peculiar memory bank modes) that it will run on every 128K model!

That only goes to show you should take everything Wikipedia says with a grain of salt ;)

2. To my knowledge - and I can honestly say I played all of them, since I had to highlight the most interesting ones (in my humble opinion) for the Spectrumpedia - and continued after the book was released, yes. A handful will suffer from incompatibilites with the +2A/+3 but they really are just a few, and cures have already been found for them (see link above).

3. On the whole, if you consider what came out from 1994 on, there is a preminence of 48K titles, but in the last 7-8 years or so, there has been a resurgence of 128K titles. Be ware though - there is a number of "128K-only" titles around that will run on a 48K as well, since they are 48K games with an AY soundtrack bolted on. Other authors (including myself) have created separate 48K and 128K versions to cater for everyone's needs.

Until about 10 years or so ago a good quantity of homebrew production came from Russia and other countries of the former USSR, and for this reason they were made for clones based on the 128K models, although some of them can also run on the 48K.

4. New 48K games are generally compatible with the 128K models. Also see 2.

5. See 1.

6. In order to use the Sinclair port with an Atari-style joystick you will need to purchase an adapter, they are cheap and easy to find. With an adapter I can use an original Quickjoy Master System joystick I bought new, with the +2, +2A and +3. Some vintage models even came with a double jack.

7. This is almost impossible due to the absence of a dedicated sound chip on the earlier models, and for compatibility reasons the ROM cassette handling routines were left untouched. "Almost" because a demo made in 2009 showed that with clever coding this can be done, too.
User avatar
Mozartkügel
Drutt
Posts: 27
Joined: Fri Jun 07, 2019 8:19 am
Location: Finland

Re: What 128k model to buy for homebrew development testing and homebrew gaming?

Post by Mozartkügel »

Thank you so much again for all the help [mention]Alessandro[/mention] ! *bows* Very interesting and helpful knowledge!

So there's really no way of knowing what +2 model is for sale on ebay looking at the photos / externally unless you ask the seller? And for him to open it up and/or test the AY etc.?
Last edited by Mozartkügel on Sun Jun 16, 2019 1:49 pm, edited 2 times in total.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: What 128k model to buy for homebrew development testing and homebrew gaming?

Post by Ast A. Moore »

If you’re targeting the original Spectrums and not the clones, you really just need three Spectrums:

1. The original 48K
2. Either the original 128K or the Spectrum +2
3. Either the +3 or the +2A(B).

As far as compatibility goes, the +2A and +3 are identical. The +2 and 128K are architecturally identical between themselves, but the +2 has some modifications made to its ROM.

The 48K machines can be roughly split into two large categories—pre–Issue 3 machines and post–Issue 3. The differences affect mostly how the keyboard is handled, but good programming practices will eliminate the need to get a pre–Issue 3 machine.

Most emulators can faithfully reproduce the original 48K Speccy and, to a great extent, the 128K/+2. Few can boast accuracy in emulating the +2A/+3; for that reason alone, having a +2A/+3 is quite essential for a true Spectrum developer.

With a little bit of knowledge of the differences between the various Spectrum models, it is trivial to make a game compatible with all of them. Responsible developers usually target all Spectrums (unless they author 128K-only games specifically).

There are a few very unusual tape loaders for the Spectrum, but I haven’t heard of any that played music. I don’t think it’s totally out the question, but the sound output might very well interfere with the loading even on 128K machines.

Most developers nowadays prefer not to bother with fancy tape loaders, relying on modern interfaces that allow you to load games almost instantly. Myself, I prefer to go the old-fashioned way and develop my own turboloaders.
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.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: What 128k model to buy for homebrew development testing and homebrew gaming?

Post by Ast A. Moore »

Mozartkügel wrote: Sun Jun 16, 2019 1:44 pm So there's really no way of knowing what +2 model is for sale on ebay?
Yes, there is. You can easily distinguish between a +2 and a +2A by the color of the case and the connectors on the back. It’s not so easy to tell between a +2A and a +2B, though. However, from a programmer’s perspective, these are identical.
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.
User avatar
1024MAK
Bugaboo
Posts: 3104
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: What 128k model to buy for homebrew development testing and homebrew gaming?

Post by 1024MAK »

Ast A. Moore wrote: Sun Jun 16, 2019 1:51 pm
Mozartkügel wrote: Sun Jun 16, 2019 1:44 pm So there's really no way of knowing what +2 model is for sale on ebay?
Yes, there is. You can easily distinguish between a +2 and a +2A by the color of the case and the connectors on the back. It’s not so easy to tell between a +2A and a +2B, though. However, from a programmer’s perspective, these are identical.
Ask to see a photo of the rear, that will allow you to see if the machine is a +2 (grey) or a +2A / +2B (black).
See this post on World of Spectrum forums ;)

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
User avatar
Mozartkügel
Drutt
Posts: 27
Joined: Fri Jun 07, 2019 8:19 am
Location: Finland

Re: What 128k model to buy for homebrew development testing and homebrew gaming?

Post by Mozartkügel »

Allright, now I already sold my 48k spectrum to have the money for a 128kb speccy! I bought a black +2 from ebay (yay!) and hoping that it's a +2B. I asked the seller and he said that the AY sounds fine. He had five spectrums for sale, so I'm thinking he would have the knowledge to tell me if it's a +2A or +2B but he didn't so I'm keeping my fingers crossed. I'll be fine for the foreseable future with a +2A too. At least it was relatively cheap comparing to sold +2 spectrums, so now I'll soon have a real 128k speccy to test and play games on. \o/

I checked online and the tape/sound jack is apparently just a headphones plug, so now I can't load games from my phone on it as a temporary solution. But I was going to get a SD-card solution later anyways. It came with a few games on tape for starters at least.

Alessandro wrote: Sun Jun 16, 2019 1:31 pm Hi Mozartkügel,

1. +2As are black machines similar in shape to the +2 first produced in 1988, with a different Datacorder, much simpler than the one mounted on the +2, and a different ULA circuitry inherited from the +3 - remember the +2A came out after the +3, and was the last machine of the canonical succession being produced and marketed, up to 1993. Other slight differences with the +2 include a different start menu and a different syntax for the management of the "silicon disk", i.e. the extra RAM banks as they are normally available from BASIC; you can switch them in BASIC and in Assembly with an OUT instruction, or you can employ the USR0 mode which, simply speaking, makes the computer "behave" like a 48K with all RAM available at once for particular purposes such as memory banks management and DivIDE/DivMMC compatibility. However, on the external case, the machine is still named a "Spectrum +2", which induces confusion into those who do not know the whole story behind.

The +2A "busted" AY only affects some of those early models which were built recycling +3 unused boards when the +3 went out of production in 1990. The +3 sound flaw causes AY sound to be rather muffled and slightly distorted, and can be cured by substituting a couple of components or so if you are skilled with soldering/desoldering and substituting components (definitely not my case). As an example, my two +2As produce crystal clear AY sound while my +3 has the sound issue. The +2, just like the 128K, can be affected by another kind of sound issue - the beeper is much louder than the AY sound. My 128K and +2 both have this problem. Again, you can find some guides on the Web explaining how to resolve it by yourself - if you dare :mrgreen:

On the other hand, my +2As are newer +2A specimens - also referred to as +2Bs because they have a simpler circuit board without the room for the disk drive controller and ROM v4.1, whereas the +3 and +2A machines of the first production run have a v4.0 ROM. Actually, given the notorious incompatibilities between the +2A/+3 and a number of titles produced for the earlier models, I think a +2B is the best platform to test software for the 128K Spectrums with: not only AY sound output is great and at the same volume of the beeper, but if a program runs on a +2A, you can be sure (except for a couple of titles that take advantage of the +2A peculiar memory bank modes) that it will run on every 128K model!

7. This is almost impossible due to the absence of a dedicated sound chip on the earlier models, and for compatibility reasons the ROM cassette handling routines were left untouched. "Almost" because a demo made in 2009 showed that with clever coding this can be done, too.

[mention]Alessandro[/mention] It seems all the different spectrum models have their pros and cons, but the +2B seems most convenient. The incompatibility list luckily didn't seem THAT bad if you don't count all the fixed games at least. Thanks for linking that loader that has got music! Fab stuff! :)

Ast A. Moore wrote: Sun Jun 16, 2019 1:48 pm If you’re targeting the original Spectrums and not the clones, you really just need three Spectrums:

1. The original 48K
2. Either the original 128K or the Spectrum +2
3. Either the +3 or the +2A(B).

Most emulators can faithfully reproduce the original 48K Speccy and, to a great extent, the 128K/+2. Few can boast accuracy in emulating the +2A/+3; for that reason alone, having a +2A/+3 is quite essential for a true Spectrum developer.

With a little bit of knowledge of the differences between the various Spectrum models, it is trivial to make a game compatible with all of them. Responsible developers usually target all Spectrums (unless they author 128K-only games specifically).

Most developers nowadays prefer not to bother with fancy tape loaders, relying on modern interfaces that allow you to load games almost instantly. Myself, I prefer to go the old-fashioned way and develop my own turboloaders.
Thanks for all the info [mention]Ast A. Moore[/mention]! I giggled to myself when reading "you really just need three Spectrums", I pictured myself telling my wife "I really need three different spectrums for development, it's the only way! Can't you see?" :mrgreen:

I haven't even started one line of code or one pixel in pixelart for the speccy yet, so thinking about the compability at this point makes me a bit sweaty, but I'll just need to learn one thing at a time. That way I managed to achieve more than I ever thought I could on some of the commodores. I'm thinking about being an "unresponsible developer" in my first project and waste memory so I only have to support 128k speccies or something ;P

I wonder if some version(s) of AGD has "speccy version handling" "built in"? I also saw that gandalf and manic pietro are open source, so I could probably learn many things from those too.

Yeah I can imagine most enthusiasts loading games from SD cards and such now-a-days. I don't think I would want to write my own turbo loader but I was hoping that it would be possible to use some existing one for my game(s)? I do love loading from real cassette so a tape version would be a must in the end! :)

One more question. Are the old spectrum power supplies safe for humans and computers by now? I'm used to the c64 psu's that many times have to be replaced at this point because they grill some chips when they go.
User avatar
Mozartkügel
Drutt
Posts: 27
Joined: Fri Jun 07, 2019 8:19 am
Location: Finland

Re: What 128k model to buy for homebrew development testing and homebrew gaming?

Post by Mozartkügel »

1024MAK wrote: Mon Jun 17, 2019 1:02 pm
Ast A. Moore wrote: Sun Jun 16, 2019 1:51 pm Yes, there is. You can easily distinguish between a +2 and a +2A by the color of the case and the connectors on the back. It’s not so easy to tell between a +2A and a +2B, though. However, from a programmer’s perspective, these are identical.
Ask to see a photo of the rear, that will allow you to see if the machine is a +2 (grey) or a +2A / +2B (black).
See this post on World of Spectrum forums ;)

Mark
Thanks Mark! Ah, too late, I already bought one haha. Here's a couple of images of it though:

Image

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

Re: What 128k model to buy for homebrew development testing and homebrew gaming?

Post by Ast A. Moore »

Mozartkügel wrote: Mon Jun 17, 2019 2:01 pm I checked online and the tape/sound jack is apparently just a headphones plug, so now I can't load games from my phone on it as a temporary solution.
Keep in mind that neither the +2 nor the +2A(B) can load games from that jack (the +3 can). However, the modification for the +2A is trivial (not so for the +2), and will only require you to temporarily remove of the 3.5 mm socket, cut a single trace underneath, and run a wire from another point on the logic board. Should take you about fifteen minutes, including a smoke break.

Optionally, you can go the lazy way and get a cassette adaptor, but then I’ll forever look down on you. :lol:
Mozartkügel wrote: Mon Jun 17, 2019 2:01 pmI don't think I would want to write my own turbo loader but I was hoping that it would be possible to use some existing one for my game(s)?
I have equipped a few third-party games with mine. Honestly, tape loaders are a ton of fun to write. Sure, you pull a lot of hair (if you have any left to begin with) in anger during the process, but the results are very satisfying.
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.
User avatar
1024MAK
Bugaboo
Posts: 3104
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: What 128k model to buy for homebrew development testing and homebrew gaming?

Post by 1024MAK »

The ZX Spectrum range evolved.

I won’t go into detail with the 16K/48K/+ machines.

The next was the Spanish 128K.
Followed by the U.K. 128K machine (toastrack).
Amstrad then bought the Sinclair computer business from Sinclair.
They produced a new machine, called the +2 (we nickname it the grey, because it has a dark grey case instead of a black case) based on the existing U.K. 128K design, hence as far as software is concerned, apart from differences in the ROM, it is effectively the same. Hardware wise, the boards look very different, but a lot of the chips and circuitry is the same. However some there are some manufacturing faults with some board issues.

Amstrad then developed a new model, the +3, complete with disk drive. Most of the manufacturing faults with the +2 (grey) are sorted. It uses a new gate array chip instead of a Ferranti ULA. Alas, due to Amstrad design staff not understanding how the bank switching actually worked and due to a documentation errors, the bank switching of the RAM is different. There is also a design error with the AY sound chip audio output circuitry. The PCB was designed so that depending on what components were fitted, it could be made into a +3 or a +2A ( the +2A being in a black case). A different PSU arrangement is used with the +3 and +2A machines. Some +2A machines were made using this board design, but not many.

To reduce costs Amstrad redesigned the PCB to reduce its size (and hence cost). So when stocks of the +2 (grey) ran out, this board was put in the +2A cases and then sold as the +2A. Later, Amstrad changed the moulding on the case to say +2B. However electrically both these are identical, as the same PCB is fitted to both. This “+2B” PCB has the correct AY audio circuitry so does not suffer the poor AY sound of the +3 machines.

Another rare machine is the +3B. This is like the +3, but has a later issue board that also corrects the design error with the AY sound chip audio output circuitry.

So to sum up:
All +2 (grey) machines have manufacturing faults. Some have more errors than others. Just looking at the outside it is impossible to tell which board issue is fitted inside.

Most +3 machines have the AY audio fault. Only a small number of +3B machines are about.

Most +2A machines actually have a +2B board in them. These along with the +2B have the corrected AY sound circuitry and are fitted with the later version of the ROM chips.

Not many +2A machines are about that have the same PCB as the +3.

On the subject of joysticks, there is lots of confusion. Mostly caused by Amstrad.

Sinclair originally did not include joystick ports on their machines. They left it to third party companies to supply interfaces. Hence a number of companies competed in the market. Kempston being the best known. But there were others. All of these (as far as I know) used a 9 pin D-connector so that “Atari” compatible joysticks could be used. But the method that game software used to read the joystick differed between the different manufacturers.

Then, with the Sinclair ZX Interface 2, Sinclair introduced their own joystick interface. The connectors were also 9 pin D-type connectors so that “Atari” compatible joysticks could be used. Sinclair mapped the joysticks to the top row of number keys on the keyboard (1 to 5 for one joystick, and 6 to 0 for the other joystick). In games select “Sinclair” joysticks.

Amstrad included the chip used in the ZX Interface 2 in the +2 (grey), so this machine has a Sinclair joystick interface. But wired the 9 way D-connectors up to their own unique “standard”. Hence you can’t plug in an Atari compatible joystick. Either make or buy an adapter cable, or rewire the connector in the machine (not for the faint hearted). A further modification can then be done to allow the use of auto-fire joysticks that need a +5V power feed. In games select “Sinclair” joysticks.

In the +2A, +2B, +3 and +3B, Amstrad dropped the use of a special chip for the joystick ports. The connectors for the joysticks are now wired into the gate array chip, but these connectors are wired as a matrix. Not as simple inputs. Again an adapter cable can be used. However, it is far from simple to modify the machine for any auto-fire joystick. In games select “Sinclair” joysticks.

Which is the best machine to buy? This debate has been running for over 25 years. Alas, we don’t yet have a definitive answer...

Now programmers know about the differences, most modern software should run on any of the 128K machines.

Ignoring the cassette mechanism, generally the +2B machines (including the +2A machines that have a +2B PCB) are the most reliable. The biggest problem with the +2A, +2B, +3 and +3B is if the PSU is or becomes faulty. Most are easy to fix. But there is no easy off the shelf replacement.

The +2 (grey) machines (ignoring the cassette mechanism) are slightly less reliable. But equivalent replacement 9V PSUs are not hard to find.

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
User avatar
1024MAK
Bugaboo
Posts: 3104
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: What 128k model to buy for homebrew development testing and homebrew gaming?

Post by 1024MAK »

Mozartkügel wrote: Mon Jun 17, 2019 2:01 pm I checked online and the tape/sound jack is apparently just a headphones plug, so now I can't load games from my phone on it as a temporary solution. But I was going to get a SD-card solution later anyways. It came with a few games on tape for starters at least.
Of the Amstrad models, only the +3 and +3B can load from an external cassette deck/player/recorder or other suitable audio source. It is possible to modify a +2, +2A or +2B.
Mozartkügel wrote: Mon Jun 17, 2019 2:01 pmOne more question. Are the old spectrum power supplies safe for humans and computers by now? I'm used to the c64 psu's that many times have to be replaced at this point because they grill some chips when they go.
The 128K (toastrack) and +2 (grey) use a unregulated nominal 9V PSU. These can’t fail like the C64 PSUs. [This does not mean that they are indestructible, if the output is shorted out, and one or more diode(s) fail, then they will cause problems].
They are double insulated are are safe for humans and computers as long as the cables and the case are undamaged.

The +2A, +2B, +3 and +3B use a different PSU. There are two types. One (+3) can be used with any +2A, +2B, +3 and +3B machine. The other (+2) should only be used with a +2A or +2B. The difference is in the available output power. The +3 type is rated to operate a disk drive. The +2 type is not.

Both use a 6 pin DIN plug to connect to the computer. They produce +5V, +12V and -12V outputs.

Being a fully regulated type, in theory it is possible for them to fail and kill the computer. But this is so rare that I don’t recall hearing about such a failure on here or on World of Spectrum forums.

In terms of safety for humans. Again, they are safe as long as the cables and the case are undamaged.

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
User avatar
Alessandro
Dynamite Dan
Posts: 1908
Joined: Wed Nov 15, 2017 11:10 am
Location: Messina, Italy
Contact:

Re: What 128k model to buy for homebrew development testing and homebrew gaming?

Post by Alessandro »

Hi,
Mozartkügel wrote: Mon Jun 17, 2019 2:01 pm I checked online and the tape/sound jack is apparently just a headphones plug, so now I can't load games from my phone on it as a temporary solution. But I was going to get a SD-card solution later anyways. It came with a few games on tape for starters at least.
If you don't want to modify your +2A you can use a cassette adapter. It's perfectly fine (despite what Ast says :P ) and on that machine you have the advantage that it is not necessary to press the Play key on the Datacorder. I've done that for years. See this video for a demonstration.
Mozartkügel wrote: Mon Jun 17, 2019 2:01 pm I wonder if some version(s) of AGD has "speccy version handling" "built in"?
Again, AGD is supposed to create simple, single-load games that can run on a 48K Spectrum. If you wish to develop larger titles with it, you must program each level as a single game and devise a way to "chain" them together. There is no way to do it from within AGD.
Mozartkügel wrote: Mon Jun 17, 2019 2:01 pm Yeah I can imagine most enthusiasts loading games from SD cards and such now-a-days. I don't think I would want to write my own turbo loader but I was hoping that it would be possible to use some existing one for my game(s)? I do love loading from real cassette so a tape version would be a must in the end! :)
Sorry, but maybe you didn't notice the link in my first answer to you. I developed a custom turbo loader which feeds data at a rate roughly double of the ROM scheme. It is called SetoLOAD, comes in two main varieties, and examples and sources are provided. Anyone is free to employ it in their project - all I ask in return is just a mention in the game and/or documentation.

That said, remember to provide at least a .TAP version for your game. .TAP are simple tape image files "recorded" with the standard ROM loader and can be handled by interfaces such as the DivIDE/DivMMC. On the other hand, if you wish to "record" your software with a custom loader, you must use a more complex file format known as .TZX, which those interface cannot read.
Mozartkügel wrote: Mon Jun 17, 2019 2:01 pm One more question. Are the old spectrum power supplies safe for humans and computers by now? I'm used to the c64 psu's that many times have to be replaced at this point because they grill some chips when they go.
Generally 48K/+ power supply units can be a bit unreliable at times and tend to overheat. Your best bet with the +2 and earlier models is a +2 PSU, the amperage is enough for all of them and it is generally regarded as the most reliable one for that range. You can buy a new one as a spare part, I did it myself. As for the +2A and +3 PSUs, they are also reliable enough, but remember that you can use a +3 power supply on a +2A, but not the reverse.
User avatar
Mozartkügel
Drutt
Posts: 27
Joined: Fri Jun 07, 2019 8:19 am
Location: Finland

Re: What 128k model to buy for homebrew development testing and homebrew gaming?

Post by Mozartkügel »

Thanks again guys for all the help and all the info! I've been doing as much reading and digging up info on the spectrum(s) myself too as I've had time for, but I'm really thankful for your help, and many times it's more fun to communicate and learn from other people than to sit alone and read (although that's nice sometimes too) :D
1024MAK wrote: Mon Jun 17, 2019 2:45 pm
Ignoring the cassette mechanism, generally the +2B machines (including the +2A machines that have a +2B PCB) are the most reliable. The biggest problem with the +2A, +2B, +3 and +3B is if the PSU is or becomes faulty. Most are easy to fix. But there is no easy off the shelf replacement.

The +2 (grey) machines (ignoring the cassette mechanism) are slightly less reliable. But equivalent replacement 9V PSUs are not hard to find.

Mark
Thanks for the exhaustive info on the speccy models @1024MAK ! I was wondering about the reliability of the spectrums too. I seem to remember seeing some video a long time ago that some of the spectrum models were not that reliable. I think it was the spectrum+ if I remember correctly.
1024MAK wrote: Being a fully regulated type, in theory it is possible for them to fail and kill the computer. But this is so rare that I don’t recall hearing about such a failure on here or on World of Spectrum forums.

In terms of safety for humans. Again, they are safe as long as the cables and the case are undamaged.
That's good to hear, FHEW! :D
Alessandro wrote: Mon Jun 17, 2019 5:50 pm Hi,
Mozartkügel wrote: Mon Jun 17, 2019 2:01 pm I checked online and the tape/sound jack is apparently just a headphones plug, so now I can't load games from my phone on it as a temporary solution. But I was going to get a SD-card solution later anyways. It came with a few games on tape for starters at least.
If you don't want to modify your +2A you can use a cassette adapter. It's perfectly fine (despite what Ast says :P ) and on that machine you have the advantage that it is not necessary to press the Play key on the Datacorder. I've done that for years. See this video for a demonstration.
Haha, nice! I've always wanted one of those cassette adapters, now finally I have a reason. Quite funny that you don't have to press play. :D
Alessandro wrote: Mon Jun 17, 2019 5:50 pm
Mozartkügel wrote: Mon Jun 17, 2019 2:01 pm I wonder if some version(s) of AGD has "speccy version handling" "built in"?
Again, AGD is supposed to create simple, single-load games that can run on a 48K Spectrum. If you wish to develop larger titles with it, you must program each level as a single game and devise a way to "chain" them together. There is no way to do it from within AGD.
Ah, I did know that, there's a lot of new info to take in so I get a bit confused at times. Is it possible to relatively easily make a 48k AGD game with AY music added though? I think I saw some post about that somewhere. I saw that there's AY mods for the 48k spectrum too. I wonder if those are common nowadays.
Alessandro wrote: Mon Jun 17, 2019 5:50 pm
Mozartkügel wrote: Mon Jun 17, 2019 2:01 pm Yeah I can imagine most enthusiasts loading games from SD cards and such now-a-days. I don't think I would want to write my own turbo loader but I was hoping that it would be possible to use some existing one for my game(s)? I do love loading from real cassette so a tape version would be a must in the end! :)
Sorry, but maybe you didn't notice the link in my first answer to you. I developed a custom turbo loader which feeds data at a rate roughly double of the ROM scheme. It is called SetoLOAD, comes in two main varieties, and examples and sources are provided. Anyone is free to employ it in their project - all I ask in return is just a mention in the game and/or documentation.
Actually I looked at that page a few times already but I didn't translate the italian until now. I was kind of sensing that it would be free to use though (when giving credit). :D I really like that there's several color combinations to choose from.
Alessandro wrote: Mon Jun 17, 2019 5:50 pm That said, remember to provide at least a .TAP version for your game. .TAP are simple tape image files "recorded" with the standard ROM loader and can be handled by interfaces such as the DivIDE/DivMMC. On the other hand, if you wish to "record" your software with a custom loader, you must use a more complex file format known as .TZX, which those interface cannot read.
Thanks! I need to read up properly on all that later.
Alessandro wrote: Mon Jun 17, 2019 5:50 pm
Mozartkügel wrote: Mon Jun 17, 2019 2:01 pm One more question. Are the old spectrum power supplies safe for humans and computers by now? I'm used to the c64 psu's that many times have to be replaced at this point because they grill some chips when they go.
Generally 48K/+ power supply units can be a bit unreliable at times and tend to overheat. Your best bet with the +2 and earlier models is a +2 PSU, the amperage is enough for all of them and it is generally regarded as the most reliable one for that range. You can buy a new one as a spare part, I did it myself. As for the +2A and +3 PSUs, they are also reliable enough, but remember that you can use a +3 power supply on a +2A, but not the reverse.

Thanks! Does anyone have experience of this one?
https://www.sintech-shop.de/en/power-su ... -3/a-9465/
Although it seems a new one might not be needed at this point.

I also have a friend that's into electronics and he said that the +2A/B speccy has the same power specifications as the Atari ST and the Amiga 500, so it would be possible to create a simple psu with plugs for all of those in the same psu (not to be used at the same time though).
User avatar
Alessandro
Dynamite Dan
Posts: 1908
Joined: Wed Nov 15, 2017 11:10 am
Location: Messina, Italy
Contact:

Re: What 128k model to buy for homebrew development testing and homebrew gaming?

Post by Alessandro »

Mozartkügel wrote: Tue Jun 18, 2019 8:10 am Haha, nice! I've always wanted one of those cassette adapters, now finally I have a reason. Quite funny that you don't have to press play. :D
Sure, I discovered it by chance in fact ;) Nowadays you can find cassette adapters in Chinese-owned general stores for as little as € 2.
Mozartkügel wrote: Mon Jun 17, 2019 2:01 pm Ah, I did know that, there's a lot of new info to take in so I get a bit confused at times. Is it possible to relatively easily make a 48k AGD game with AY music added though? I think I saw some post about that somewhere. I saw that there's AY mods for the 48k spectrum too. I wonder if those are common nowadays.
From within AGD you cannot add AY music. This means you have to add some extra code of yours.

To my experience, there are a number of ways to achieve this:

1) Place music data after game data. This is useful if you want to create a game that will run on both a 48K and a 128K model without resorting to generate separate versions, or if you want to create a multi-level game with separate music data for each level.

Compose your tune with Vortex Tracker II: latest version is 2.5, downloadable from here. This version comes with a large number of samples ready to be used in your tunes, but you can also copy them from existing tracks or even create your own.
You must export it with Export > Save with ZX Spectrum player > .TAP file (player and module separately). But wait! Before doing that, you must know at which address you must export the player and music data.

Let's suppose your AGD game level starts at address 31000 and is 24000 bytes long; this means the first free byte will be at address 31000+24000 = 55000. But let's reserve some space, say 10 bytes; you will later see why.

Count 300 bytes for the sprite buffer at the end of code; first usable byte is located at 55310.

At 55310 you must then assemble the starter code, which is needed by AGD to play and stop the music. It is 83 bytes long. This means you must export the player and music data from VT2 at 55310+83 = 55393 or higher. Be careful not to occupy the last 256 bytes of RAM because AGD uses them as a buffer space to store block information and other things.

Go back to AGD and insert these instructions at the end of the Game Initialization event:

Code: Select all

ASM 205
ASM 97
ASM 216
These are straight calls to machine code from within AGD. The above would translate into Z80 Assembly as CALL 55403 (256*216+97 = 55393).

Then insert these instructions in the Complete Game and Lost Game (note that it is not necessary to use the Lost Game event; you can simply exit the game either when the game objectives have been reached or when the LIVES variable reaches 0, and check the number of lives outside the AGD program to determine whether the game was lost or won):

Code: Select all

ASM 205
ASM 130
ASM 216
This means the AGD code will execute a call to address 55413+33 = 55426, where the code for stopping the music is located. Then the game will return to BASIC, machine code etc. See why we needed those extra 10 bytes or so? Each CALL [address] instruction will take three bytes of space, and by reserving those extra bytes, we can be sure that the extra code for music will not overlap with the game buffer space, which can lead to fatal results - I know that by experience :mrgreen:

How to do all of this in practice?

- In the starter code, write the RAM starter address beside MUSICA and the RAM address of the player data in
- Assemble the starter data to a .TAP file with a program like Pasmo. Use the 0.5.4 beta 1 version as the 0.6.0 once returned me some errors in assembled code.
- From AGD, save your game to a simple .TAP virtual tape file without BASIC loader.
- Reset your emulator to a 48K and issue a CLEAR [game starting address - 1] command; in the example above that would be CLEAR 30999. This will reserve space in the RAM for the game and music data.
- Load in this order the .TAP files - you should have three now - through a LOAD "" CODE command: the game data; the starter data; the player and music data.
- In the tape browser of your emulator, take note of the starting address and length of the second block, that of music data. E.g. if it starts at 58000 and is 500 bytes long, the whole code ends at address 58500.

At this point you can follow two paths:

a) Insert a blank .TAP file in the virtual tape recorder of your emulator and issue this command:

Code: Select all

SAVE "name" CODE [game starting address],[data end address - game starting address]
In the example above that would be

Code: Select all

SAVE "name" CODE 31000,27500
because 58500 - 31000 = 27500.

This will create you a complete game code that you can load with a simple BASIC loader. You can also add a loading screen to that. Still following that example, it would be something like:

Code: Select all

10 BORDER 0: PAPER 0: INK 0: CLEAR 30999
20 LOAD "" SCREEN$ : POKE 23739,111
30 LOAD "" CODE
40 RANDOMIZE USR 32000
50 PAUSE 0: GOTO 40
In line 10, the first three instructions will hide the screen from loading. They are not absolutely necessary, just a matter of preference. It is vital that you insert the CLEAR instruction instead.

Line 20 is optional. It will load a presentation screen and hide the "Bytes: name" line when the game data block will be loaded so that the screen won't be affected.

Line 30 will load the game data block.

Line 40 will execute it. All AGD games from v4.0 on must be executed from address 32000.

Line 50 will wait for the user to press a key, then restart the game.

b) Export the game data, add the starter, player and music data in that order and create a binary file that you must compress in order to fit it into the 16K of each RAM bank, or even to make your game load faster for users who want to load it on real hardware from real or emulated tape (this method can be coupled with a turbo loader as well). To create a binary file, find the Export as binary file option in your emulator and choose the game address as start and the whole data size in bytes length. E.g. 31000 and 27500. Then compress it with ZX7, Exomizer or whatever you like - but remember that once the code will load, you will need to include a decompression routine in order to restore it to its normal size, or you won't able to make any use of it.

All of the above might seem terribly complex at first, but it becomes standard practice once you grasp how things work, and since you have previous programming experience, it should not take a long time. It is more complicated to explain than to do in fact. Moreover, it lets you oversee every aspect of the code block assemblage, which in my opinion - and I am far from being a proper coder - gives you more control over the final result.

There is another method for adding AGD music to your game. It is much simpler but also has its disadvantages. I will discuss it in my next post - this is too much long as it is and could not be readable any more :lol:

Warning: when adding AY music to your game, disable AY in-game sound effects within AGD. The consequences of AY music interfering with them could be disastrous. Use the beeper for sound effects. You can also add external custom beeper effects, much better than the Bronx cheer-like BEEP sounds available in AGD. To do this you must add the extra code between the game buffer area and the AY music starter, and recall them when needed with ASM machine code calls.
Mozartkügel wrote: Mon Jun 17, 2019 2:01 pm Actually I looked at that page a few times already but I didn't translate the italian until now.
Ahem... if you read just under the title, there is the link to the English translation page. Maybe I should have pointed you there from the start. :?
User avatar
Alessandro
Dynamite Dan
Posts: 1908
Joined: Wed Nov 15, 2017 11:10 am
Location: Messina, Italy
Contact:

Re: What 128k model to buy for homebrew development testing and homebrew gaming?

Post by Alessandro »

2) AGD Musicizer - Musicizer II.

These are two utilities created by David Saphier in order to add AY music to AGD-authored games in a very simple way.

Musicizer lets you add a single tune to your game. Taken from the readme.txt file:

- Save your game in AGD with no basic loader (works with the basic loader too but not as clean) as game.tap in AGDMusicizer folder
- [optional] - add screen.scr to AGDMusicizer folder to add loading screen - delete if none is wanted
- Drop a pt3 music file on top of the AGDMusicizer.exe
- A new tap will be created, the name will be the same as what you saved your AGD game.

Note: .PT3 is the Pro Tracker 3 file extension, you can save VT2 tracker files with it.

Musicizer II allows you to add more than a tune, for example if you need them for different parts of the game. The working principle is similar. From within AGD code you select the tune you want to play by changing the value of the M variable - AGD v4.7 lets you use variable names from A to T and they are always located from 32029 to 32048. X and Y are reserved for storing the co-ordinates of each sprite. Both utilities store music data in bank 4 of the Spectrum 128K and later models' RAM as compressed files.

Advantages are, besides a much simpler and faster method, that you can use all of the memory available in AGD to program your game, without caring to reserve space for the music, and that music tracks can be longer.

Disadvantages: you cannot store data in bank 4, and with Musicizer II you cannot use variable M for your purposes. The program also creates an "automated" all-in-one package which you must deconstruct if you want to compress data, add a turbo loader etc. and I personally find that to be rather annoying, more so because it actually prevents you to add music to a single part of a multi-level game. You will also be forced to author separate programs if you want your game to run on a 48K machine as well, one with the Musicizer treatment and one without.

The solution is a sort of reverse-engineering of the Musicizer/Musicizer II ASM code in order adapt it to your purposes. It can be found in the ASM directory of both programs. I did this for Apulija-13 and Sophia II. This allowed me to better organize the space for all of the code parts and avoid using the M variable, by adding the Musicizer/Musicizer II code to my management program and calling the music on/music off code respectively before and after decompressing and executing the AGD game code for each level. That would simply not be possible by employing the routine "as it is".

That's not to say both routines are of little use - quite the opposite in fact. But from my perspective, I cannot employ them as they are, therefore I needed to customize them in order to serve my purposes.
hikoki
Manic Miner
Posts: 576
Joined: Thu Nov 16, 2017 10:54 am

Re: What 128k model to buy for homebrew development testing and homebrew gaming?

Post by hikoki »

you can find PSUs at retrocables;es

Grey +2 Spectrums need a car cassette adapter :)
https://youtu.be/nkLIkv7PZy0
User avatar
Alessandro
Dynamite Dan
Posts: 1908
Joined: Wed Nov 15, 2017 11:10 am
Location: Messina, Italy
Contact:

Re: What 128k model to buy for homebrew development testing and homebrew gaming?

Post by Alessandro »

Errata: in my long post above, read 55393 instead of 55403 and 55403 instead of 55413. Sorry but I changed those values for coherency reasons while I was writing and forgot to edit these two. I am no more able to correct the post now.
User avatar
djnzx48
Manic Miner
Posts: 729
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Re: What 128k model to buy for homebrew development testing and homebrew gaming?

Post by djnzx48 »

Is that the whole process you have to go through every time?

Personally I don't use emulators to produce .tap files. It's too tedious and error-prone if you have to load in all the code blocks manually and save them out again each time you need to make a build. Much simpler is to create a small batch script to assemble everything together, and then you're only a few keypresses away from a full build at any time. Version control also becomes a lot easier when your build is completely automated.
User avatar
Mozartkügel
Drutt
Posts: 27
Joined: Fri Jun 07, 2019 8:19 am
Location: Finland

Re: What 128k model to buy for homebrew development testing and homebrew gaming?

Post by Mozartkügel »

Wow [mention]Alessandro[/mention], thanks for the comprehensive steps on how to achieve it and for the different options how to add music in agd. It'd be really nice if there would be a sticky "creating games in AGD" thread in this forum with all kinds of info like this. I found this thread about AGD itself: viewtopic.php?f=6&t=424&start=10
but not much has been going on there lately.

I agree with you that facebook is not very good for programming info and such, it's really painful to search for old info there and if you find something, everything's hidden under sub-discussions, so there's a ridiculous amount of clicking -_- Also I agree it's evil :twisted: these big corporations should be strictly regulated immediately, it's just riddiculous that ordinary people that don't know any better can sign away their rights at the click of a button.

@[mention]djnzx48[/mention] Easier steps would of course be nice. I guess there's the question what kind of game developper you are too, there's the real programmers of a engineery "personality type" that not only code games but also create these fantastic tools for "retro gamedev" and then there's the artsy tinkerers "personality types" that don't make technically cutting edge games, but make nice games in their own right, for example cute graphics and music (and there's probably every kind of gamedev in between). For example personally I love doing pixel art, music and programming too. Actually I like coding the most (at least in smaller amounts) but still it is my weakest point. Programming tools, batch files, make files and tools like that are even a step further in difficulty. That's why I was asking about a minimal C template in this thread: viewtopic.php?f=6&t=1597
For us tinkerers :mrgreen: I do know every byte counts on these old machines, but I have some experience not coding totally wastefully from the Atari Lynx (it only has 64kb ram too). AGD obviously takes care of a lot of things for you, so I'm excited to try that out too if I can't get something up and running with z88dk.

I've seen that most of the best homebrew projects (obviously) are cooperations between pixel artists, musicians and programmers, but I just get too bored doing only one of those so I want to do most things myself. Luckily there's a lot of nice tools 'n' such for these lovely old computers by now \o/
User avatar
Alessandro
Dynamite Dan
Posts: 1908
Joined: Wed Nov 15, 2017 11:10 am
Location: Messina, Italy
Contact:

Re: What 128k model to buy for homebrew development testing and homebrew gaming?

Post by Alessandro »

[mention]djnzx48[/mention] It's not tedious and error prone if you employ a snapshot file with all of the necessary commands at the BASIC prompt, just press ENTER, load the necessary files in the usual order one at a time, or glue them with ZX-Blockeditor into a single file, and voila. Also remember that you need Vortex Tracker II to export player and music data as a .TAP file if you want to make some use of them, the Hobeta option is restricted to very specific cases.

In addition to that, you do not have to repeat the whole process again and again if you want to substitute just one block of code. For instance when you wish to correct a bug into a single game level and replace the old block with a new one, or when you want to add a game management program in different languages - personally the latter case is frequent in my experience due to the fact that all of my titles are released into several idioms. Just open the file containing all of the blocks in ZX-Blockeditor, replace what you need to be changed and save to a new file.

Anyway - I think there are more than one way to achieve what you want. What is easy and quick for someone can feel cumbersome and difficult for someone else. And vice versa. Your mileage may vary :)
Mozartkügel wrote: Wed Jun 19, 2019 8:51 am I've seen that most of the best homebrew projects (obviously) are cooperations between pixel artists, musicians and programmers, but I just get too bored doing only one of those so I want to do most things myself. Luckily there's a lot of nice tools 'n' such for these lovely old computers by now \o/
Personally I prefer to do all of it by myself, from the loading screen to the character set up to music and sound effects. Creating a game for an obsolete system is something I do for fun in my (scarce) spare time essentially, and won't be nowhere near as captivating if I would delegate one or more parts of it to someone else.
User avatar
Mozartkügel
Drutt
Posts: 27
Joined: Fri Jun 07, 2019 8:19 am
Location: Finland

Re: What 128k model to buy for homebrew development testing and homebrew gaming?

Post by Mozartkügel »

Alessandro wrote: Wed Jun 19, 2019 9:49 am In addition to that, you do not have to repeat the whole process again and again if you want to substitute just one block of code. For instance when you wish to correct a bug into a single game level and replace the old block with a new one, or when you want to add a game management program in different languages - personally the latter case is frequent in my experience due to the fact that all of my titles are released into several idioms. Just open the file containing all of the blocks in ZX-Blockeditor, replace what you need to be changed and save to a new file.
That's nice, good to know!
Alessandro wrote: Wed Jun 19, 2019 9:49 am
Mozartkügel wrote: Wed Jun 19, 2019 8:51 am I've seen that most of the best homebrew projects (obviously) are cooperations between pixel artists, musicians and programmers, but I just get too bored doing only one of those so I want to do most things myself. Luckily there's a lot of nice tools 'n' such for these lovely old computers by now \o/
Personally I prefer to do all of it by myself, from the loading screen to the character set up to music and sound effects. Creating a game for an obsolete system is something I do for fun in my (scarce) spare time essentially, and won't be nowhere near as captivating if I would delegate one or more parts of it to someone else.
I agree that it's most exciting to try and learn most everything yourself, it's so much fun! :D I've started a couple of projects with others, and that's also fun when you get to talk about the project and retro computers all the time and in the way that you can have more projects going on at one time than when working by yourself. However since most of us have really scarce spare time, co-operation projects are even harder to finish than lone-working projects in my experience. :o
User avatar
Mozartkügel
Drutt
Posts: 27
Joined: Fri Jun 07, 2019 8:19 am
Location: Finland

Re: What 128k model to buy for homebrew development testing and homebrew gaming?

Post by Mozartkügel »

Alessandro wrote: Tue Jun 18, 2019 9:57 am
Mozartkügel wrote: Mon Jun 17, 2019 2:01 pm Actually I looked at that page a few times already but I didn't translate the italian until now.
Ahem... if you read just under the title, there is the link to the English translation page. Maybe I should have pointed you there from the start. :?
My eyes are immediately drawn to the colorful loader pictures :lol: The translation link should've been quite easy to find indeed haha. :oops:
Post Reply