Thought experiment: Would it be possible to make an un-copyable cart for the Vic?

Discuss anything related to the VIC
Post Reply
User avatar
beamrider
Vic 20 Scientist
Posts: 1452
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Thought experiment: Would it be possible to make an un-copyable cart for the Vic?

Post by beamrider »

I was thinking along the lines of a Raspberry pi zero, microcontroller, FPGA or similar in a physical cartridge form with the PCB sealed in resin. It could operate similar to the KingFu flash and emulate the game ROM rather than being a static ROM open for inspection.

Moreover it could be written in such a way that the generated code was customised so that it wouldn't work if someone managed to just scope the data bus and copy the contents to a normal ROM (assuming that all the memory locations were read at some point). e.g. comparing specific values with screen raster position etc based on a starting value, writing to ROM and having the cart mutate it in a secret way that was later checked by the dynamically generated code and other such obfuscation measures that I haven't thought of. Taking it to the extreme, perhaps the 6502 could just be executing continuously dynamically generated code.
groepaz
Vic 20 Scientist
Posts: 1187
Joined: Wed Aug 25, 2010 5:30 pm

Re: Thought experiment: Would it be possible to make an un-copyable cart for the Vic?

Post by groepaz »

Since the vic20 wasnt designed as a trusted system from the ground up, this will not work - Anything you do can be cracked. You can only make it harder and more annoying to do (and more expensive to manufacture)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
Mayhem
High Bidder
Posts: 3027
Joined: Mon May 24, 2004 7:03 am
Website: http://www.mayhem64.co.uk
Location: London

Re: Thought experiment: Would it be possible to make an un-copyable cart for the Vic?

Post by Mayhem »

PCBs set in resin? The Tymac carts for Vic20 were exactly like that!
Lie with passion and be forever damned...
User avatar
beamrider
Vic 20 Scientist
Posts: 1452
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: Thought experiment: Would it be possible to make an un-copyable cart for the Vic?

Post by beamrider »

I'm aware that given unlimited resources, anything is crackable but I think it would be feasible to release a game such that the only practical way to play it was to buy the cart?

Even if you could crack something like mentioned in the OP (e.g. dynamically generated instructions etc), you wouldn't gain much as to play it you would need to buy exactly the same hardware as such an exotic cart is unlikely to be supported in emulators like VICE.
groepaz
Vic 20 Scientist
Posts: 1187
Joined: Wed Aug 25, 2010 5:30 pm

Re: Thought experiment: Would it be possible to make an un-copyable cart for the Vic?

Post by groepaz »

Oh trust me, if that kind of thing would happen, it will be cracked and it will be added to VICE, sooner or later :)

Reminds me i still have the Prophet64 dumps here 8)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
beamrider
Vic 20 Scientist
Posts: 1452
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: Thought experiment: Would it be possible to make an un-copyable cart for the Vic?

Post by beamrider »

so assuming for arguments sake it was implemented using dynamically generated 6502 on a PI, you would add a complete PI emulator to VICE in order to play a single (closed source) Vic 20 game?

From reading the KungFu flash posts, it appears extremely tricky to get the timing correct in order to pull this off, so the interface between the two emulators would need to replicate this as well, not trivial I imagine. (Do you have a KungFu flash emulator in VICE yet btw?)

Also, even if you did this, you've still not copied the game in a format playable on the original hardware. You would need to clone the cartridge hardware and obtain an illegal copy of the PI source code. Also, since no other software takes advantage of this bespoke hardware combination you might as well just buy the real thing.
groepaz
Vic 20 Scientist
Posts: 1187
Joined: Wed Aug 25, 2010 5:30 pm

Re: Thought experiment: Would it be possible to make an un-copyable cart for the Vic?

Post by groepaz »

so assuming for arguments sake it was implemented using dynamically generated 6502 on a PI, you would add a complete PI emulator to VICE in order to play a single (closed source) Vic 20 game?
No, I'd just reproduce what the cartridge does, not actually emulate the cartridge (that is way too much work and most likely unneeded for such thing)
From reading the KungFu flash posts, it appears extremely tricky to get the timing correct in order to pull this off, so the interface between the two emulators would need to replicate this as well, not trivial I imagine.
Actually no - it'd be much easier to create in emulation than with actual hardware - since in emulation everything is guaranteed to run in perfect sync at all times. All the tricky bus timing then turns into simple function calls.
Also, even if you did this, you've still not copied the game in a format playable on the original hardware. You would need to clone the cartridge hardware and obtain an illegal copy of the PI source code. Also, since no other software takes advantage of this bespoke hardware combination you might as well just buy the real thing.
Yes, that is correct. It would at some point be pointless to make a pirate cartridge for the real hardware - provided the game actually requires that cartridge and cant be ripped and run on different (simpler) hardware.

I'd still put the effort into producing a decent game. Those who want to buy it will buy it anyway :)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
beamrider
Vic 20 Scientist
Posts: 1452
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: Thought experiment: Would it be possible to make an un-copyable cart for the Vic?

Post by beamrider »

No, I'd just reproduce what the cartridge does, not actually emulate the cartridge (that is way too much work and most likely unneeded for such thing)
Interested as to how you'd do this...

Let's for example assume the game is several megabytes but just spools to the Vic the correct instructions to write to video/sound based on provided joystick input.

How would you replicate this, you wouldn't be able to include the game code as that would be copyright, so you would have to create something that hosts the game code (which would need to be provided by the end user).

Wouldn't this by necessity then be a PI emulator?
User avatar
JonBrawn
Vic 20 Devotee
Posts: 225
Joined: Sat Sep 11, 2021 10:47 pm
Website: http://youtube.com/@vicenary
Location: Austin TX USA
Occupation: CPU design engineer

Re: Thought experiment: Would it be possible to make an un-copyable cart for the Vic?

Post by JonBrawn »

There's an AUDIO pin on the expansion connector, so generate the audio using a circuit inside the cartridge (SID chip?). Put sockets on the back of the cartridge for the joysticks to plug into. (it IS a four-player game, isn't it?). Eventually, if you keep adding hardware to the cartridge, it becomes such a pain in the bum for people to copy that they won't bother. They'll also not bother buying the cartridge, as it'll be way too expensive.
Working on FPGA replacement for 6560/6561
https://youtube.com/@vicenary
groepaz
Vic 20 Scientist
Posts: 1187
Joined: Wed Aug 25, 2010 5:30 pm

Re: Thought experiment: Would it be possible to make an un-copyable cart for the Vic?

Post by groepaz »

How would you replicate this, you wouldn't be able to include the game code as that would be copyright, so you would have to create something that hosts the game code (which would need to be provided by the end user).
Of course the user would have to provide the dump - thats the same with any other software :) Instructions for making the dump could be provided (which is what would happen if one of us does finally implement prophet64 emulation)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
Post Reply