Master 128 game compatibility

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

Related forum: adventures


User avatar
b_b_c_m_i_c_r_o_2
Posts: 216
Joined: Sun Jun 25, 2006 10:15 pm

Master 128 game compatibility

Postby b_b_c_m_i_c_r_o_2 » Sat Jan 26, 2013 6:16 pm

Hi, getting corrupted text when running (BBC) games on a Master 128. (Flip, Sabre Wulf, Death Star)

Do I need to configure something in the Masters character set to fix this?

The text problem was mentioned here:http://www.stardot.org.uk/forums/viewtopic.php?f=1&t=2501#p18867

RobC
Posts: 1724
Joined: Sat Sep 01, 2007 9:41 pm

Re: Master 128 game compatibility

Postby RobC » Sat Jan 26, 2013 6:44 pm

There's a program on the M128 Welcome Disc that fixes some of the compatibility problems (but by no means all of them). I think it's called "Convert" - it may only be available on the 80 track version...

The Hac-Man column in the Micro User also had fixes for some games.

:idea: Maybe we should start a community project to create Master compatible versions of games that don't have fixes? :idea:

User avatar
richardtoohey
Posts: 3354
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: Master 128 game compatibility

Postby richardtoohey » Sat Jan 26, 2013 8:17 pm

I started typing up the Master bits from the Hac-Man columns ... haven't finished yet ... and would definitely like to learn more about why games don't work on the Master (and how to address that.)

But $JOB and $LIFE keeping taking me away from the fun things! :cry:

User avatar
daveejhitchins
Posts: 3617
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham

Re: Master 128 game compatibility

Postby daveejhitchins » Sat Jan 26, 2013 8:38 pm

richardtoohey wrote:But $JOB and $LIFE keeping taking me away from the fun things! :cry:

Don't we all just know that feeling :cry:

Dave H :D
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

User avatar
Rich Talbot-Watkins
Posts: 1078
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca

Re: Master 128 game compatibility

Postby Rich Talbot-Watkins » Sat Jan 26, 2013 9:25 pm

I wrote a few lines on Master compatibility here ages ago - I had a Master rather than a Beeb back in the day, and getting old games working on it was something of a perennial challenge of mine.

The Convert program on the Master Welcome Disc will help with some problems where characters are corrupted (specifically where the author has attempted to define user-defined characters by writing directly to &C00-&CFF instead of doing it with VDU 23,n), but it slows the machine down a bit, and in general it's better to try to fix the problem with a code patch, or even just to define the characters 'legally' in the loader, prior to starting the game.

Convert won't help with Sabre Wulf though, because the problem there is it's trying to read the character set directly from &C000 in the OS 1.20 ROM, whereas on a Master it's not there. This is relatively easily fixed though, because there's RAM at this address on a Master, so all that's required is to copy the character set there once everything's loaded. I think there was a Hac-Man patch for Sabre Wulf Master compatibility somewhere out there, though it'll only work on the original tape version.

User avatar
Rich Talbot-Watkins
Posts: 1078
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca

Re: Master 128 game compatibility

Postby Rich Talbot-Watkins » Sat Jan 26, 2013 9:32 pm

I just had a quick look at Flip on the Master, and the problem there is that it's using the OS 1.20 multiplication-by-640 table to calculate screen addresses for displaying the text. Luckily, this is really easy to fix on a Master (as long as you're running DFS, not ADFS).

Just type the following line before CHAINing the main code (or implement it as a loader, which then CHAINs the 'real' loader):

Code: Select all

P%=&C375:FOR N%=0TO31:[OPT2:EQUB (N%*640) DIV 256:EQUB (N%*640) MOD 256:]:NEXT

This builds the correct table in the Master's RAM in the appropriate place.

Hope that helps!

User avatar
b_b_c_m_i_c_r_o_2
Posts: 216
Joined: Sun Jun 25, 2006 10:15 pm

Re: Master 128 game compatibility

Postby b_b_c_m_i_c_r_o_2 » Sun Jan 27, 2013 9:51 am

yes, that worked a treat for Flip :)

Rich Talbot-Watkins wrote:I just had a quick look at Flip on the Master,

Just type the following line before CHAINing the main code (or implement it as a loader, which then CHAINs the 'real' loader):

Code: Select all

P%=&C375:FOR N%=0TO31:[OPT2:EQUB (N%*640) DIV 256:EQUB (N%*640) MOD 256:]:NEXT

This builds the correct table in the Master's RAM in the appropriate place.

Hope that helps!

User avatar
richardtoohey
Posts: 3354
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: Master 128 game compatibility

Postby richardtoohey » Wed Feb 06, 2013 2:29 am

Here's where I got to with the Hac-man articles ... I will continue with this effort (now that I've dug my original document off an old machine)

