Old Tower

People are still making stuff for the Sinclair related machines. Tell us about new games and other software that runs on the Spectrum, ZX80/ZX81, Pentagon and Next.
User avatar
MatGubbins
Dynamite Dan
Posts: 1238
Joined: Mon Nov 13, 2017 11:45 am
Location: Kent, UK

Re: Old Tower

Post by MatGubbins »

djnzx48 wrote: Sat Nov 10, 2018 9:52 am I experienced a reset after finishing one of the levels in the second section, with one life remaining, but I haven't tried to reproduce it.
I had the 128k version corrupt upon the start of level 11. The outer blue walls (not part of the game) were ok, but the game area was a random pile of flashing attributes. I was using EmuZWin, a quick tap of ALT+left cursor and step back 2 seconds before the corruption, and the game moved to level 11 perfectly.

-Edit- added picture because the crash happened again
Image
- I can also email a z80 of the file -

How about Old Tower 2.... we've found another tower! Scores are based on how quick each level is completed, taking chances with the enemy and thinking fast.

A big thank you for the 48k version, music, sound and colour too.
User avatar
djnzx48
Manic Miner
Posts: 729
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Re: Old Tower

Post by djnzx48 »

The crash I got might have been something different, but I wasn't counting levels. Here's an RZX of it occurring if it helps:
OldTowerCrash.rzx

EDIT: The crash occurs because of a LD (BC), A instruction at $FBD4 that takes out the interrupt handler when BC == $BFBF. I think the LD (BC), A is put there by some other code, but I have not found out what yet.
User avatar
DenisGrachev
Dizzy
Posts: 88
Joined: Fri Feb 09, 2018 2:32 am
Location: Novosibirsk, RU
Contact:

Re: Old Tower

Post by DenisGrachev »

djnzx48 wrote: Sun Nov 11, 2018 3:37 am The crash I got might have been something different, but I wasn't counting levels. Here's an RZX of it occurring if it helps:
OldTowerCrash.rzx

EDIT: The crash occurs because of a LD (BC), A instruction at $FBD4 that takes out the interrupt handler when BC == $BFBF. I think the LD (BC), A is put there by some other code, but I have not found out what yet.
Thanks for rzx,quick looks like i found a problem with a switch music for new world proc, quick poke ret to 62AD and it works ok. Upload new version by the same links, need to test
User avatar
R-Tape
Site Admin
Posts: 6353
Joined: Thu Nov 09, 2017 11:46 am

Re: Old Tower

Post by R-Tape »

Great work Denis! A nice puzzler in your distinctive style.
Spoiler
Infy lives:
48K version POKE 25054,0
128K version POKE 25060,0
Pentagon POKE 25250,0
A multicolour vertical shmup is inevitable surely.
User avatar
djnzx48
Manic Miner
Posts: 729
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Re: Old Tower

Post by djnzx48 »

If you turn the TV/monitor sideways you could get a nice horizontal scroller.
User avatar
MatGubbins
Dynamite Dan
Posts: 1238
Joined: Mon Nov 13, 2017 11:45 am
Location: Kent, UK

Re: Old Tower

Post by MatGubbins »

Loaded Old Tower onto my +2 Grey last night via tape. 10 minutes later, loaded!
Pure fun, colourful and exciting on a LCD TV with RGB lead. 10 minutes later, completed with 1 life lost on pesky level 13.
Played again to admire the scrolling graphics and colours.

If this game was released back in 1988 would the magazine reviewers notice the scrolling colours and graphics or would they moan about the small graphics and small game play area?
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Old Tower

Post by Ast A. Moore »

MatGubbins wrote: Wed Nov 21, 2018 12:54 pm Loaded Old Tower onto my +2 Grey last night via tape. 10 minutes later, loaded!
That’s a shame. Not to worry, though, [mention]MatGubbins[/mention] (and the rest of us, who want to use the original hardware but do not own—or fancy—a DivIDE/DivMMC or similar interface). I equipped both versions with my turbo loader, so the 128K one loads in under three minutes, and the 48K one in less than a minute and a half.

Old Tower (Turbo Loader)

