Thinking about a Warlords emulator for the beeb

reminisce about bbc micro & electron games like chuckie egg, repton, elite & exile

Related forum: adventures


User avatar
tricky
Posts: 1620
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Thinking about a Warlords emulator for the beeb

Postby tricky » Sat Jun 10, 2017 6:32 pm

I've been thinking about a Warlords emulator for the beeb.
Warlords uses the same (or very similar) hardware to Centipede and a few other games and not too different to Sprint and the Exidy games that I have already written beeb emulators for.
For the software developer, the machine looks like a 256x224 240 pixel 32x28 30 character display, where each character is one of 64 that can be flipped or mirrored. There is a second set of 64 8x8 pixel tiles that can be used as one of the 16 sprites, again each can be flipped or mirrored.
Image
These are the characters (top) and tiles (bottom) that Warlords has.
The hardware also supports a palette for each sprite and some sort of attribute map for the characters.
The sound is handled by a POKEY, which is quite a flexible 4 channel sound chip which also handles ADC (8 channels), timers and a keyboard matrix.
With routines to flip the sprites and flip and mirror the tiles, 10kB 12kB (11 sprites and 1 tiles) is needed for the gfx data, 12kB 13kB if I skip the flipping code for tiles (can't really skip the sprite flip code as that would add 8kB 22kB+tiles).
So the memory budget looks like:

Code: Select all

 1kB Warlords RAM
 1kB Warlords character map + sprite info (X, Y, tile etc)
15kB emulator display
 1kB emulator copies of character map + sprite info (X, Y, tile etc)
? kB emulator code
12kB Warlords game ROM
12kB expanded sprites and tiles
~4kB unrolled code to draw the sprites and tiles
So it looks like one bank of sideways RAM will be needed.
The game also has 8 sound effects:

Code: Select all

soft boom : bat hit fire ball / start game timer
lazer boom: fireball hit edge of screen / wall
soft boom : fireball hit edge of screen
explosion : player died*
fanfair   : game over
laser shot: shoot fire ball*
chink boom: ball hit crenelation*
zip boom  : fireball hit crenelation
*all started together
Since it looks like all the POKEY channels can make "noise", and most of the effects use "noise", I will have to swap some out, so I will probably write beeb replacements for them instead of simulating the POKEY.
The final thing is that Warlords is a four player game, with each player having a "paddle" and "fire" button.
After chatting with flynnjs, it looks like there is a fairly simple and cheap way to allow four fire buttons and after checking the wiring on Atari VCS/2600 paddles, it looks like they can be modified very simply to work on the beeb (unfortunately, not the joysticks though).

PS There is also the problem that six colours are used per scan line, the fireball itself is red, yellow, white/cyan and a black background.
Attachments
screenshot.png
tiles_and_sprites.png
(3.16 KiB) Not downloaded yet

User avatar
FourthStone
Posts: 273
Joined: Thu Nov 17, 2016 2:29 am

Re: Thinking about a Warlords emulator for the beeb

Postby FourthStone » Fri Jun 16, 2017 3:44 am

Looks interesting Tricky, are you planning on doing a beeb version or a whole emulated system? Not sure what you meant by 'Warlords emulator for the beeb'

Keep posting updates, love getting insight into your development process.

User avatar
tricky
Posts: 1620
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Thinking about a Warlords emulator for the beeb

Postby tricky » Fri Jun 16, 2017 6:58 am

I am planning on doing a similar thing to my emulators for circus, ripcord and sprint.

The original arcade ROMs are loaded into the beeb along with some code to pretend to be whatever hardware the original arcade cabinet other than the 6502 (input, sound, sprites, LEDs etc).

I then load a simple basic programme to patch the original ROMs to divert the code or point it to different addresses so that it thinks it is still running on the original hardware.

And hey presto, after some "tricky" bits of disassembly and coding you have a complete game with all the boring bits done for you :)

A bit like a single game version of MAME.

User avatar
FourthStone
Posts: 273
Joined: Thu Nov 17, 2016 2:29 am

Re: Thinking about a Warlords emulator for the beeb

Postby FourthStone » Fri Jun 16, 2017 2:07 pm

:shock: ... =D>

User avatar
tricky
Posts: 1620
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Thinking about a Warlords emulator for the beeb

Postby tricky » Sat Jun 17, 2017 7:52 pm

I've been doing a few timing calculations and it looks like 16 8x8 pixel mode 1 sprites is about the limit for the routines I have lying around.
The character routines are pretty much straight out of my other "emulators" and are fine as long as not too much is changing per frame (player dies!).
I haven't checked if Warlords uses hardware collision detection (most games never bothered) but if it does it might be tricky (in a bad way).
From looking at the code not all of the sprites are used all of the time and when they are, they are not all moving (I will only draw them when they move).
If everything is moving, there is less than 2ms left for emulation and the game, so I am hoping Warlords doesn't use much CPU!


Return to “software: games”

Who is online

Users browsing this forum: No registered users and 3 guests