12

The V-Tech Laser 128 is an Apple II clone. This machine uses a clean-room copy of the Apple II BIOS and was intended to be compatible with Apple software. However, Brøderbund's games stored with the RWTS18 filesystem didn't run on this machine. I understand why it wouldn't run on an emulator, but why doesn't it run on a clone with an original disk?

wizzwizz4
  • 18,543
  • 10
  • 78
  • 144

2 Answers2

16

I don't know how these rumors get started in the first place.

I have originals of:

Hardware

  • Laser 128, ROM Version 4.5
  • Laser 128EX, ROM Version 4.5

Software

Brøderbund RW18 games:

  • [m] Airheart
  • [X] Wings of Fury (works)
  • [X] Where in the USA is Carmen San Diego?
  • [X] Where in Europe is Carmen San Diego?
  • [X] Where in the World is Carmen San Diego?

Broderbund non-RW18 games:

  • [no] Choplifter (loads then fails machine check)
  • [X] Drol
  • [?] Gumball (fails to load, shows ROM GR test screen!)
  • [X] Spare Change

I've tagged games:

  • that work with [X],
  • that don't with [ ],
  • that can work with modifications [m],
  • that need investigation with [?].

I verified every game boots and plays either on //e or //c to make sure the disk is good.

I am one of the AppleWin's developers and can provide a definitive answer to end this stupid confusion over the Laser 128 and Roland Gustafsson's RW18 code, hopefully, for once and for all.

W.R.T. to Airheart:

  • It DOES work on my Laser 128.
  • It does NOT work on my Laser 128EX.

Since these two Lasers have the exact same ROM this tells me it is NOT a disk-drive machine incompatibility but sloppy code in Airheart.

As emulator maintainers we come across all sorts of bugs and stupid "hacks" including, but not limited to:

  • using illegal 6502 opcodes -- Lock-N-Chase
  • does a ROM checks -- Airheart, Choplifter, etc.
  • using uninitialized memory such as the RNG RND -- Pooyan (IIRC)

These prevent original disks working on emulators and clones. At the time Mr. Freeze's ROM was a (popular?) ROM mod to make Ctrl-Reset always stop the CPU and enter into the built-in ROM debugger, aka, the Apple 2 System Monitor. Game developers started getting aggressive to prevent people from "ROM dumping" the disk image.

Let's fire up Airheart and see what happens on our Laser 128EX. It prints this message ...

    REQUIRES //C OR 128K //E

... and hangs.

The code in question is @ $0946

    0946:A0 00          LDY #$0
    0948:B9 53 09       LDA $0953,Y
    094B:F0 FE          BEQ $094B       ; Hang on end-of-string
    094D:99 28 06       STA $0628       ; putchar() on Row 13
    0950:C8             INY
    0951:D0 F5          BNE $0948       ; always -- assumes string is < 256 length
    0953:
    0953:               MSB ON
    0953:               ASC "REQUIRES //C OR 128K //E"
    0953:D2
    0954:C5 D1 D5 C9
    0958:D2 C5 D3 A0
    095C:AF AF C3 A0
    0960:CF D2 A0 B1
    0964:B2 B8 CB A0
    0968:AF AF C5
    096B:               DFB 0
    096B:00

How the heck did I know that?

If we were to boot trace this on a //e or //c we could normally do:

    CALL-151
    9600<C600.C6FFM
    96FA:9F
    9F01:60
    9600G

Unfortunately, the Laser 128EX P5 PROM for the disk controller is hard-coded to run at address $C600 along with using the firmware expansion at $C800. We need to manually "patch-up" the boot stage 0 firmware code.

Specifically, we need to "page" in the firmware ROM and copy it, then fix up all the calls to $C6xx or $C8xx.

    C600:0
    9800<C800.C8FFM
    960D:98
    9610:98
    9660:98
    9669:98
    9696:96
    96D7:98
    96EA:98

Putting it all together:

    CALL-151
    C600:0
    9800<C800.C8FFM
    9600<C600.C6FFM
    96FA:9F
    9F01:60

    960D:98
    9610:98
    9660:98
    9669:98
    9696:96
    96D7:98
    96EA:98

    9600G

