A new Warlords emulator for the beeb (was Writing a ...)

new games to be launched and discussed here
User avatar
Arcadian
Posts: 2744
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: A new Warlords emulator for the beeb (was Writing a ...)

Postby Arcadian » Wed Aug 09, 2017 1:06 pm

Richard if you can post an interface to me at the Museum of Science and Industry, Manchester I can run Warlords for the Power Up event which runs from 11-28 August.

I have lots of pairs of dual Atari paddles with the 9 pin connectors.

Let me know if that's possible! :)
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk

Image
ABug Leicestershire (17-19 November 2017)

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

Re: A new Warlords emulator for the beeb (was Writing a ...)

Postby tricky » Wed Aug 09, 2017 2:10 pm

I won't be home until Friday, but could lend you mine.
The paddles would also need the extra white wire adding and may need the other wires on the pot swapping around.
I only have one set of Atari paddles at the moment.

User avatar
Arcadian
Posts: 2744
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: A new Warlords emulator for the beeb (was Writing a ...)

Postby Arcadian » Wed Aug 09, 2017 2:59 pm

Hi, that would be great. I'll email you the address here, and I'll see if somebody local can do the mod for me on my paddles. Cheers Richard!
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk

Image
ABug Leicestershire (17-19 November 2017)

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

Re: A new Warlords emulator for the beeb (was Writing a ...)

Postby tricky » Thu Aug 10, 2017 9:52 am

dp11 wrote:What is the NAND gate doing ?

Having had another look, I guess an LS157 would be a more appropriate solution as it has four 2-input multiplexers in one chip.

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

Re: A new Warlords emulator for the beeb (was Writing a ...)

Postby tricky » Sat Aug 12, 2017 5:02 pm

Mark II adapter, 2/4 atari paddles only, they require the mod listed above.
This one is off to the Museum of Science and Industry, Manchester (11–28 August 2017) for Power Up!
ImageImageImageImage
From their web-site: Power Up!
Power Up! is back for 2017 with over 160 consoles on offer. Get your game face on and play some of the most popular video games from the past 40 years, from Pong and Pacman to Minecraft and Mario.
Attachments
proto2_4.jpg
(33.97 KiB) Not downloaded yet
proto2_3.jpg
(32.35 KiB) Not downloaded yet
proto2_2.jpg
(35.56 KiB) Not downloaded yet
proto2_1.jpg
(28.55 KiB) Not downloaded yet

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

Re: A new Warlords emulator for the beeb (was Writing a ...)

Postby tricky » Sat Aug 19, 2017 1:34 pm

This seems OK on a Model B, B+ and Master although, we haven't got it working with a DataCentre yet.

This game requires one 16K sideways RAM bank, the disk image attached, 1-4 paddles (for 3 or 4, an adapter is required, details to follow) and your own Warlords arcade game ROMs.

I have not put the game ROMs on the image as I have not properly investigated the legal issues with distributing them.
The disc does contain a BBC version of the graphics and sounds, but these will not work without the original ROMS.
If you have a legal set of ROMs you can compare them using the MAME rom checker and concatenate them to form $.ROMS which should then be added to the disc image. e.g.

Code: Select all

copy /b 037154-01.m1+037153-01.k1+037158-01.j1+037157-01.h1+037156-01.e1+037155-01.d1 $.ROMS

The top line of the screen tells you which sideways bank is being used.
Image
If you have made a 3/4 fire button adapter, press either button 3 or 4 to enable it, otherwise only 2 buttons/paddles will be supported.
Image
Attachments
UsingBank.png
(27.82 KiB) Not downloaded yet
ButtonsSelect.png
(1.04 KiB) Not downloaded yet
WarlordsNoROMs.zip
You need to add your own ROMs to use this
(19.71 KiB) Downloaded 10 times

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

Re: A new Warlords emulator for the beeb (was Writing a ...)

Postby tricky » Sat Aug 19, 2017 5:15 pm

Here is a little test program for the adapter, will be more widly useful when more than two people have them ;)

Code: Select all