All code typed in, but NOT tested.
===================================================================
From *. forums

http://www.stardot.org.uk/forums/viewto ... f=1&t=2116

The Micro User

Hac-Man

July 1987
=========

http://www.stairwaytohell.com/cheats/ha ... n5-a-L.jpg
http://www.stairwaytohell.com/cheats/ha ... n5-b-L.jpg

I've been borrowing a Master for a few days, and while very impressed by its capabilities I've hit one major snag - software. Although I find that most of my roms, utilities and adventures work perfectly, a number of arcade games do not. These appear to fall into three main categories.

Firstly, many games such as Zany Kong Junior and Manic Miner rely on reading the presence of defined characters. On a BBC B these are located in memory at &C00 to &CFF - 256 bytes. Each definition is eight bytes long; it therefore follows that at any one time only 32 characters can be redefined.

On the master all but the 32 control characters can be defined, and the definitions workspace is located elsewhere.

Some games *LOAD predefined characters directly into page &C; at best these games will play with some rather strange looking characters, at worst they may not play at all.

As anyone brave enough to study the original User Guide will know, a character is defined by issuing a VDU 23 command. The answer therefore is to convert the data stored in page &C to the format of a VDU23 command. The following line does just that:

FOR I%=0 TO 31:VDU 23,128+I%:FOR J%=&C00 TO &C07:VDU J%?(I%*8):NEXT:NEXT

The base number, 128, is the most likely to correct strange character definitions. If you still get weird characters, try 224, 160, or 192.

Another way around the problem is to write a Basic program to issue the VDU23 commands. Listing 1 reads the data from page &C and SPOOLs it to a file called HELLO in a format in which it can be EXECed back again, either as a standalone file or merged with another program already in memory.

As the program stands it will create a SPOOLed file starting at line 1500 with line increments of 10, reading the 32 characters from 128 to 159.

If this does not work, change start% as above. If you want to be absolutely thorough and correct all strange definitions, you could change end% to 255, but the resulting datafile would take up a lot of disc space or take ages to load from cassette.

Listing 1: VDU 23 generator

10 REM Master VDU23 generator
20 REM by Hac-Man 1987
30 REM (C) The Micro User
40 REM
50 *SPOOL HELLO
60 start%=128:end%=start%+31:step%=10:line%=1500
70 FOR I%=start% TO end%
80 PRINT;step%*(I%-start%)+line%;" VDU23,";I%;
90 FOR J%=0 TO 7
100 PRINT",";?(8*(I%-start%)+J%+&C00);
120 NEXT:PRINT CHR$(13):NEXT
130 *SPOOL

The second problem involves games making direct calls to machine operating system rom routines - Wizadore and Atic Atac spring to mind.

Acorn's original idea of there being a fixed entry point for each OS routine is a stroke of genius, as it allows any piece of software to be upwardly compatible with any future BBC Micro.

A fixed OS entry point is, however, only a jump to the contents of a vector in page 2 of the memory map.

For example, to print a character on the screen from machine code the VDU routine oswrch is called at its entry point, &FFEE. This then jumps to the address held in the two page 2 bytes &20E and &20F, otherwise known as wrchv.

The full sequence is, therefor, jump to &FFEE, check the contents of &20E and &20F and jump to this address, memory location &E0A4 in OS 1.20.

This is obviously time-consuming. To speed things up, some games bypass this &FFEE entry point altogether and jump directly to &E0A4. This means that they can be used only with OS1.20. This is totally unnecessary, as once again, good old Acorn has thought of everything.

The original values of all the page 2 vectors are stored as a lookup table in the MOS. In operating systems 1.20 and lair, the address of this table is held in memory locations &FFB7 and &FFB8. The value of any vector is therefore held in the OS rom as a fixed offset of the contents of this address.

To use our earlier example, if a game needs to write directly to the MOS VDU driver routine on the Master 128 with OS3.20, reading the the contents of &FFB7 and &FFB8 gives the address &E2D7.

As the OSWRCH vector is located at &20E and &20F, the offset is therefore &E. Reading the contents of locations &E2E5 (&E2D7 + &E) and &E2E6 gives the double byte &E822, the address of the VDU driver routine in OS 3.20. Following the same procedure with OS 1.20 gives &E0A4, the value mentioned earlier.

Listing II applies this principle to Ultimate's great shoot-'em-up, Jet-Pac, converting it for use on the Master and both models of the B+. PROCconvert reads the vector lookup table and "edits" the game so that each rom call is to the correct address for that version of the MOS. It should be possible to use PROCconvert, suitably modified, with any program using direct rom calls.

Incidentally, Jet-Pac is available both as an individual title and on each of the two Ultimate compilations Unbelievable Ultimate and Cosmic Battlezones.

