VOGONS


Release: RATillery, an artillery game for PC

Topic actions

First post, by raphnet

User metadata
Rank Newbie
Rank
Newbie

I created a small game named RATillery where two fireball-throwing rats fight atop stacks of crates in a warehouse:

Requirements:

  • CGA-compatible graphics adaptor or Tandy video adaptor.
  • Memory: 64 Kb (CGA version), 128 Kb (Tandy version).
  • Disk space: 64 Kb.
  • Operating system: DOS is optional (PC booter version also available).

http://www.raphnet.net/programmation/ratillery/index_en.php

This game was inspired by Gorillas.bas which would not run on my Tandy 1000 EX... So I made this new game that does. It works fine on my Tandy 1000 EX clocked at 7.16MHz, but I estimate it would also run well at 4.77MHz, based on tests with DOSBox set at 300 cycles. I would be curious to hear how it works on an original IBM PC and on PCjr... if anyone tries, please let me know.

I hope you enjoy the game!

Reply 1 of 33, by keenmaster486

User metadata
Rank l33t
Rank
l33t

Whoa, this is really cool! I want to play this on my upcoming 8088 build 😎

World's foremost 486 enjoyer.

Reply 2 of 33, by awgamer

User metadata
Rank Oldbie
Rank
Oldbie

What? No CGA 16 color composite mode? pffft. 😀

Reply 3 of 33, by VileR

User metadata
Rank l33t
Rank
l33t

Truly an oldschool-spirited project, from the 100% assembly coding to the booter version. We need more of this kind of stuff. 😀

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 5 of 33, by Scali

User metadata
Rank l33t
Rank
l33t

Very nice, I will have to test it on my IBM PC/XT soon.
Also:

I composed the music using MONOTONE. I use the Disk Writer function which saves the values one must write to the registers controlling the PC speaker to reproduce the music.

I hope you took a recent version of MONOTONE from the GitHub: https://github.com/MobyGamer/MONOTONE
I've done some small modifications to the code, and one of the things was to add a CTRL-W shortcut, so you could easily generate these values on-the-fly.
I also added a simple replayer routine in asm for such files: https://github.com/MobyGamer/MONOTONE/blob/ma … ayer/PLAYER.ASM
This one is based on the routine we used in the loader of 8088 MPH, written by Trixter.
I also added a simple commandline player for .MON files, which has an option to output to a PIT file as well.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 6 of 33, by raphnet

User metadata
Rank Newbie
Rank
Newbie
Scali wrote:
I hope you took a recent version of MONOTONE from the GitHub: https://github.com/MobyGamer/MONOTONE I've done some small modific […]
Show full quote

I hope you took a recent version of MONOTONE from the GitHub: https://github.com/MobyGamer/MONOTONE
I've done some small modifications to the code, and one of the things was to add a CTRL-W shortcut, so you could easily generate these values on-the-fly.
I also added a simple replayer routine in asm for such files: https://github.com/MobyGamer/MONOTONE/blob/ma … ayer/PLAYER.ASM
This one is based on the routine we used in the loader of 8088 MPH, written by Trixter.
I also added a simple commandline player for .MON files, which has an option to output to a PIT file as well.

Yes, I used the latest version from GitHub, and also used CTRL+W to dump PIT files.

And in fact, I adapted the mentioned replayer routine for nasm and added features I needed such as RLE decompression, support for different songs (each one has an ID), optional looping and muting support (where the track still rolls, but no sound is produced; I use this during in-game sound effects to mute the music).

Reply 7 of 33, by MobyGamer

User metadata
Rank Member
Rank
Member

Well, this is a wonderful surprise and a delightful little game. It would have easily been a good "bargain" purchase back in the 1980s, having better music, graphics, animation, and screen effects than other games in the day -- it's even family-friendly. This is a really great effort!

raphnet wrote:

I would be curious to hear how it works on an original IBM PC and on PCjr... if anyone tries, please let me know.

I tested the CGA .COM on my IBM PC/XT and it worked perfectly. I'm guessing you're either waiting for retrace or using the timer @ 59.92 Hz, because the animation was perfectly smooth. I then tested the .COM on a PCjr with a memory expansion and it also worked perfectly.