10 *K.10O.|MREN.|ML.|M
20 MODE 7
30 PRINTTAB(3,3)
40 FOR O=0 TO 3 STEP 3
50 P%=&72
60 [OPT O
65 SEI
70 LDA &FE40 : STA &70 \ SysViaRegB
80 LDA #&C8 : STA &FE4C \ SysViaPCR
90 LDA &FE40 : STA &71 \ SysViaRegB
100 LDA #&08 : STA &FE4C \ SysViaPCR
105 CLI
110 RTS
120 ]
130 NEXT
140 REPEAT
150 CALL &72
160 PRINT TAB(0,0)~(?&70 AND &30)DIV16,~(?&71 AND &30)DIV16
170 PRINT ~ADVAL(1),~ADVAL(2),~ADVAL(3),~ADVAL(4)
180 UNTIL 0

My beeb is in pieces, if this doesn't work, the #&C8 might need to be a #&E8, but I think it is correct as is.

You should see 3 3 on the top row, the first one is the first two fire buttons, pressing button 0 should give "2 3", button1 "1 3" and both buttons together "0 3". same again for the second set and second 3. Without an adapter, both single digits will be the same. second line is analogue inputs.

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

Re: A new Warlords emulator for the beeb (was Writing a ...)

Postby tricky » Sun Aug 20, 2017 2:38 pm

Attached is the wiring diagram as best as I can see that I have ended up with.
The DiaDiagram is the same thing but in Dia (visio like program).
The three sockets are supposed to be looking in to the solder side of the connectors and just to confuse things, the 74LS157 is viewed from above!
I will add some photographs later of what it looks like built and will build my next using this diagram to check that it is OK.
Wiring.png
If you want to use it please do, but please check all wiring logic yourself as I could easily have made a mistake!
Attachments
DiaDiagram.zip
(6.46 KiB) Downloaded 12 times

User avatar
Arcadian
Posts: 2744
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: A new Warlords emulator for the beeb (was Writing a ...)

Postby Arcadian » Mon Aug 21, 2017 9:03 pm

tricky wrote:This seems OK on a Model B, B+ and Master although, we haven't got it working with a DataCentre yet.

Just to confirm there's no problem with the Datacentre, both of the recent builds (Model B only and Model B/B+/Master) are loading fine from the RFS Drive on this Datacentre-equipped Model B I have here.

The issue I reported is only occurring on two Masters I have with me at the moment. I think they're both running MOS 3.5 but they're multi os so I'll try switching to MOS 3.2 and report my findings. Neither have the troublesome VLSI chipset.
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk

Image
ABug Leicestershire (17-19 November 2017)

User avatar
Arcadian
Posts: 2744
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: A new Warlords emulator for the beeb (was Writing a ...)

Postby Arcadian » Mon Aug 21, 2017 9:20 pm

Tried it on one of the Masters in OS 3.2 mode and that seems to have done the trick(y) as it's now working.

:)
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk

Image
ABug Leicestershire (17-19 November 2017)

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

Re: A new Warlords emulator for the beeb (was Writing a ...)

Postby tricky » Mon Aug 21, 2017 10:34 pm

Arcadian wrote:Tried it on one of the Masters in OS 3.2 mode and that seems to have done the trick(y) as it's now working.
:)


Good news, I can't think why it would lock up on 3.5, I could understand it if it worked, but the paddles didn't respond.

Did you get to the bottom of the dodgy fire button?

Here are some pictures of my 74LS157 based adapter. I also have a PCD design ready to try.

ImageImageImageImageImageImage
Attachments
Image18.jpg
(43.87 KiB) Not downloaded yet
Image23.jpg
(39.49 KiB) Not downloaded yet
Image22.jpg
(46.39 KiB) Not downloaded yet
Image21.jpg
(38.58 KiB) Not downloaded yet
Image20.jpg
(45.34 KiB) Not downloaded yet
Image19.jpg
(33.48 KiB) Not downloaded yet

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

Re: A new Warlords emulator for the beeb (was Writing a ...)

Postby tricky » Thu Aug 31, 2017 11:45 am

I've been thinking about ways to connect atari joysticks to the beeb and think I may have a simple(ish) solution.
My cunning plan is to use a 74LS139 dual 2 to 4 line decoder to convert the on/off of the up/down into four bits where only one can be on, the fire button connects as usual.
I don't know anything really about the electronics side of 74LS series logic, but the logic side makes sense, its just whether pull-up/downs are required etc.
Anyway combining my new sort of understanding of D2A resistor ladders, I think the circuit below should work.
Image
The idea is to pull up the inputs to the 2 "address" lines, say up and down and let the 139 convert them into four separate signals, centre,up,down,both and then feed centre and up into a custom resistor ladder to give 0v, 1v or 2v to feed back into the analogue in. It may be slightly lower voltages (1.88v?), so the resistor values may need tweaking.