Unbelievable is in the fact one of a series of compilations going under the general title of Master Games. Guess which computer they DON'T run on. In fact, not one of the other titles on either compilation will work with anything but OS 1.20.

Listing II: Jet-Pac MOS call converter

10 REM Jet-Pac MOS call converter
20 REM by Hac-Man 1987
30 REM (C) The Micro User
40 !&900=&00A28CA9:!&904=&F42000A0
50 !&908=&A2E5A9FF:!&90C=&2000A001
60 !&910=&35A9FFF4:!&914=&A902208D
70 !&918=&02218D09:!&91C=&04A20EA9
80 !&920=&F42000A0:!&924=&A04AA2FF
90 !&928=&FFF72009:!&92C=&04A20DA9
100 !&930=&D44C00A0:!&934=&8A4808FF
110 !&938=&AD489848:!&93C=&FE2903CA
120 !&940=&6803CA8D:!&944=&78AA68A8
130 !&948=&2E4C6028:!&94C=&2D54454A
140 !&950=&0D434150:!&954=&0059004C
150 CALL &900
160 PROCconvert
170 CALL &954
180 END
10000 DEFPROCconvert
10010 Z%=!&FFB7 AND &FFFF
10020 ?&3025=Z%?&E:?&302A=Z%?&F
10030 ?&3034=Z%?&E:?&3035=Z%?&F
10040 ?&303A=Z%?&E:?&303B=Z%?&F
10050 FOR I%=0 TO &100
10060 IF I%?&3D00=&72 AND I%?&3D01=&E7 THEN I%?&3D00=Z%?&A:I%?&3D01=Z%?&B
10070 NEXT
10080 ?&4860=Z%?&20:?&4865=Z%?&21
10090 ?&5904=?&FFB7:?&5905=?&FFB8
10100 ENDPROC

This brings me to the last, and most unnecessary, problem - software protection. A number of loading routines use hardware directly, namely the serial interface chip - made by Ferranti on most models of the B - and 8271 disc controller.

In place of these the B+, Master and a few BBC B Micros use a different serial chip, made by Acorn, and the 1770 disc controller. Major problem programs are Caveman Capers and the disc version of The Hobbit.

Other games prevent users from tampering with the game by overwriting the vectors used by all OS routines with the original vectors stored in the OS ROM. Unfortunately these original vectors are often transferred from a specific point in the rom.

In every new operating system to date the vector table has been in a different location; a machine with the wrong MOS doesn't stand a chance of running a game protected like this. Notable culprits are Alien-8 and Dr. Who.

Given the excellent protection systems in use today, it seems a great pity that some software producers choose to limit their potential market in this way. Unfortunately, this problem is between you and the software company. I wish you the best of luck.

October 1987 (part 8)
=====================

http://www.stairwaytohell.com/cheats/ha ... n8-a-L.jpg

Wizadore
Match Day