(Needs thorough testing, since I couldn’t be bothered to play the entire game through. :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.
User avatar
MatGubbins
Dynamite Dan
Posts: 1238
Joined: Mon Nov 13, 2017 11:45 am
Location: Kent, UK

Re: Old Tower

Post by MatGubbins »

Thanks for the WAV files, I've had trouble with them though.

This is for the 128K version (I've not tried the 48K version)
I added an extra 3 seconds to the tone to the BASIC header program so that a real Spectrum can grasp the idea of something loading.

Then added an extra 1 second gap between the end of the BASIC data and the turbo loader tone so that it had enough time to get the machine code up and running.

Then added an extra 1 second gap after the screen picture data and the rest of the turbo data.

Before doing the modifications it was a hit and miss on getting the BASIC header into the Spectrum. When it did work I had to rewind the media player to the start of the turbo loader and play again.

Image

They do work, just needed a bit of tweeking.

As to the game itself, the levels, music and code seem to work fine, completed and messed around with a few levels doing a speed run.
That is a fast turbo loader!!
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Old Tower

Post by Ast A. Moore »

MatGubbins wrote: Thu Nov 22, 2018 11:00 pm They do work, just needed a bit of tweeking.

As to the game itself, the levels, music and code seem to work fine, completed and messed around with a few levels doing a speed run.
That is a fast turbo loader!!
Thanks, Mat!

This is interesting, as they work perfectly on both my Toastrack and my +2A. How do you load WAV files into your machine? Also, have you tried converting the TZX files (the way you’d normally do it)? I use Tapir to play them back, but WAV files work fine as well. I tried it hundreds of times back when I was developing the loader with the computer and the phone as the source, varying the volume, etc.

P.S. The loader is self-recovering, by the way. If a particular block fails to load, you can just rewind to its beginning a reload. You can even rewind to the beginning of the tape, as it won’t load the wrong block.

P.P.S. Your picture suggests that you only added extra gaps between the loader and the loading screen, and the loader and the rest of the data. I assume you didn’t have to add gaps to the remaining blocks (there are quite a few).

P.P.P.S. A though occurs. You have a +2, right, not a +2A? In that case, how do you feed audio into it—via a cassette adaptor or an input jack mod? If it’s the latter, and the mod is a simple jumper to the ULA’s input, it might present two problems. One is that the +2 circuitry lacks a diode to ground that cuts off negative signals and a series capacitor to remove any DC offset before it. The ULA generally doesn’t take kindly to negative voltages on its EAR input; it may even get damaged. The other problem is that the signal may not always be strong enough (it’s effectively halved). Try editing my original WAV file and introducing a positive DC bias so that the signal doesn’t go below zero (well, occasional peaks are fine), and see if that makes a difference.

What I find strange is that your +2 didn’t like the slightly shorter pilot of the BASIC loader. There are a few commercial Spectrum games that use even shorter pilots, so that technically should not present a problem.
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
MatGubbins
Dynamite Dan
Posts: 1238
Joined: Mon Nov 13, 2017 11:45 am
Location: Kent, UK

Re: Old Tower

Post by MatGubbins »

I'm using a +2 Grey with a cassette adaptor connected to my laptop to the sound out port. This has been the usual way of loading all the homebrew games for the last few years and it's rare to have a loading problem.

The (powered from the wall) laptop is using XP and I have both the Master volume and WAV output controls to just under max to get games to load. I can mess around with the WAV output if things go a little strange. I use windows media player to play the WAV file. No screen savers, no messing around with the computer when a game is loading, just like old times to sit back and do some school homework)

I didn't add gaps between the extra blocks of code, but after a few more attempts at loading the game after the last posting it did fail when loading one of the later blocks of code - so it might need a slightly longer gap between each block than is already there, not as much as 1 second but something to give the Spectrum a breather between loading and thinking again.

The header tone was hit and miss, as soon as an extra few seconds were added (cut and past the correct 3 tones in) then the Spectrum would grab it 100%

I use SoundForge to edit the WAV files, this is my main weapon of choice for many many years for music and it's great for close-up editing.


Sorry to Denis for hijacking the turbo loading of the game in this thread, but it's also promoting the game for those that didn't see it the first time around. If you've already played the game, give it another go and enjoy the experience, the scrolling, colours and music... Yay!
User avatar
MatGubbins
Dynamite Dan
Posts: 1238
Joined: Mon Nov 13, 2017 11:45 am
Location: Kent, UK

Re: Old Tower

Post by MatGubbins »

Ah, I think I've found the solution.

I converted your turbo .TZX file with Tape2Wav 1.8 (I use this prgram for all .TAP to .WAV conversions and play the .WAV file in media player to the Spectrum) and found that it creates a .WAV file that is louder than Tapir.
I didn't need to add any extras to the header or gaps between the code blocks.

As per the screenshot
Image

I also boosted your original Tapir .WAV file in Soundforge to match the Tape2Wav volume and that worked too.
It looks as if Tapir is outputting a .WAV file a lot quieter than it should be.

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

Re: Old Tower

Post by Ast A. Moore »

Logic-wise, my loader doesn’t need as much time to sync up to the pilot tone. I just tested it with even shorter pilots and everything was hunky-dory.

Looks like the problem is in the analog circuitry. I’m not sure if the problem is inherent in the design on the +2’s tape head amplifier, the cassette adaptor you’re using, or your WinAMP/laptop. It seems there’s something akin to an auto-level adjustment circuitry that kicks in with a rather long relaxation period. It doesn’t like certain amplitude changes and tries to compensate. While it’s doing that, the ULA doesn’t get much in terms of an audio signal.

Could you test the TZX files themselves? How do you normally convert them to audio? Did you have problems with, say, Bleepload-protected games?

Addendum: I just cobbled together my own cassette adaptor (found and old tape head and soldered a lead with a 3.5 mm jack to it). I then held my adaptor head against the tape head in the Datacorder of my +2A and gave my loader a few tries, playing back the audio from my phone. I even played around with the volume setting just to see if that mattered. Everything loaded on the first try; no errors. :?
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: Old Tower

Post by Ast A. Moore »

MatGubbins wrote: Fri Nov 23, 2018 12:50 pm Ah, I think I've found the solution.
Cool! Disregard my previous post then. (I had it sitting a few hours before I edited and posted it, so I didn’t see yours.)

Tapir’s output is surprisingly close to what a real Spectrum would produce, but since it’s operating entirely in a digital domain, the amplitude is limited by your device’s output voltage/impedance, which, in modern equipment, is quite skimpy, compared to that of the ’80s.

Thanks again for your time and patience!
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
DenisGrachev
Dizzy
Posts: 88
Joined: Fri Feb 09, 2018 2:32 am
Location: Novosibirsk, RU
Contact:

Re: Old Tower

Post by DenisGrachev »

Nice loader! Did you compress data or just increase loading speed?
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Old Tower

Post by Ast A. Moore »

DenisGrachev wrote: Mon Nov 26, 2018 9:40 am Nice loader! Did you compress data or just increase loading speed?
Thanks!

I only compressed the loading screen. The rest is uncompressed but the data rate is about 3x the standard ROM loader. It’s also more compact than the ROM loader, and can load only specific data blocks. Aside from ignoring the “wrong” high-speed data blocks, I also fine tuned it to ignore the standard pilot tone or long sequences of ones and zeros, so the they wouldn’t trigger it, either. A fairly robust beast all around. ;)

