2020-07-01 16:22:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LADDER
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The classic CP/M game Ladder reverse engineered in Turbo Pascal.
|
|
|
|
|
|
|
|
|
|
Original GitHub repository: https://github.com/mecparts/Ladder
|
|
|
|
|
|
|
|
|
|
Additional information and compiled version by Anna Christina Naß
|
|
|
|
|
acn@acn.wtf
|
|
|
|
|
|
2020-12-02 15:36:30 +01:00
|
|
|
|
I’ve added a compiled LADDER.COM file for just playing the game (on a
|
2020-07-01 16:22:16 +02:00
|
|
|
|
VT100 terminal at about 8 MHz, eg. a RC2014), and added more information
|
|
|
|
|
on compiling the game.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Keys
|
|
|
|
|
|
|
|
|
|
The file LADDER.DAT is the configuration file that holds the key
|
|
|
|
|
definitions. These can be changed by using LADCONF.COM (the terminal
|
|
|
|
|
definition in LADCONF is not used! This LADDER uses the Turbo Pascal
|
|
|
|
|
terminal definitions).
|
|
|
|
|
|
|
|
|
|
The default keys in this LADDER.DAT are:
|
|
|
|
|
|
|
|
|
|
Up = 8 Down = 2 Left = 4 Right = 6
|
|
|
|
|
Jump = Space Stop = Other
|
|
|
|
|
|
|
|
|
|
(Jump and Stop are not configurable)
|
|
|
|
|
|
2020-12-02 15:36:30 +01:00
|
|
|
|
Also, “bell” sound is enabled and “wise crack marks” are disabled.
|
2020-07-01 16:22:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Compiling notes from Anna:
|
|
|
|
|
|
2020-12-02 15:36:30 +01:00
|
|
|
|
To compile LADDER, just use Turbo Pascal from the TP/ directory. It’s TP
|
2020-07-01 16:22:16 +02:00
|
|
|
|
3.0A for CP/M-80, only without the demo source code.
|
|
|
|
|
|
|
|
|
|
- Copy the TP files together with the LADDER files to one disk
|
|
|
|
|
- The terminal definition is already set to ANSI and the speed is set
|
|
|
|
|
to 8 MHz (for a standard RC2014), so running TINST is not needed
|
|
|
|
|
- Run Turbo Pascal using TURBO
|
2020-12-02 15:36:30 +01:00
|
|
|
|
- Set the compiler options to “compile -> Com-file” (press O, C, Q)
|
2020-07-01 16:22:16 +02:00
|
|
|
|
- Compile LADDER.PAS: press C (Compile), then enter ladder as Work
|
|
|
|
|
file name.
|
|
|
|
|
|
|
|
|
|
This should result in a LADDER.COM file.
|
|
|
|
|
|
|
|
|
|
The rest of this file is mostly the README from the original repository.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ORIGINAL README CONTENT:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
About
|
|
|
|
|
|
2020-12-02 15:36:30 +01:00
|
|
|
|
This is a rewrite in Turbo Pascal of the classic CP/M game “Ladder”,
|
2020-07-01 16:22:16 +02:00
|
|
|
|
originally written by Yahoo Software (not Yahoo!).
|
|
|
|
|
|
|
|
|
|
Ladder is an ASCII character based platform arcade game similar to
|
|
|
|
|
Donkey Kong. You travel through levels with platforms and ladders where
|
|
|
|
|
rocks fall down from the top while you collect statues before reaching
|
|
|
|
|
the exit.
|
|
|
|
|
|
|
|
|
|
Back in 1999 Stephen Ostermiller made a version of Ladder in Java.
|
|
|
|
|
Later, Mats Engstrom of SmallRoomLabs started another version in of
|
|
|
|
|
Ladder in golang. Between my own memories of playing the original game
|
2020-12-02 15:36:30 +01:00
|
|
|
|
on a Kaypro, and Stephen Ostermiller’s and Mats Engstrom’s code, I was
|
2020-07-01 16:22:16 +02:00
|
|
|
|
able to come up with this version.
|
|
|
|
|
|
|
|
|
|
This version will use the original LADCONF.COM configuration program and
|
|
|
|
|
LADDER.DAT configuration file. Since this version is a Turbo Pascal
|
2020-12-02 15:36:30 +01:00
|
|
|
|
program, the terminal configuration portion of LADCONF isn’t used,
|
2020-07-01 16:22:16 +02:00
|
|
|
|
though it still does set up the movement keys, sound and back chatter
|
|
|
|
|
options.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Compiling the game
|
|
|
|
|
|
2020-12-02 15:36:30 +01:00
|
|
|
|
You’d need Turbo Pascal, of course. You’ll also need to edit
|
2020-07-01 16:22:16 +02:00
|
|
|
|
LADCONST.PAS to set the cursor on and off sequences for your terminal.
|
2020-12-02 15:36:30 +01:00
|
|
|
|
LADDER.PAS is the main part of the program. I’ve successfully compiled
|
|
|
|
|
this on a 58K CP/M system, so available RAM isn’t a particularly
|
2020-07-01 16:22:16 +02:00
|
|
|
|
critical limitation.
|
|
|
|
|
|
2020-12-02 15:36:30 +01:00
|
|
|
|
Once you’ve compiled LADDER.COM, copy LADCONF.COM to the same user area.
|
|
|
|
|
If you don’t have a LADDER.DAT file, when you run LADDER the first time
|
|
|
|
|
it’ll automatically load LADCONF to set up the movement keys and
|
2020-07-01 16:22:16 +02:00
|
|
|
|
options, then transfer you back to LADDER.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Limitations
|
|
|
|
|
|
2020-12-02 15:36:30 +01:00
|
|
|
|
At the moment, once you’ve successfully completed the 7th distinct level
|
2020-07-01 16:22:16 +02:00
|
|
|
|
(Gang Land), the program just cycles through all 7 seven levels over and
|
|
|
|
|
over again until the bonus time becomes too short to actually finish a
|
|
|
|
|
level. If anyone knows what the original program actually did (I never
|
|
|
|
|
managed to get anywhere near to completing the original game), let me
|
2020-12-02 15:36:30 +01:00
|
|
|
|
know and I’ll see what I can do.
|
2020-07-01 16:22:16 +02:00
|
|
|
|
|
|
|
|
|
The Delay(ms) call in Turbo Pascal only works for a Z80 running at up to
|
|
|
|
|
32MHz (and TINST will only allow you to specify a value of up to 20MHZ
|
2020-12-02 15:36:30 +01:00
|
|
|
|
if I recall correctly). So if you’re trying to run this on a system with
|
|
|
|
|
an effective clock speed of greater than 32MHz, you’re going to have to
|
|
|
|
|
come up with another mechanism. That’s not an insurmountable roadblock
|
2020-07-01 16:22:16 +02:00
|
|
|
|
though; on my 144MHz-Z80-equivalent RunCPM box running on a Teensy 4.0,
|
|
|
|
|
I patched the Turbo Pascal runtime to make a call to a BDOS extension I
|
2020-12-02 15:36:30 +01:00
|
|
|
|
created to call the Arduino’s delay() function. Works like a charm. If
|
2020-07-01 16:22:16 +02:00
|
|
|
|
your system includes any kind of millisecond counter you can read,
|
2020-12-02 15:36:30 +01:00
|
|
|
|
that’s a good spot to start looking.
|
2020-07-01 16:22:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
References
|
|
|
|
|
|
|
|
|
|
Original Ladder game Ladder in Java Ladder in golang
|