Arkanoid does run (as long as you've got CONVERT running)

This month sees me, at last, with a Master of my own. But now I realize that there are some games that I will never be able to play again.

Roger Griffiths of St Davids, Dyfed, is a B+ owner in the same boat. His favourite game, Wizadore by Imagine, is, as mentioned in the July column, designed to work only on the combination of Model B with OS1.2 and not on the B+.

A letter to Imagine brought only a replacement tape. When I inquired, I was met with the polite but not very useful reply that no B+/Master compatible version of Wizadore exists nor is one planned.

The whole idea behind the design of the BBC Micro is of upward software compatibility with future models. It is a credit to Acorn that such a radical new machine as the Archimedes - unlike the newest models from other manufacturers - will run software written for its predecessors.

Software houses should in turn be prepared to give their support to owners of newer Acorn machines. An ideal solution would be to offer B+, Master or Archimedes owners a mail-order disc-for-tape upgrade to a compatible version of their software, for a nominal sum.

The goodwill generated would vastly outweigh any inconvenience caused to the software house, not to mention a new lease of life for many excellent games, like Wizadore, released before the arrival of the new computers. And as for all the free mentions that would follow in The Micro User's letters page …

… (non-Master conversion related) …

Incidentally Chris Roberts is also the author of Wizadore and Ocean's Match Day, neither of which work on my new toy. Sadly, Match Day too has befallen the fate of Wizadore: Doesn't work, no upgrade.

I must, at this point, thank Superior and Tynesoft for providing me with Master-compatible versions of Citadel and Jet Set Willy II. Both are available to owners of an earlier version of the game, simply by returning the original cassette or disc, together with a stamped, addressed envelope.

Jet Set Willy I is also incompatible with the Master, but has been included in its entry as part of the enhanced Master version of Jet Set Willy II, thereby making a far bigger game.

… (non-Master conversion related) …

Arkanoid from Imagine is a simple but incredibly addictive game based on the ancient Breakout theme. This actually does run on the Master (as long as you've got CONVERT running) and it's causing me too many late nights. I hear that Peter Johnson, author of the BBC Micro and Atari ST versions, has a real Arkanoid arcade machine in his bedroom. No wonder the BBC Micro version was late …

… (non-Master conversion related) …

December 1987
=============

http://www.stairwaytohell.com/cheats/ha ... 10-a-L.jpg

Also a bit here re. Mr Ee

http://www.stairwaytohell.com/cheats/ha ... 10-b-L.jpg

And Arkanoid

http://www.stairwaytohell.com/cheats/ha ... 10-c-L.jpg

… (non-Master conversion related) …

I have received a number of letters in response to my July column about Master compatibility. I have since discovered, thanks to Tony Sothcott and Orlando, another frequently used programming technique that renders games inoperable on the Master.

In all display modes, a 64-byte row multiplication table - located in the OS rom - is used to identify how the screen is mapped out in memory.

On the model B the vector as &E0, the contents of the zero page addresses &E0 and &E1, points to the address of this table. On the Master, however, the &E0 vector has a different function, so any game that uses this vector directly, such as Orlando's Frak!, will not produce a correct screen display.

Some other games, such as Bug Eyes and Tony's Castle Quest, read the table directly from the rom, starting at memory location &C375 in OS1.20.

On the Master, this area of memory is a private filing system workspace, so locations &C375 to &C3B5 are normally zeros. Once again, this means that the screen display is not properly set up.

The effect of either of these techniques is that game will run, but all screen output is squashed into one screen row. This does, of course, make it a little difficult to work out what's going on. The answer to this problem is to set up our own row multiplication table at &C375 in the Master's private ram.

This method also works with games loaded from disc, but because the table is located in filing system workspace, it must be set up after the last disc access has occurred, or it will be overwritten. This is the technique I have used for Chrysalis (see panel left).

Master Chrysalis conversion

To demonstrate the technique of creating the multiplication look-up table in the Master I have chosen the Icon/Audogenic title Chrysalis. To start, enter Listing I and *SPOOL it to your own blank tape as CHRYSPL, as for the Jet Set Willy II (March 1987) and Snapper (August 1987) routines. [Note - the March 1987 and August 1987 Hac-man articles are about loading patches; nothing Master-specific.] Then insert the Chrysalis tape and type:

PAGE=&4000
LOAD"CHRS1"

When that file has loaded, *EXEC CHRYSPL back into memory and type:

RUN

Chrysalis will not work, with the screen set up correctly. The programmers among you will recognise that lines 140 and 150 contain a fix to redirect a jump to the correct address in the OS rom, in this case the primary interrupt vector IRQ1V. (I don't know, two illegal techniques in one game…) Lines 160 to 180 set up the vector table; they can be used without modification for other games which read the row multiplication table directly from the rom.

Listing I: Chrysalis to Master converter

60 REM Chrysalis to Master converter
70 REM by Hac-Man 1987
80 REM (C) THe Micro User
90 *LOAD CHRS2
100 PROCconvert
110 CALL &1B00
120 END
130 DEFPROCconvert
140 Z%=!&FFB7 AND &FFFF: REM read address of the vector table
150 ?&2402=Z%?4:?&2407=Z%?5: REM redirect direct rom call
160 ?&FE34=&18: REM set ACCCON to allow write into private ram
170 FOR I%=0 TO 31:J%=I%*640:P%=(@*I%)+&C375
180 [OPT 2:EQUB J% DIV 256:EQUB (J% AND 255):]:NEXT
190 ENDPROC

On the general subject of compatibility, the aspect most often discussed is that of compatibility between different BBC Micro operating systems. This is, however, by no means the only problem. In the early(ish) days of the BBC Micro, a variety of independent double-density disc interfaces were introduced as an alternative to the Acorn DFS with its 8271 floppy disc controller (FDC).

WIth the ADFS system just a twinkle in Acorn's eye, and the availability of the 8271 on a par with hen's teeth, such interfaces, based on other FDCs, seemed an excellent way of adding a disc drive to the cassette-based BBC Micro.

The problems came when buying disc-based software for the newly expanded machine. Many protection systems, particularly those use on commercial games, were designed to control the 8271 directly. This meant, of course, that no other FDC would work.

Another problem was that the DFS software supplied with some of these interfaces did not correctly emulate many of the intricacies of osword &7F, a call introduced by Acorn to handle reading and writing to a floppy disc. Unfortunately there is almost nothing that can be done about this.

… (non-Master conversion related) …

Ee enhancements

… (non-Master conversion related) …

To enable the game's defined characters to be correctly displayed on the Master, enter:

VDU 23,224,195,102,60,24,60,102,195,129
VDU 23,225,15,30,60,120,240,225,195,135
VDU 23,226,0,126,126,126,0,231,231,231
VDU 23,227,96,240,249,255,159,15,6,0

before running the game.

… (non-Master conversion related) …

Arkanoid deciphered

Master owners will have found that the introductory text in the Basic loader of Arkanoid displays strange characters. This is easily corrected:
Simply LOAD"ARKANOID", then type !(PAGE+&8A)=&3A383231 followed by RUN.

… (non-Master conversion related) …

February 1988
=============

http://www.stairwaytohell.com/cheats/ha ... 12-b-L.jpg

Conversion Corner

When loaded into a Master, Durrell's platform game Mineshaft suffers from two problems. First, the defined characters are displayed incorrectly. You can cure this by using the Convert program supplied on the Welcome disc.

The second problem, however, is rather more serious: Your air supply decreases at a most alarming rate, requiring you to complete the screen in about twenty seconds flat. Luckily you can cure this just as easily.

Ensure that Convert is running, then type:

!&C000=0:!&C004=0

followed by:

*TAPE
*RUN

as normal.

The cause of the problem is as follows: Mineshaft determines the rate of air loss by reading from the system clock at regular intervals, using osword 1. Every so often it will write zero into the clock, thereby resetting it and slowing the rate of air loss. Here too the game uses the legal method - osword 2. However, the X and Y parameters used are merely pointers to a further set of parameters - five in the case of oswords 1 and 2 - located somewhere in memory.

In all BBC Micros before the Master, the default definitions of Ascii characters 32 to 126 were located in the operating system rom, starting at location &C000. Because character 32 is a space, the eight bytes that define it are all zeros. Therefore on a BBC or B+, writing the five bytes at &C000 to &C004 into the system clock will reset it to zero.

Mineshaft does this, but on a Master &C000 onwards is ram used by the filing systems - specifically the title of a DFS disc or the free space map of an ADFS disc. Either way, those vital first five bytes are unlikely to be zeros, so the system clock will continually reset to a higher initial value. This in turn will call the routine that deals with decrementing the current value of the air supply much more often, dramatically shortening the player's life.

March 1988
==========

Airwolf

http://www.stairwaytohell.com/cheats/ha ... n1-a-L.jpg
http://www.stairwaytohell.com/cheats/ha ... n1-b-L.jpg

June 1988
=========

http://www.stairwaytohell.com/cheats/ha ... n4-b-L.jpg

August 1988
===========

Some general words …

http://www.stairwaytohell.com/cheats/ha ... n6-a-L.jpg

… but also Bug Eyes II …

http://www.stairwaytohell.com/cheats/ha ... n6-b-L.jpg

September 1988
===============

http://www.stairwaytohell.com/cheats/ha ... n7-c-L.jpg

December 1988
=============

http://www.stairwaytohell.com/cheats/ha ... 10-b-L.jpg

February 1989
=============

http://www.stairwaytohell.com/cheats/ha ... 12-b-L.jpg

May 1989
========

Explanation of 40/80 and double-stepping disk techniques

June 1989
=========

http://www.stairwaytohell.com/cheats/ha ... n4-a-L.jpg

November 1989
=============

http://www.stairwaytohell.com/cheats/ha ... n9-a-L.jpg

December 1989
=============

(asks for help) and Sabre Wulf conversion!

http://www.stairwaytohell.com/cheats/ha ... 10-a-L.jpg
http://www.stairwaytohell.com/cheats/ha ... 10-b-L.jpg

March 1990
==========

Sim

http://www.stairwaytohell.com/cheats/ha ... n1-b-L.jpg

April 1990
==========

More on Sim …

http://www.stairwaytohell.com/cheats/ha ... n2-a-L.jpg

http://www.stairwaytohell.com/cheats/ha ... n2-c-L.jpg

… and somewhere in there is something to make Overdrive Master compatible …

July 1990
==========

Request for help for Airlift and Caveman Capers

http://www.stairwaytohell.com/cheats/ha ... n5-b-L.jpg

August 1990
===========

More about sideways RAM …

http://www.stairwaytohell.com/cheats/ha ... n6-b-L.jpg

December 1990
=============

http://www.stairwaytohell.com/cheats/ha ... 10-a-L.jpg

September 1991
==============

Aviator

http://www.stairwaytohell.com/cheats/ha ... n7-b-L.jpg

November 1991
=============

Hunchback - and info about 6522 & speech stuff

http://www.stairwaytohell.com/cheats/ha ... n9-a-L.jpg

Can't see the CODE though? It's in MARCH 1992

March 1992
==========

http://www.stairwaytohell.com/cheats/ha ... n1-a-L.jpg

… All Done …
Last edited by richardtoohey on Thu May 28, 2015 3:56 am, edited 1 time in total.

User avatar
b_b_c_m_i_c_r_o_2
Posts: 216
Joined: Sun Jun 25, 2006 10:15 pm

Re: Master 128 game compatibility

Postby b_b_c_m_i_c_r_o_2 » Thu Feb 07, 2013 11:12 am

wow - they should make your post a sticky.

User avatar
richardtoohey
Posts: 3354
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: Master 128 game compatibility

Postby richardtoohey » Thu Feb 07, 2013 7:04 pm

Let me finish typing it all in and testing it first! :D

EDIT: I've applied one of the techniques to Cybertron Mission - to address garbled text::

viewtopic.php?f=4&t=4636#p57573

User avatar
richardtoohey
Posts: 3354
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: Master 128 game compatibility

Postby richardtoohey » Sat Feb 09, 2013 10:02 pm

Here is a patched version of Flip for the Master (all I've done is type in what Rich said, so no great brilliance on my part!)

I've tried Deathstar on a Master, and it seems fine - so maybe the one I've tried has already been patched?

I got it from here ...

http://www.stairwaytohell.com/bbc/archi ... thstar.zip

What exactly do you see on your version?

I'll look at Sabre Wulf next, but that is a LONG listing!

http://www.stairwaytohell.com/cheats/ha ... 10-b-L.jpg
Attachments
Flip-Master.zip
Flip - with Master conversion
(9.32 KiB) Downloaded 83 times

User avatar
billcarr2005
Posts: 1055
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Master 128 game compatibility

Postby billcarr2005 » Sun Feb 10, 2013 12:02 am

richardtoohey wrote:I'll look at Sabre Wulf next, but that is a LONG listing!

http://www.stairwaytohell.com/cheats/ha ... 10-b-L.jpg


I'd be inclined to type all of the 4 byte memory pokery directly into memory (i use Enigma's *MEDIT), and save off to a file. It would give you the advantage of being able to *DISS to check that all was as it should be :)

EDIT: Works with this one
http://www.stairwaytohell.com/bbc/archi ... _RUN_B.zip

*LOAD SW-2C00
*RUN SW-900

It can probably be slipstreamed into the code to give a workable disc image :wink:
Attachments
SABREWULF-MC.zip
Sabre Wulf Master Compatibility
(526 Bytes) Downloaded 78 times

User avatar
richardtoohey
Posts: 3354
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: Master 128 game compatibility

Postby richardtoohey » Sun Feb 10, 2013 2:21 am

Thanks, I'll have a look now ... I've got side-tracked into looking at how CONVERT works, and also have converted Pengo.

Waiting for someone to tell me I'm re-inventing the wheel, because all the Master conversions are on site X? But I'm having great fun learning - and actually using a real Master and the wonderful internal DataCentre ...

[EDIT - had a look, and have incorporated the &2C00 code (thank you!) into a typed-up version of the rest. This new file is a Sabre Wulf ssd from STH + a file called HAC-MAN which is the listing. Doesn't do anything at all useful yet, just putting here for now - I'm running out of weekend!]
Attachments
Sabre-Master-WIP.zip
Sabre Wulf for Master - Work In Progress
(185.15 KiB) Downloaded 75 times
Pengo-Master.zip
Pengo Master conversion - no garbled logo
(7.75 KiB) Downloaded 80 times

User avatar
billcarr2005
Posts: 1055
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Master 128 game compatibility

Postby billcarr2005 » Sun Feb 10, 2013 7:08 am

I think the reason the Hac-Man article was written like that was either a) to make it easier to type the program or b) to obfuscate what the code at &2C00 is doing. SW-2C00 was that code pre-compiled. SW-900 was the other code ready to run too.
It won't do so much with the disc version of the game because
2C00 *TAPE
2C09 Set up tape unlock code
2C13 Enables unlock code
2C1C Loads SABRE.WULF @2D00
2C23 Disables unlock code