I could make it even faster, but that would require testing it with real tapes (ideally of the poorer quality) and low-end tape players, to simulate a typical loading setup of the 1980s. The Spectrum’s ULA and analog filtering circuitry can handle fairly high data rates. The real bottleneck is the tape medium itself: the amplitude will drop dramatically (depending on the tape’s type and quality) as the frequency goes up. Besides, many cheap-o tape players had a cutoff frequency of about 6 kHz or even lower, so at least theoretically, my loader operates at the upper limit of what would have been possible back in the day.

A typical Type I ferric oxide tape can go up to, oh, say, 8–12 kHz. My loader peaks at about 6.3 kHz—well within the tape’s frequency range. These latest tests by Matt on his +2 and by me on my +2A demonstrate that the built-in datacorders in these machines are easily capable of loading data at the rate offered by my turbo loader. Whether the rate can be safely increased is subject to long and rigorous tests, which I’m not inclined to perform at the moment.

Still, three minutes for a fairly fat 128K game isn’t that bad, if I do say so myself. :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.
User avatar
stupidget
Dynamite Dan
Posts: 1611
Joined: Wed Jan 24, 2018 2:09 pm
Location: Sunny Wolverhampton

Re: Old Tower

Post by stupidget »

Finished this ,frankly brilliant game, earlier today without any bugs or crashes.