I tested the TGA .COM file on an IBM PCjr with memory expansion and it runs, but every 3rd and 4th lines are black because you are accessing all 32K at b800h as if it were contiguous -- that works on a Tandy but not on a PCjr (on PCjr b800 only accesses 16K, so you have to switch graphics banks to get at the other 16K). This is common for games that were written on/for a Tandy and after the PCjr flopped in the marketplace, so don't feel bad. The game runs fine otherwise, although the floppy drive spins constantly while it is running, so I'm guessing you are completely taking over int 08 and not servicing the prior BIOS tick interrupt while the game runs (shame on you :-).

The bootable images did not work (I verified they were written correctly). The CGA bootable disk on the PC/XT prints "1.C" and then hangs. The TGA bootable disk on the PCjr prints "1.............C" and then hangs.

Reply 8 of 33, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++

Amazing work. Some small info. I know the file is small but with 7-zip it's just 24,2 KB packed.

Intel i7 5960X
Gigabye GA-X99-Gaming 5
8 GB DDR4 (2100)
8 GB GeForce GTX 1070 G1 Gaming (Gigabyte)

Reply 9 of 33, by MobyGamer

User metadata
Rank Member
Rank
Member
MobyGamer wrote:

The bootable images did not work (I verified they were written correctly). The CGA bootable disk on the PC/XT prints "1.C" and then hangs. The TGA bootable disk on the PCjr prints "1.............C" and then hangs.

A friend confirmed the bootable CGA image doesn't work on a 5150, but it does work on a 5170 (AT), so that's something to investigate. The boot images work in emulators, of course.

Looking at your boot sector source, "C" is supposed to indicate "address mark not found or bad sector" but I verified the disk was fine... Looking at your boot sector source, you CLI but never STI, that may be causing this. You should STI once you're done with atomic operations. Actually, since MOV SS,reg will disable interrupts for the next instruction, you don't need the CLI at all. I'll NOP it out and try it on my XT.

Reply 10 of 33, by carlostex

User metadata
Rank l33t
Rank
l33t

This is awesome!!!! More power to the 8088 and the 1980's, it's great to see new stuff being released for the old IBM's and clones.

Reply 11 of 33, by raphnet

User metadata
Rank Newbie
Rank
Newbie
MobyGamer wrote:
MobyGamer wrote:

The bootable images did not work (I verified they were written correctly). The CGA bootable disk on the PC/XT prints "1.C" and then hangs. The TGA bootable disk on the PCjr prints "1.............C" and then hangs.

A friend confirmed the bootable CGA image doesn't work on a 5150, but it does work on a 5170 (AT), so that's something to investigate. The boot images work in emulators, of course.

Looking at your boot sector source, "C" is supposed to indicate "address mark not found or bad sector" but I verified the disk was fine... Looking at your boot sector source, you CLI but never STI, that may be causing this. You should STI once you're done with atomic operations. Actually, since MOV SS,reg will disable interrupts for the next instruction, you don't need the CLI at all. I'll NOP it out and try it on my XT.

That's interesting, let me know what happens. By the way, which file did you use, and on what kind of disk did you write it?

My bootloader source is here, assuming you are looking at a disassembly: http://www.raphnet.net/programmation/booterify/index_en.php

Reply 12 of 33, by raphnet

User metadata
Rank Newbie
Rank
Newbie
MobyGamer wrote:

I tested the CGA .COM on my IBM PC/XT and it worked perfectly. I'm guessing you're either waiting for retrace or using the timer @ 59.92 Hz, because the animation was perfectly smooth. I then tested the .COM on a PCjr with a memory expansion and it also worked perfectly.

Nice! Yes, the game waits for vertical retrace. Except for things that are slow (fire effect and screen fades) it also makes the game run at a constant speed, even on modern systems. 😀

MobyGamer wrote:

The game runs fine otherwise, although the floppy drive spins constantly while it is running, so I'm guessing you are completely taking over int 08 and not servicing the prior BIOS tick interrupt while the game runs (shame on you 😀.