2C2F Unlock code

2C44 L.SABRE.WULF 2D00
2C56 Decrypts SABRE.WULF
2C9E Sets up some code (The Master compatibility part?)
2CC8 Redirects vectors to Master areas
2CD6 Relocates 2E00 --> E00
2CF6 JMP &E00, continue loading like normal

#-o

User avatar
richardtoohey
Posts: 3354
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: Master 128 game compatibility

Postby richardtoohey » Sun Feb 10, 2013 7:13 am

Yep, I'm deep in the guts of the disc version now - it copies code down to &0000 then does */TheGame (with an exec address of &0000 that triggers the copied-down code.)

EDIT - this is the code, but it will be running @ &0000 once downloaded - wish I had had Beebem BITD!

Code: Select all

19c3   lda #8c, x #c, osbyte      *tape
   lda #a, osbyte         flashing colour duration

19d1   y=0
19d3   lda &2000,y   copy from &2000 to &400
   sta &400,y
   iny
   bne 19d3   TheGame is 4780   long 48 49 48 4b
   inc &12
   inc &15
19e0   lda &15
   cmp #&4c
   bne &19d3

19e6   jmp &4acf         jump to downloaded code
Once I've worked all that out I can put the (relevant) Hac-Man code back in place - otherwise it lots of fiddling around to work past the Lock (&3CA) tape stuff - as you say, no use here.

