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

User avatar
Arcadian
Site Admin
Posts: 4223
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

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

Post by Arcadian »

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! :)
Please subscribe to the ABug YouTube channel!
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

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

Post by tricky »

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
Site Admin
Posts: 4223
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

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

Post by Arcadian »

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!
Please subscribe to the ABug YouTube channel!
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

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

Post by tricky »

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: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

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

Post by tricky »

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
proto2_4.jpg (33.97 KiB) Viewed 10119 times
proto2_3.jpg
proto2_3.jpg (32.35 KiB) Viewed 10119 times
proto2_2.jpg
proto2_2.jpg (35.56 KiB) Viewed 10119 times
proto2_1.jpg
proto2_1.jpg (28.55 KiB) Viewed 10119 times
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

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

Post by tricky »

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
UsingBank.png (27.82 KiB) Viewed 10119 times
ButtonsSelect.png
ButtonsSelect.png (1.04 KiB) Viewed 10119 times
WarlordsNoROMs.zip
You need to add your own ROMs to use this
(19.71 KiB) Downloaded 154 times
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

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

Post by tricky »

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: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

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

Post by tricky »

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!

EDIT: Looks like I connected enable (next to 5v/VCC) to 0v/GND on the finished adaptor.
It is also be good practice to tie the other inputs to stop them floating.
Attachments
DiaDiagram.zip
(6.46 KiB) Downloaded 155 times
Last edited by tricky on Fri Jun 21, 2019 4:03 pm, edited 1 time in total.
User avatar
Arcadian
Site Admin
Posts: 4223
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

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

Post by Arcadian »

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.
Please subscribe to the ABug YouTube channel!
User avatar
Arcadian
Site Admin
Posts: 4223
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

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

Post by Arcadian »

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.

:)
Please subscribe to the ABug YouTube channel!
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

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

Post by tricky »

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

PS Please excuse my shoddy soldering, it was lead free!
Attachments
Image18.jpg
Image18.jpg (43.87 KiB) Viewed 10119 times
Image23.jpg
Image23.jpg (39.49 KiB) Viewed 10119 times
Image22.jpg
Image22.jpg (46.39 KiB) Viewed 10119 times
Image21.jpg
Image21.jpg (38.58 KiB) Viewed 10119 times
Image20.jpg
Image20.jpg (45.34 KiB) Viewed 10119 times
Image19.jpg
Image19.jpg (33.48 KiB) Viewed 10119 times
Last edited by tricky on Fri Jun 21, 2019 4:04 pm, edited 1 time in total.
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

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

Post by tricky »

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
LS139.png (2.36 KiB) Viewed 10119 times
dp11
Posts: 1757
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

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

Post by dp11 »

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 2:59 pm, edited 1 time in total.
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

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

Post by tricky »

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: 1757
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

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

Post by dp11 »

My suggestion doesn't require any modification of the joystick I think
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

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

Post by tricky »

Is it encoding all four directions in one analogue channel?
dp11
Posts: 1757
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

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

Post by dp11 »

Yes all four directions on one channel.
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

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

Post by tricky »

That would work, but would not be backwards compatible :(
dp11
Posts: 1757
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

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

Post by dp11 »

Sorry I've got lost what do you need to achieve for up/down left/right fire
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

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

Post by tricky »

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: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

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

Post by tricky »

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).
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

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

Post by tricky »

To see my continuing adventures in connecting other system's controllers to the beeb, see this Connecting SEGA Mega Drive controllers to the beeb thread.
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

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

Post by tricky »

I finally made up a simple plug adaptor for a single pair of modded (see above) Atari Paddles.
I cut a slot down with the case lying on its back perpendicular to the cable hole (horizontal purple line).
external_cuts.jpg
Then cut parallel to the table (vertical purple line) to leave a lip to grip the edge of the DB9 socket similar to the other end of the case.
I nipped off the tips of the two pairs of protuberances (purple ellipses) that stop the cable clip from pushing into the wiring.
internal_cuts.jpg
I also trimmed a little off the bolt surrounds (diagonal purple lines), this wasn't necessary, but I thought it was at the time.
I wired it up as per the diagram at the bottom.
wiring.jpg
I also trimmed the edges (vertical purple line) slightly for the five pin side as the connector is wider than the hole.
And even though my workmanship on the plastic is not great, the final result looks and works OK.
finished.jpg
Wiring that I used:
2_paddles_wiring.png
2_paddles_wiring.png (41.43 KiB) Viewed 8890 times
All of the grounds are connected in the beeb, as are the VREFs for the analogue, so I just used the easiest pins to solder.

Please check the wiring for yourselves to make sure you are happy with what I have done.
As usual, any comments welcome.
Last edited by tricky on Sun Jun 30, 2019 4:59 pm, edited 4 times in total.
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

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

Post by tricky »

I've got a new capture setup so thought I would post Warlords on a real beeb with commentary.

https://youtu.be/rA2I4jVeRBs best watched in 720p on a 50Hz monitor.
r05sco
Posts: 6
Joined: Sun Jul 07, 2019 10:17 pm
Contact:

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

Post by r05sco »

This looks fantastic Richard, been enjoying all your recent uploads. Need to order two paddle adapters from you and scout eBay for 4 paddles. This would be great to setup and play at Revival.
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

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

Post by tricky »

Thanks,
For a four player game, you need two pairs if paddles, which will need a simple mod and one dual adapter.
The single driving controllers aren't compatible.
r05sco
Posts: 6
Joined: Sun Jul 07, 2019 10:17 pm
Contact:

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

Post by r05sco »

Ok thanks. I'll be in touch after I've bought the paddles.
Post Reply

Return to “trickysoft (new bbc micro games)”