That's bad! It will wear down the read head and the media if left like this for too long. Ah, I should have noticed. (Too much testing in DOSBox, that's how it happens...). Thanks, I'll fix that!

Reply 13 of 33, by raphnet

User metadata
Rank Newbie
Rank
Newbie

Thanks to everyone who gave feedback and comments! This is very encouraging, I think this probably won't be my last project of the kind... 😀

So I just released version 1.1:

  • Commented-out the unnecessary CLI as suggested by MobyGamer (I hope that fixes booting. If not, well, there will be another version later...)
  • Let the floppy drive stop spinning by calling the original int08 handler.
  • Added a 320Kb floppy image.

Note that I expect writing the 360Kb floppy image to a 720Kb floppy to work. So I'm not adding 720kb images for now.

Reply 14 of 33, by xjas

User metadata
Rank l33t
Rank
l33t

Neat game! I was playing it on your website for a good 45 mins just now. It's good fun and I needed the stress relief. 😁 Love the art & music.

twitch.tv/oldskooljay - playing the obscure, forgotten & weird - most Tuesdays & Thursdays @ 6:30 PM PDT. Bonus streams elsewhen!

Reply 15 of 33, by konc

User metadata
Rank l33t
Rank
l33t

I tried it on an XT with a Hercules clone + SIMCGA, with no luck. Don't get me wrong, I'm not saying it should work like that and of course I can always run it in dosbox, just hoped to spend some time on the real thing with a new XT/DOS game once more. Ended up playing it on dosbox for quite some time (fan of gorillas/scorched earth/Bang Bang and all those artillery games). Nicely done, I'm always unreasonably excited when new software emerges for XTs, especially when it's that good!

Reply 16 of 33, by raphnet

User metadata
Rank Newbie
Rank
Newbie
konc wrote:

I tried it on an XT with a Hercules clone + SIMCGA, with no luck. Don't get me wrong, I'm not saying it should work like that and of course I can always run it in dosbox, just hoped to spend some time on the real thing with a new XT/DOS game once more. Ended up playing it on dosbox for quite some time (fan of gorillas/scorched earth/Bang Bang and all those artillery games). Nicely done, I'm always unreasonably excited when new software emerges for XTs, especially when it's that good!

Well the game does not do anything special and uses the BIOS to set a standard video mode. So I would have expected this to work... But just now I had a quick look at how SIMCGA works and I think this can be explained. The game waits for vsync by polling port 3DAh, however it seems that on a Hercules card, it is in fact port 3BAh bit 7 that should be polled. So I made a special build for Hercules+SIMCGA which uses the correct port:
http://www.raphnet.net/programmation/ratillery/hgccga.com

Could you give it a try?

Reply 17 of 33, by Scali

User metadata
Rank l33t
Rank
l33t
raphnet wrote:

The game waits for vsync by polling port 3DAh, however it seems that on a Hercules card, it is in fact port 3BAh bit 7 that should be polled.

The status bit is also 'inverted' compared to the vsync status on CGA... So Hercules sets the bit to 1 when it is not in vsync, while CGA sets the bit to 1 when it is in vsync.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 18 of 33, by MobyGamer

User metadata
Rank Member
Rank
Member
raphnet wrote:

[*]Commented-out the unnecessary CLI as suggested by MobyGamer (I hope that fixes booting. If not, well, there will be another version later...)

That appears to have done the trick; the 320K image boots on a real IBM PC/XT. I'm going to assume the others are fine too.

Reply 19 of 33, by konc

User metadata
Rank l33t
Rank
l33t
raphnet wrote:

Well the game does not do anything special and uses the BIOS to set a standard video mode. So I would have expected this to work... But just now I had a quick look at how SIMCGA works and I think this can be explained. The game waits for vsync by polling port 3DAh, however it seems that on a Hercules card, it is in fact port 3BAh bit 7 that should be polled. So I made a special build for Hercules+SIMCGA which uses the correct port:
http://www.raphnet.net/programmation/ratillery/hgccga.com

Could you give it a try?

Damn you, another hour just passed 😉 Yep, it's working perfectly on two different XTs & Hercules clones using SIMCGA.