EDIT - this is the (working) theory - now I just have to put the right code in there - I'll try and &900 code first ...

[1] *LOAD Sabre
[2] ?&19e7=&80:?&19e8=&67 Change the jump in &0000 code to jump to my code
[3] *SAVE Sabre 1900+E9 1909
[4] Assemble my code to 6780 P%=&6780:[JMP&4ACF:] Just do original jump for now
[5] *LOAD TheGame 2000
[6] *SAVE TheGame 2000+4800 0000

Now the missing step is between 3 & 4 - assemble some code that does something useful - I'll start with the character code.

EDIT - the &900 part should fix the corrupting of characters (it worked for Cybertron Mission) - but it will only work AFTER the last use of DFS. So once I figure out how to simply loading of the files, I can add the &900 bit. And then I can worry about what's actually useful in the &2C00 bit.

This is what I've typed up from the Hac-Man article so far:

http://www.stairwaytohell.com/cheats/hacman/hacman-v7n10-a-L.jpg

For some time now I've been meaning to raise the point that my Master conversions should also allow the game in question to run on the B+ and B+128. However, the hardware and software architecture of the B+ is considerably closer to the model B than is the architecture of the Master, so illegally written games should need far less converting to run on it.

While on the subject of B+/Master conversions, if anyone has persuaded Android Attack, Bounty Bob Strikes Back, Caveman Capers, Jet Set Willy, Jet Set Willy II, Manic Miner, Paranoid Pete or Snakepit to run on the Master (or B+), I would be very interested to hear from them.