Inspecting the boot sector and back-tracing how the PC (Program Counter) ends up at $092F we see this machine check at $08D7:

    08D7:AD 81 C0       LDA $C081       ; Turn off Language Card RAM @ $D000 .. $FFF
    08DA:AD 81 C0       LDA $C081       ; Re-enable ROM bank @ $D000 .. $FFFF
    08DD:AD B3 FB       LDA $FBB3       ; MachineId byte
    08E0:C9 06          CMP #$06        ; 
    08E2:D0 4B          BNE $092F       ; Laser 128EX = $06 = pass
    08E4:2C 17 C0       BIT $C017       ; SLOTC3ROM
    08E7:30 46          BMI $092F       ; <- Clone triggers this

In case you are curious you can find a list of the Apple 2 I/O softswitches at Jon Relay's site:

We can "patch" this check to skip the BNE and BMI by changing them to LDA #immediate via:

    8E2:A9
    8E7:A9

This 2 byte patch will make the game work on any //e+ or //c clone.

Finally, here is TL:DR; version to play Airheart on the Laser 128EX:

    CALL-151
    C600:0
    9800<C800.CFFFM
    9600<C600.C6FFM
    96FA:9F
    9F01:A9 A9 8D E7 08 4C 01 08
    960D:98
    9610:98
    9660:98
    9669:98
    9696:96
    96D7:98
    96EA:98
    9600G

To answer the original question:

  • There is nothing incompatible with the Laser 128 and Laser 128EX disk drive that stops it from running Apple 2 software. The sole reason is a lazy developer doing pointless machine identification checks to stop it form working.

  • There is a problem with the Laser 128EX way it handles the status of the C3 firmware. I have no idea why V-Tech's engineers changed the way SLOTC3ROM works on the Laser 128EX compared to the original Laser 128.

/Oblg. Paul Harvey's "And now you know the rest of the story."

Enjoy!

Meta:

Since Nick's answer has already been "accepted" I have no problems merging this into his answer as long the entire information is keep tact. He is one of our fellow AppleWin developers. He understands the Apple II disk drive controller far better then me.

Michaelangel007
  • 710
  • 4
  • 13
  • So Michael, do the other titles you have (listed) all work without modification? That's interesting info about Airheart. I'm a little surprised as it appears in the Laser compatibility list I linked to in my answer. Cracking skills come in handy even if you don't want to copy it. ; - ) – Nick Westgate Mar 26 '17 at 03:19
  • @NickWestgate I've updated the status of the Laser 128EX. I'll get around to testing Gumball on the original Laser 128 and post those results later. – Michaelangel007 Mar 26 '17 at 03:59
  • @NickWestgate Looks like Gumball also does not boot on the original Laser 128 as well -- it partially boots then shows a GR test pattern. I'll boot trace this code later and once I have a work-around will update my original answer. – Michaelangel007 Mar 27 '17 at 15:32
  • UGH Boot-tracing Gumball is going to be a real witch ... thankfully I have 4am's Gumball crack docs to follow along ... – Michaelangel007 Mar 29 '17 at 17:30
  • Finally re-reviewing them - I think your answer's more comprehensive. – wizzwizz4 Nov 15 '17 at 22:36
13

Update: From my research the Laser 128 series was compatible with Broderbund's 18 sector titles.

A friend (thanks Michael!) has tested Wings of Fury on his Laser 128EX, and I've tested Airheart on an Apple //e with a VTech Universal Disk Controller, both successfully. VTech manufactured the Laser 128 series and the UDC and used similar ASIC chips in all of them to get around Apple's patents.

The techniques used in RW18 were no trickier or more timing sensitive than DOS itself. Disk timing is tight, so any emulation of Woz's sequencer design should either work or fail for pretty much everything. The use of 18 sectors was originally a cost-saving measure for the game producers, then an extra hurdle and headache for pirates simply because it required complete understanding of the software's disk layout and took extra effort to convert into a standard 16 sector format.

Note that Bank Street Writer III, Prince of Persia, and Wings of Fury use an extra level of protection which is more sensitive to timing and the implementation of the sequencer, yet we know that at least two of these work on the Laser series.