Image
User avatar
R-Tape
Site Admin
Posts: 6353
Joined: Thu Nov 09, 2017 11:46 am

Re: Old Tower

Post by R-Tape »

stupidget wrote: Sat Dec 01, 2018 7:17 pm Finished this ,frankly brilliant game, earlier today without any bugs or crashes.
Top stuff. Only one life lost? Did you play on bread and water, or POKE it? If the latter, did you BREAK the loader to do so?
User avatar
stupidget
Dynamite Dan
Posts: 1611
Joined: Wed Jan 24, 2018 2:09 pm
Location: Sunny Wolverhampton

Re: Old Tower

Post by stupidget »

R-Tape wrote: Sat Dec 01, 2018 8:47 pm
stupidget wrote: Sat Dec 01, 2018 7:17 pm Finished this ,frankly brilliant game, earlier today without any bugs or crashes.
Top stuff. Only one life lost? Did you play on bread and water, or POKE it? If the latter, did you BREAK the loader to do so?
I played it on my +2 using a DiVMMC so i took lots of snapshots 😀
User avatar
Ersh
Manic Miner
Posts: 480
Joined: Mon Nov 13, 2017 1:06 pm

Re: Old Tower

Post by Ersh »

At last I had some time to sit down and play this properly. What can I say, it's simply great, not only the silky smooth multicolour scrolling tech and nice pixelart but the gameplay as well. The game design is also superb. For instance; I love how it introduces the 'switch-character' mechanic, the two are placed in separate rooms so when you've collected everything with the first character and got nowhere else to go, you look at the other room, notice the other character and try the fire-button, no instructions needed, just great! Had a lot of fun completing this. Great job!

Edit: Oh and also the pacing was excellent, having some more action-oriented levels after a particularly taxing puzzle level. Helps with the motivation.
User avatar
DenisGrachev
Dizzy
Posts: 88
Joined: Fri Feb 09, 2018 2:32 am
Location: Novosibirsk, RU
Contact:

Re: Old Tower

Post by DenisGrachev »

ok, here is another one quick and dirty way to edit a levels in old tower
http://www.retrosouls.net/zx/!otCustom.zip

edit with charpad run a build.bat, enjoy a show!
there is a limitation with number of coins,enemies,guns and heroes on level, do not remember it right now.

kudos!
User avatar
Ersh
Manic Miner
Posts: 480
Joined: Mon Nov 13, 2017 1:06 pm

Re: Old Tower

Post by Ersh »

That's bloody brilliant Denis! :D Thanks for all your hard work!
User avatar
DenisGrachev
Dizzy
Posts: 88
Joined: Fri Feb 09, 2018 2:32 am
Location: Novosibirsk, RU
Contact:

Re: Old Tower

Post by DenisGrachev »

Upload an Old Tower sources, as is:

http://www.retrosouls.net/zx/!otSrc.zip

have fun!
User avatar
Einar Saukas
Bugaboo
Posts: 3070
Joined: Wed Nov 15, 2017 2:48 pm

Re: Old Tower

Post by Einar Saukas »

DenisGrachev wrote: Wed Jan 16, 2019 5:36 am Upload an Old Tower sources, as is:

http://www.retrosouls.net/zx/!otSrc.zip

have fun!
That's awesome, thank you!!!

Hopefully your example will motivate more developers to release their source codes too!!!
User avatar
zedex82
Drutt
Posts: 21
Joined: Tue Nov 27, 2018 3:49 pm
Location: Herefordshire

Re: Old Tower

Post by zedex82 »

This gane is mint.

Not much else to say :)
User avatar
DenisGrachev
Dizzy
Posts: 88
Joined: Fri Feb 09, 2018 2:32 am
Location: Novosibirsk, RU
Contact:

Re: Old Tower

Post by DenisGrachev »

In case you missed we made a port to Sega Genesis\Megadrive with new levels and gfx.

https://retrosouls.itch.io/old-towers

https://youtu.be/otnIIrQYpbU

Cheers!
Post Reply