Open door for Wulf

As promised in last month's column, here's a routine to convert Ultimate's Sabre Wulf to run on the Master 128. It was the second Ultimate game to be rewritten for the BBC B and instantly became a hit, gaining the reputation of being more than a little bit special - one more than maintained by the other Ultimate games that followed.

However, this degree of excellence was achieved at the expense of legality, for all the company's BBC Micro games are more than liberally sprinkled with routines that prevent them from working with any other machine other than a standard BBC B.

Sabre Wulf was also the first well-known game on which the name Kevin Edwards appeared - he devised the cassette protection. Although Sabre Wulf's protection is merely a taste of the thoroughly nasty and later downright evil 6522 timer protection systems with which the name Kevin Edwards came to be associated, it is still an encryption befitting such a game. I found it interesting to return to this aspect of the game, because it uses a particular protection technique that I have not seen used before or since.

The following listing will convert the illegal sections of Sabre Wulf's program code so that the game will run on the Master 128. It certainly should allow the game to be run on the BBC B+ - indeed, I have written it so that it will distinguish between the B+ and the Master and convert accordingly - but I have not been able to test it on the older machine. Nevertheless, I am confident that it will work on the B+. If it doesn't, I'm sure you'll let me know.

My apologies for the length of the listing, but there is quite a bit of dodgy code to patch.


Thanks.

User avatar
richardtoohey
Posts: 3354
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: Master 128 game compatibility

Postby richardtoohey » Sun Feb 10, 2013 8:19 am

richardtoohey wrote:EDIT - this is the (working) theory - now I just have to put the right code in there - I'll try and &900 code first ...

[1] *LOAD Sabre
[2] ?&19e7=&80:?&19e8=&67 Change the jump in &0000 code to jump to my code
[3] *SAVE Sabre 1900+E9 1909
[4] Assemble my code to 6780 P%=&6780:[JMP&4ACF:] Just do original jump for now
[5] *LOAD TheGame 2000
[6] *SAVE TheGame 2000+4800 0000

Now the missing step is between 3 & 4 - assemble some code that does something useful - I'll start with the character code.
And from theory to practice - here is Sabre Wulf without the corrupted characters.

This is JUST Hac-Man's code that assembles at &900, I've still got to wade through the rest of the code from &2C00 to see if anything useful in there.