The entry for Laser 128 in Wikipedia says: (based on this 1986 source)

Central Point claimed in 1986 that testing had found that only Choplifterꟸ [1982], David's Midnight Magicꟸ [1982], and Serpentineꟸ [1982] did not run on the clone, because of Broderbund's copy protection.

However, I don't think those games are 18 sector. Titles that I know are 18 sector:

  • Airheartꟸ (1986)
  • Bank Street Writer IIIꟸ (1986 - well, the Scholastic version is 18 sector)
  • Prince of Persia (1989)
  • Where in the USA is Carmen San Diego?ꟸ (1986)
  • Wings of Fury (1987)

But this 1988 Laser 128 Series Compatible Software List has most titles above that existed at the time. (The titles present in this list are marked with ꟸ).

Another user compiled list from 1990 mentions ROM version 4.2, and also has Choplifter and Serpentine, so I think that the ROM is what caused any incompatibility, not disk problems.

To seal the deal, in qkumba's 2012 crack write-up for Choplifter he notes:

;perform check of ROM code 
;Choplifter does not work on some systems because of this 

This was common practice in protection to prevent the use of crackers' modified ROMs.

Nick Westgate
  • 7,688
  • 1
  • 27
  • 61
  • 2
    same deal for David's Midnight Magic (see http://www.hackzapple.com/phpBB2/viewtopic.php?t=1186) – peter ferrie Feb 12 '17 at 01:12
  • Yeah, thanks Peter. Checking main ROM and slots for RAM (Wildcards etc) was pretty common. – Nick Westgate Feb 12 '17 at 01:49
  • right, and don't get me started on what Spiradisc did. – peter ferrie Feb 12 '17 at 01:54
  • Did your friend test the official 18 sector Wings of Fury or, perhaps, a cracked 16 sector version? – cbmeeks Feb 15 '17 at 21:24
  • @cbmeeks: Originals of course. – Nick Westgate Feb 15 '17 at 21:27
  • @cbmeeks I have an original Wings of Fury disk I bought when the game first came out. It boots to the main menu on side 2 on my Laser 128EX. I have a plain Laser128 along with Airheart on order and will update Nick with the status in a week or so. – Michaelangel007 Feb 17 '17 at 23:50
  • @NickWestgate Did you want to add a link to the RWTS18 source code that I typed up from Roland ? https://github.com/Michaelangel007/apple2_rwts18 – Michaelangel007 Feb 17 '17 at 23:53
  • @Michaelangel007: Sure, thanks. But I'll still refer to it as RW18. ; - ) – Nick Westgate Feb 18 '17 at 01:15
  • @NickWestgate Ha! Nice Nick! But if you can't write shouldn't it be called RTS18 ? :) – Michaelangel007 Feb 18 '17 at 05:01
  • @Michaelangel007: Well, if you look at my answer to another question Roland did release a product with write capability which was extracted and used to make 18 sector copying utilities, but I don't think it could write sectors, only tracks. So that would be RWT18. But Roland called it RW18, so ... – Nick Westgate Feb 18 '17 at 21:02
  • @NickWestgate I'm taking this offline -- since I have a bunch of questions about RW18 -- let's continue our chat over email where it originally started. i.e. I have some Fantavision info that you might be interested in. – Michaelangel007 Feb 20 '17 at 06:56
  • Airheart, Prince of Persia, Last Ninja, D-Generation, etc all perform writes using RW18. Airheart saves high scores, Prince of Persia and Last Ninja save game state, D-Generation has a level editor! The entire track is written at once, even if only one sector will be modified (you had to offer a track-sized buffer filled with original content to preserve other sectors). – peter ferrie Feb 24 '17 at 18:23
  • @peterferrie Hey Peter -- always nice to hear from you! Thanks for the info. on other original RW18 games. Sadly I don't have them -- and I don't see them listed on eBay. Know anyone in the Greater Seattle area -- or would be willing to lend a hand testing them on the Laser 128 and Laser 128EX ? :) – Michaelangel007 Mar 26 '17 at 04:10