So, for one joystick you would need 1 74LS139 and 12 resistors: 4 for each channel as above, plus the four (say 10k) pull-up resistors for the returns from the joystick (U/D/L/R) that go to the decoder.

As usual, this comes with no guarantee, no real understanding of the electronics and not even a prototype, so please feel free to jump in with "your an idiot, that will just blow your beeb!".

I know this sort of thing has a limited audience within a very limited audience, but who knows what it might inspire :D

PS, I was also thinking that with a couple of 74LS157s and a small piece of assembler, you could support 2 digital joysticks with two fire buttons each on a Master Compact.
Attachments
LS139.png
(2.36 KiB) Not downloaded yet

dp11
Posts: 681
Joined: Sun Aug 12, 2012 8:47 pm

Re: A new Warlords emulator for the beeb (was Writing a ...)

Postby dp11 » Thu Aug 31, 2017 12:01 pm

I think you can just do this with resistors and software...

A resistor ( say 8K2) from ADC channel Input to Vref.

Joystick common to gound

Then four different resistors (e.g. 1K 2K 4K 8K) from ADC channel to each of the U/D/L/R. You could add a fifth resistor for fire. You also know the Up and Down can never happen at the same time so the actual resistor values can be quite broad e.g 1K 2K2 4K7 8K2, I haven't yet checked these value work.
Last edited by dp11 on Thu Aug 31, 2017 1:59 pm, edited 1 time in total.

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

Re: A new Warlords emulator for the beeb (was Writing a ...)

Postby tricky » Thu Aug 31, 2017 1:53 pm

The point of this is that you don't have to modify the joystick.
In an Atari joystick, at the plug end, you have a wire for each direction and fire, which are all floating unles you press then, then they connect to a single common ground.
There is an adapter with many resistors and transistors on it, which is about £30.

dp11
Posts: 681
Joined: Sun Aug 12, 2012 8:47 pm

Re: A new Warlords emulator for the beeb (was Writing a ...)

Postby dp11 » Thu Aug 31, 2017 1:58 pm

My suggestion doesn't require any modification of the joystick I think

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

Re: A new Warlords emulator for the beeb (was Writing a ...)

Postby tricky » Thu Aug 31, 2017 4:18 pm

Is it encoding all four directions in one analogue channel?

dp11
Posts: 681
Joined: Sun Aug 12, 2012 8:47 pm

Re: A new Warlords emulator for the beeb (was Writing a ...)

Postby dp11 » Thu Aug 31, 2017 4:49 pm

Yes all four directions on one channel.

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

Re: A new Warlords emulator for the beeb (was Writing a ...)

Postby tricky » Thu Aug 31, 2017 5:52 pm

That would work, but would not be backwards compatible :(

dp11
Posts: 681
Joined: Sun Aug 12, 2012 8:47 pm

Re: A new Warlords emulator for the beeb (was Writing a ...)

Postby dp11 » Thu Aug 31, 2017 5:58 pm

Sorry I've got lost what do you need to achieve for up/down left/right fire

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

Re: A new Warlords emulator for the beeb (was Writing a ...)

Postby tricky » Fri Sep 01, 2017 6:23 am

For up to give analogue vref (about 2v), centre to give half that and down to give 0v on one analogue channel, with left/right doing something similar on another channel and the fire button being 5v when not pressed and 0v when pressed. This would then be compatible with existing beeb games.

There is a £30 converter to do this, but I was thinkingof cheap eways someone could build a one off for themselves. As a bonus, it would be nice if it used early eighties technology and had a smallish number of components.

The Comment about master compact converter was more just a musing about supporting two joysticks.

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

Re: A new Warlords emulator for the beeb (was Writing a ...)

Postby tricky » Sun Oct 29, 2017 10:13 am

I think there might be an issue if the paddle is at an extreme when the game starts as I think it might be trying to do a calibration of sorts.
I think I can "fix" this in software, but having the paddles "centered" when starting the game should also work in the mean time.

PS Running something like this, one should be able to check that the wiring is correct.

Code: Select all

REP.:P.ADVAL(1),ADVAL(2),ADVAL(3),ADVAL(4):UN.0

This should list four numbers per line, when the know is turned fully anticlockwise, the numbers should approach 65535 and when full clockwise, the numbers should approach 0 (< 128 is fine).


Return to “software: new games”

Who is online

Users browsing this forum: No registered users and 1 guest