[EDIT - no wading required, because billcarr2005 hit me with a big clue stick earlier - glad I re-read it before trying to figure out the decryption code!
billcarr2005 wrote:2C9E Sets up some code (The Master compatibility part?)
2CC8 Redirects vectors to Master areas

I'd still like to understand it, though, so some thinking still required]

Here's the code (not completely understood by myself yet! I need to lift some parts of this into my patch, but it's (my) bedtime here.

Code: Select all

http://mdfs.net/Docs/Comp/BBC/AllMem
&FFB6-&FFB8 VECTAB - Length, address of default vector table

2C9E   LDA &FFB7:STA &70      FFB6 &36 &40 &D9
   LDA &FFB8:STA &71

   Get address of default vector table

   LDY #&04      So get the 4th entry in the vector table?
   LDA (&70),Y:STA &2DE3   Store to 2DE3,2DE4 (before code copied down)
   INY
2CB2   LDA (&70),Y:STA &2DE4   

2CB5   LDX #&21
2CB7   LDA &2DC3,X      Was this 19c3 on mine?  The same code copying
2CBA   STA &00,X      down to &0000?
2CBC   DEX
2CBD   BPL &2CB7

2CBF   SEI
2CC0   LDA #&00
2CC2   STA &204      IRQ1V   primary interrupt vector
   STA &205

   LDY #&10      Now look at the 10th vector in the default table
2CCA   LDA (&70),Y
   STA &0210      RDCHV   read character vector
2CCF   INY
   LDA (&70),Y
   STA &0211
   CLI

2CD6   LDA #&00      Copying code down ...
   STA &70
   STA &72
   LDA #&2E
   STA &71
   LDA #&0E
...
2CF9   JMP &0E00      Start game
Let me know how you get on with this version.

The SSD has HAC-MAN which is the code from the article (not sure it's 100% typed-in correctly yet) and DSABRE is my code - for step 4 above - just F.Y.I. - all you have to do is "boot" the "floppy" as normal.
Attachments
Sabre-Master.zip
Sabre Wulf - disc version, no corrupted characters
(162.04 KiB) Downloaded 88 times
Last edited by richardtoohey on Sun Feb 10, 2013 8:57 am, edited 1 time in total.

User avatar
Kecske Bak
Posts: 671
Joined: Wed Jul 13, 2005 7:03 am
Location: Treddle's Wharf, Chigley
Contact:

Re: Master 128 game compatibility

Postby Kecske Bak » Sun Feb 10, 2013 8:31 am

billcarr2005 wrote:b) to obfuscate what the code at &2C00 is doing

IIRC the answer is b) - Hac Man wrote in his columns about the problem of doing cheats that by necessity worked round Superior's disc protection and that he tried to obfuscate what such code was doing on purpose.

tom_seddon
Posts: 78
Joined: Mon Aug 29, 2005 11:42 pm
Contact:

Re: Master 128 game compatibility

Postby tom_seddon » Wed May 10, 2017 11:13 pm

I'm a bit late to this thread, but, randomly, here's a Master 128-plus-65Link fix for Tynesoft's Rig Attack.

3 fixes:

1. it used the *640 table at $C375 (loader now adds one at $120)
2. assumed the default IRQ1V handler was at its OS 1.20 address (it now loads it from the value of IRQ1V on startup, like normal people)
3. left some unnecessary IRQs enabled on the User VIA (it only uses T2, but it was enabling T1+T2+CB1+CA1 - I'm guessing this was what was causing the problems with 65Link, which uses the user port)

If you get a non-functional submarine appearing at the start of game: I've seen that happen on B-em, running the original in B mode, so I don't think that's anything I've done!

Not a huge fan of this game or anything, but I'm a sucker for Mode 1, and I like 50Hz, and this has both :)

--Tom

P.S. if you look at the everygamegoing page for the Electron version, you'll see that it has an awesome title screen, sadly missing from the STH copy. I hope it was compressed somehow, though, because I doubt the average player would have appreciated having to wait for &5000 bytes to load from tape when the main game itself is only &2C00.
Attachments
RigAttackMaster128.zip
(7.52 KiB) Downloaded 7 times
Last edited by tom_seddon on Thu May 11, 2017 1:27 am, edited 2 times in total.

User avatar
davidb
Posts: 1825
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Master 128 game compatibility

Postby davidb » Wed May 10, 2017 11:50 pm

Every Game Going shows modern title screens, based on the original covers. Acorn Electron World mentions this: "A selection of images designed by Dave E from the original cover art which introduce many Acorn Electron World discs"

tom_seddon
Posts: 78
Joined: Mon Aug 29, 2005 11:42 pm
Contact:

Re: Master 128 game compatibility

Postby tom_seddon » Thu May 11, 2017 12:09 am

Ah! Thanks for the note - that makes more sense. The style is rather unusual for a late-80s loading screen, but by late-80s box art standard it's a bit less so :)

This did make me check out a video of the Electron version... and holy hell, that's in Mode 1 too! And full screen, with horizontal scrolling (or some approximation thereof). What's the effective clock rate in Mode 1 for the Electron? It must be measured in Hz. A gutsy move.

--Tom

User avatar
davidb
Posts: 1825
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Master 128 game compatibility

Postby davidb » Thu May 11, 2017 12:40 am

That's one of my videos. :D

The Electron is running at more-or-less half speed in MODE 1 but there's not really a lot going on in that game. ;)


Return to “software: classic games”

Who is online

Users browsing this forum: No registered users and 3 guests