
Digging for treasure in Aladdin’s source code - j_s
https://gamehistory.org/aladdin-source-code/
======
ggambetta
I wish source code for more old games was available. For a long time I was
trying to trace the source of Dark Sun: Shattered Lands and Dark Sun: Wake of
the Ravager, as I'd love to port them to run in modern systems (without
emulators, and with the idea to fix bugs and/or improve the art - making a
"remastered edition", if you will). Same for other games I loved back in the
day - the Twinsen series, Twilight:2000, and a few others.

There's the hybrid emulation approach
([http://gabrielgambetta.com/remakes.html](http://gabrielgambetta.com/remakes.html)
\- disclaimer, I wrote that) but I haven't gotten around to doing it for these
games.

~~~
peruvian
In the 90s a lot of companies (including big ones like Square Enix) simply
deleted the source code once the game launched. They truly thought they had no
need for it any more.

~~~
BearGoesChirp
While I support YAGNI, I only support it when there is a copy somewhere in the
source control history. I don't understand why they would permanently delete
it even if they weren't planning on ever using it again? Was space that
limited? Or was this a middle management kind of thing?

~~~
egypturnash
To be honest this is pretty normal for any modern medium. There's a period
where nobody bothers to do any kind of archiving.

TV shows didn't get routinely archived until quite some time after things like
"video tape" existed. Now and then early episodes of something important being
discovered is news.

Most of the early history of comic strips and comic books has been lost.
Original art was thrown away; modern restorers have gone through some heroic
efforts to piece together archives from whatever copies of the stuff they can
find.

Games? Hell, there's a not-insignificant chance nobody was even _using_ source
control until the time when video game budgets started to match feature film
budgets. Companies die, and if you're lucky then someone takes home source
archives. before all the drives are wiped.

History repeats itself.

------
mr-ron
If you like this you would love
[https://tcrf.net/The_Cutting_Room_Floor](https://tcrf.net/The_Cutting_Room_Floor)
which has hundreds of these types of articles showing lost content and logic
etc.

My favorite being
[https://tcrf.net/Super_Mario_Bros._3](https://tcrf.net/Super_Mario_Bros._3)

~~~
corysama
A lot of 'lost content' and 'off camera' videos are posted to
[https://www.reddit.com/r/videogamescience/](https://www.reddit.com/r/videogamescience/)
There's also
[https://www.reddit.com/r/TheMakingOfGames/](https://www.reddit.com/r/TheMakingOfGames/)
for 'behind the scenes' videos.

~~~
spondyl
Oh heck, just from a quick glance, /r/videogamescience may be my new favourite
subreddit, or website rather since I hardly use Reddit.

I love this sorta stuff but I'd never heard a searchable term for it like
"video game science" before.

Thanks!

------
AdmiralAsshat
It's a pity. If you were a Nintendo fan back in the day (because if you were a
_gamer_ in the 16-bit days and did not have high discretionary income, you
likely only had a SNES or a Genesis, not both), you played an interesting,
albeit completely different Aladdin game, made by Capcom instead:

[https://en.wikipedia.org/wiki/Disney%27s_Aladdin_(Capcom_vid...](https://en.wikipedia.org/wiki/Disney%27s_Aladdin_\(Capcom_video_game\))

Interesting in its own regard for being one of the early projects of Shinji
Mikami, the Capcom designer who masterminded Resident Evil, Devil May Cry, and
others.

~~~
wnevets
IIRC the sega version was the superior one, is that true?

~~~
b3b0p
I think it's arguable. Laser Time did a video with them playing both side by
side. It's a fun watch:
[https://youtu.be/_GpBHA5_bd0](https://youtu.be/_GpBHA5_bd0)

------
neonnoodle
This is my favorite game of all time. What an amazing breakdown of its
contents! Still inspiring in 2017. I'm glad to see other finely animated side
scrollers like Cuphead are being made.

------
Answerawake
The PC shareware version of this game was the very first thing I ever
downloaded from the internet back in 1995. I never got the audio to work. With
my Sound Blaster 16 card it would always produce the "data noise" that you
would hear if you were to play back a data track in a CD player.

This is one of those unanswered questions in my computing career. Did anyone
else play the PC version and if so, did you also have problems getting the
sound to work in the shareware demo? Does anyone have any ideas as to what
could have caused this problem? Was it just not tested?

If I never do get an answer, one day when I have time, I hope to set up a test
environment, find that old shareware demo and try to reverse that part of the
code to see what it is doing.

~~~
khedoros1
It's available on archive.org. It (the music) works in DosBox using Sound
Blaster 16 emulation, and providing the value for DosBox's "hdma" setting,
rather than the standard "dma" setting. Giving it the value for "dma" just
resulted in silence, but maybe could've screeched in your ear on the actual
hardware.

I've got a machine with an SB16 at home, and you've made me curious to try it.
My kid'll be happy to see a new game running on it :-)

~~~
khedoros1
Looked at it. I've got 192MB in that machine, and apparently there's a bug in
the game that causes it to react badly to over 32MB of RAM, with an error like
"Error allocating XMS".

I can have Windows 98 expose less memory to the process, and the game
launches, but no OPL3 audio then. Apparently there are some XMS-eater programs
that would consume all the spare memory, but I haven't experimented with those
yet.

That's the easy solution, but I'm tempted to find the error in the code and
patch the binary.

~~~
Answerawake
Thanks for looking into it. Hmm, I recall that I was running the game on a
Windows 95 (ver a or b most likely not OSR2) box with maybe 32MB of ram?
Possibly 16MB

So on your machine, what sound card do you have installed? Are you able to
select sound blaster 16 in the configuration?

Also, as a side note, I finally got to hear what it is supposed to sound like
on archive.org :)

~~~
khedoros1
No idea if you're still watching this thread.

I've got a Creative Labs Sound Blaster 16 card. It's a version with ISA and
PnP (no jumpers), but I don't remember the exact model number offhand.

I selected SB16 in the configuration without trouble.

I also did some extra credit work: I diagnosed and fixed the memory error that
I described, to get it running on my machine. There's a place in the code
where it gets the number of kilobytes of free RAM. It compares it to the
required memory, then uses a "jg" (signed comparison, jump if greater) to
jump. I changed that instruction to "ja" (unsigned comparison, jump if above),
and the game boots correctly now.

Of course, the easier answer was always "download the demo from archive.org
and run it in Dosbox", but then you're missing out on part of the fun ;-)

~~~
Answerawake
Hey there,

Thank you for the follow up. I have an old Pentium 3 laptop lying around that
I have been meaning to try to use to simulate the audio issue. I am not
convinced that giving the value of "dma" is what caused the audio glitch.

I wanted to record a video showing the issue so maybe we can try to trace what
was causing the audio problem. It could have been maybe an old version of the
shareware demo with the bug? Maybe there was something specifically wrong with
my machine back in 1995? I do recall that I did have an ISA Sound Blaster 16
card. I am not entirely sure but I may have re-tested the game (and still had
the problem) in 1998 when I got a better computer, this time with an AWE64
Value ISA card.

I have to embarrassingly admit that despite me studying CS, I would not know
how to trace the game like you did to discover the cause of the memory
problem. One day I hope to get to your level of expertise.

I have not been able to set aside some time to see if the audio glitch is
reproduced on that Pentium 3 laptop. I am not even sure what kind of sound
card is in there but it is the oldest hardware that I have so it will be worth
a shot.

------
gavanwoolery
The (S)NES classic editions have demonstrated the clear appeal of these older
platforms.

I think Nintendo/Sega/etc could rake in a lot of cash if they designed _new_
games for these old systems. I would love to see a new Super Mario World-esque
game that operated within the confines of the classic SNES.

~~~
carc1n0gen
Have you ever tried out a "rom hack"? People often alter ROMs code to make
entirely new worlds/levels. Pair them with something like an ever drive and
you get to play them on the real hardware.

~~~
KGIII
People are making new games for the old systems. It's quite an active
community. They make and sell cartridges that have brand new games on them.

I dug out a link, but it's just the tip of the iceberg:

[https://www.theverge.com/2017/5/9/15584416/new-games-
retro-c...](https://www.theverge.com/2017/5/9/15584416/new-games-retro-
consoles-nes-snes-sega-genesis-famicom)

~~~
BearGoesChirp
Just a word of caution for anyone looking to buy rom hack cartridges, many rom
hacks were never intended to be put on cartridges and the original rom hack
developers do not support nor benefit from doing so. It's also possible the
rom hack on the cartridge isn't the final version.

~~~
KGIII
I am not sure I understand, so I will defer to you.

My understanding was that independent game authors were writing games and
making cartridges for these games which they then sold.

If I am understanding you correctly, somewhere in this chain is copyright
infringement? Are people buying a cartridge, extracting the content, and
loading it into new cartridges?

Is the market large enough to support that much effort and expense?

Or are people finding roms, perhaps intended for use with emulators, and
loading those onto physical cartridges and selling them without renumeration
or permission?

If so, is the market large enough for that to go unnoticed? My understanding
was a successful new game might sell a few thousand cartridges and great
success was in the 10,000 units sold area.

Being so small a market, and requiring the investment to even make the
cartridges, it'd seem easier to spot this (from the IP owner's perspective)
and seek preventative legal responses.

Sort of related: I know this requires some specialized equipment to make new
cartridges, but do you know if they sell blank cartridges that can just be
loaded with games? I am aware that some cartridges had custom chips on them
and didn't confirm to any standard, like Zelda cartridges that contained
memory and a chip for saving game states.

I am guessing, hopefully, that you know more about this stuff than I do.

~~~
khedoros1
> Or are people finding roms, perhaps intended for use with emulators, and
> loading those onto physical cartridges and selling them without renumeration
> or permission?

I think they're talking about this case (based on the wording "rom hack
cartridges"). Someone takes an original game ROM and modifies it in some way
(translation, level mods, whatever). Someone else takes the modified code,
burns it onto actual hardware, and sells the result.

> Sort of related: I know this requires some specialized equipment to make new
> cartridges, but do you know if they sell blank cartridges that can just be
> loaded with games?

The usual method that I know is to remove the ROM chips from a donor cartridge
(a working game), and replace them with chips flashed with customized data.
The donor cart would need to provide the same custom chips/memory
mappers/whatever that the game code expects to be present.

~~~
KGIII
Ah! That explains the method, at least. I'm a bit surprised that the market is
large enough to support the effort and expense. My limited exposure suggests
that it isn't a very large market and I'd been led to believe that it wasn't
very profitable.

Though, I suppose it becomes more profitable if you're not paying to develop
the game or for the rights to distribute the game.

I wonder if there's technically a possibility for, and a market large enough,
for generic cartridges - perhaps several kinds that had different standardized
hardware in them.

~~~
khedoros1
I don't know much about market size, but I know that some developers _are_
working on physical releases of new games for old consoles. Written from
scratch, with new IP.

I found references to a few on my own, then found this article that mentions
most of the ones that I found:
[https://www.theverge.com/2017/5/9/15584416/new-games-
retro-c...](https://www.theverge.com/2017/5/9/15584416/new-games-retro-
consoles-nes-snes-sega-genesis-famicom)

It says that the NES game Star Versus has sold about 300 copies since its
release (in 2014, I think). So, there's an idea of the market, I suppose. I
haven't found much in the way of information about its development, so far.
There was a forum post that mentioned that it seems to use a new, undocumented
memory mapper chip, which implies that the developer produced their own,
rather than use the "donor" method that I suggested earlier.

Just for curiosity's sake, an SNES game that was developed in 2013, and is
available for purchase (I've no idea if they have the rights to sell it or
not) : [https://console5.com/store/piko-super-4-in-1-multicart-
super...](https://console5.com/store/piko-super-4-in-1-multicart-super-
nintendo.html)

------
barbs
I recently found a channel on YouTube ran by an old Telltale Games developer
talking about some of his development tricks, mostly for SEGA Genesis games.
Really well done.

[https://www.youtube.com/channel/UCfVFSjHQ57zyxajhhRc7i0g/vid...](https://www.youtube.com/channel/UCfVFSjHQ57zyxajhhRc7i0g/videos)

------
g051051
Is this archive publicly available? I'd love to dig through it.

~~~
mwrouse
I searched the website and didn't find anything. Is it really an archive if it
is private? Sure, museums and stuff have a lot more in archive than is what is
on display, but at least some of it on display.

------
greggman
iirc the digicel tech was originally created for DynoBlaze by John Alvarado
then later refined for other projects.

[https://www.unseen64.net/2009/08/06/dyno-blaze-genesis-
mega-...](https://www.unseen64.net/2009/08/06/dyno-blaze-genesis-mega-drive-
cancelled/)

------
fapjacks
Some of my fondest early teenage memories are tied up in this game. This was
truly a remarkable and enjoyable read!

