Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Poker Face Paul's Cribbage (Unreleased Game) - Source & Data

Reply to topic
Author Message
  • Joined: 13 Apr 2014
  • Posts: 25
  • Location: London, UK
Reply with quote
Poker Face Paul's Cribbage (Unreleased Game) - Source & Data
Post Posted: Tue Jan 04, 2022 4:07 pm
Hi everyone,

I've been slowly but surely recovering data from a mile-high stack of floppy disks using a Greaseweazle over the past few months, and after a few attempts I finally managed to recover all of the source code and assets for an unreleased game from my time as a developer at Spidersoft - namely, Poker Face Paul's Cribbage.

Adrenalin Entertainment - formerly a divison of Western Technologies, a company run by Jay Smith of Smith Engineering (the company that invented the Vectrex) - commisioned a series of these card games. I wrote the help system used in these games, but the principal developer was Dave de Pauw. Fun fact: Dave and I were two of the co-founders of LSD, an Amiga demoscene group.

The code was edited in the DOS-based Boxer editor and assmbled using Krisalis Software's KASM assembler/debugger. Devkit hardware was the ESYS ROM emulator, made by Spidersoft.

Unfortuantely the DOS tools used to gcreate assets for the game were not on this floppy, but I may have them on another floppy somewhere. Spidersoft wrote a mostly standard set of tools unless a game required
a developer to write something unique (e.g. Lemmings 2 map tools).

As this code is built for Gameboy as well as SMS and GG, it should be very straightforward to built the GB ROM. The GB version was also unreleased.

Getting this built and running shouldn't be too much trouble. I'll do my best to answer any questions about the code and assets, but bear in mind this is from nearly 30 years ago, so many of those neurons may not fire anymore ;)

  View user's profile Send private message
  • Joined: 16 May 2002
  • Posts: 1356
  • Location: italy
Reply with quote
Post Posted: Tue Jan 04, 2022 4:08 pm
This sounds interesting, can I crosspost this on Sega Retro?

edit: done'd.
  View user's profile Send private message Visit poster's website
  • Joined: 14 Oct 2008
  • Posts: 510
Reply with quote
Post Posted: Tue Jan 04, 2022 8:42 pm
Thank you very much for sharing.
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8649
  • Location: Paris, France
Reply with quote
Post Posted: Tue Jan 04, 2022 9:24 pm
Thank you for the wonderful gift Matt !
Let's hope someone gets this to build soon :)

*EDIT* Matt posted a copy of KASM 1.77 here: https://www.smspower.org/forums/15019-KrisalisSoftwareSMSGGDevBox#108225
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8649
  • Location: Paris, France
Reply with quote
Post Posted: Tue Jan 04, 2022 9:58 pm
Matt do you remember the commands/settings to skip running debugger in KASM and get a binary?

With DOSBOX by Mounting ("MOUNT C C:\Cribbage") so that all files (sources and KASM) appears C:\KASM i can run kasmz8e.exe
It seems to be doing some assembling but no output file to be found. The debugger does runs but data in there seems empty.

My output is:


Krisalis z80 (esys) M-S/G-G Assembler/Debugger V1.01
Copyright 1992 Krisalis Software Ltd /HKH Services. <0709 372290>

454864 bytes available for the symbol table.

Pass one.
Pass two.

Sent MS/GG bootup code.Reset target.[Esc,R]
Sent MS/GG bootup code.Reset target.[Esc,R]
Sent MS/GG bootup code.Reset target.[Esc,R]MATBUF = 4736

CHRBUF MAX = 5160

RAM END = #DC0E

END OF LOW PROG = #FB0

NON SWITCHING = #3726

PROG END = #7F9E

--------- DATA ROM ---------

NON-WRAPING DATA = #37B3

>> Banks 2 TO 7 = #1510

BANKS USED = #15510

BANKS LEFT = #2AF0

------------------


Press a key to continue ...
                           

*** End of assembly ***

22948 lines assembled.
1399 global symbols
362 local  symbols
0 error(s)
2046 Bytes of MACRO/FUNCTION ram used out of 16384
32416 Bytes of symbol table used out of 454864
Took 50 Seconds
Sorting symbols for debug....       


As for KASMBOY:


Krisalis 'Ni****do GameBoy' (TM) Assembler/Debugger V1.10
Copyright 1992 Krisalis Software Ltd /HKH Services. <0709 372290>

461072 bytes available for the symbol table.

Pass one.
INCLUDE\CHLOWROM.Z80(99) Bad instruction.
INCLUDE\CHLOWROM.Z80(117) Bad instruction.
INCLUDE\CHLOWROM.Z80(119) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1576) Illegal memory reference.
INCLUDE\CHSYSTEM.Z80(1585) Bad/Illegal Register.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1589) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1593) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1655) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1661) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1664) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1665) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1671) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1713) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1719) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1723) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1727) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1737) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1742) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1748) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1755) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1757) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1813) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1819) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1829) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1832) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1856) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1864) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1867) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1932) Bad/Illegal Register.
INCLUDE\CHSYSTEM.Z80(1933) Bad/Illegal Register.
INCLUDE\CHSYSTEM.Z80(1934) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1946) Illegal memory reference.
INCLUDE\CHSYSTEM.Z80(1962) Bad instruction.
INCLUDE\CHSYSTEM.Z80(1963) Too many errors! [FATAL]
TEXT:   OUT (VDPA),A


Not much time to pursue this tonight.
debugger.png (32.84 KB)
debugger.png

  View user's profile Send private message Visit poster's website
  • Joined: 25 Jul 2007
  • Posts: 729
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Wed Jan 05, 2022 7:18 am
I had a play with this today and I don't think it's possible to extract the binary without either the real hardware or hacking KASM.

It seems to assemble in memory then try to upload the program to the debug hardware during Pass two.

Interestingly it seems to send binary data to the soundcard, whether this contains the ROM or simply commands for the debugger I'm unsure.

You can the command nolink to the PROJECT.Z8E which tells it to skip the debug/monitor but it only verifies the code for errors and won't output a file.

There's a command in the monitor console specifically for downloading the ROM from the debug hardware to a file, but again without the hardware, there's nothing to download.

U  upload download
      angle bracket:
      Uploads/downloads memory to file,file to memory
      U>filename,32768,4096
      uploads ram from 32768 len 4096 and puts it in file filename

      U<filename,1024
      downloads filename to address 1024 for however long it is.
      be sure not to overwrite any download software you may have.
      No file length is checked so be sure the file is not too big!

      braces:
      
      U}filename,address{big expression},len {big expression}
      upload absolute memory addresses for making rom images
      to make a 256k rom image you can do.
      Big expression is the assemblers 32 bit evaluater and can be
      up to 1mbyte large {1024K}

      
      U}Game.rom,0,256*1024
      Note that the bank parameters must be set properly to use
      this command. See the assembler directive BANKSPEC for details
      Krisalis Sega boards will work by default.

      U{filename,0
      download rom image filename to target for test.
      Again the BANKSPEC must be set in an assembly

      U{game.rom,0  {enter}
      J startaddress
      Download and run the rom image.
      Be carefull that the download software is not overwritten in
      the download. Move it to ram if need be!
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8649
  • Location: Paris, France
Reply with quote
Post Posted: Wed Jan 05, 2022 7:50 am
A 1992 assembler may simply hold a full copy of the assembled output (128 KB) before sending to audio out, in which case maybe if we dump the VM RAM at the right time we can find the assembled output inside ?
  View user's profile Send private message Visit poster's website
  • Joined: 25 Jul 2007
  • Posts: 729
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Wed Jan 05, 2022 9:11 am
Possibly, no idea how to do that. The audio during Pass 2 is way too short to contain any ROM data.

There is a much longer binary played after exiting the assembler along with info on the ROM size (attached) which may possibly contain valid ROM data.
data.wav (475.99 KB)

KASM.JPG (52.2 KB)
KASM.JPG

  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3825
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Wed Jan 05, 2022 10:28 am
Bock wrote
A 1992 assembler may simply hold a full copy of the assembled output (128 KB) before sending to audio out, in which case maybe if we dump the VM RAM at the right time we can find the assembled output inside ?


is there some DOS era TSR that could be fired up right before transfer and used to search the RAM until we find something that resembles Z80 code?
  View user's profile Send private message Visit poster's website
  • Joined: 13 Apr 2014
  • Posts: 25
  • Location: London, UK
Reply with quote
Post Posted: Wed Jan 05, 2022 10:44 am
Not sure why anything is being sent to audio. ESYS communication is via parallel port, so perhaps DOSBox has some audio hardware hooked up to that port.

I have installed DOSBox-X and redirected the parallel port to file capture. In those captures I can see the KASM boot code and a bit later something that is around the right size to be a ROM, and the Spidersoft copyright message is at the start - so looks about right. But won't load in an emulator, so something is clearly off. I've attached the file here.

There are a few other sends to the parallel port which are probably ESYS config. I'll have a peek at those and see if anything stands out.
kasmz8e_010.zip (73.68 KB)

  View user's profile Send private message
  • Joined: 13 Apr 2014
  • Posts: 25
  • Location: London, UK
Reply with quote
Post Posted: Wed Jan 05, 2022 10:49 am
Well, that didn't take long. Looked at the binary more closely and spotted one rogue byte at the start.

Working GG ROM attached :)
cribbage.zip (73.67 KB)

  View user's profile Send private message
  • Joined: 25 Jul 2007
  • Posts: 729
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Wed Jan 05, 2022 10:51 am
ah, you are probably correct now I think of it because DOSBOX emulates Covox Speech Thing and similar audio DACs on the parallel port. I'll try DOSOX-X.
  View user's profile Send private message
  • Joined: 08 Apr 2005
  • Posts: 474
  • Location: Netherlands
Reply with quote
Post Posted: Wed Jan 05, 2022 11:16 am
MattTaylor wrote
Well, that didn't take long. Looked at the binary more closely and spotted one rogue byte at the start.

Working GG ROM attached :)


Ooh brilliant. Thank you! (now to learn the game's rules... X_X)
  View user's profile Send private message Visit poster's website
  • Joined: 25 Jul 2007
  • Posts: 729
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Wed Jan 05, 2022 12:19 pm
Nice work on ROM!

For anyone trying to compile the Gameboy version, you need to edit CRIBBAGE.Z80 and change the first line to say GBOY EQU 1.

Attached is the assembled ROM but it seems to be missing part of the header so won't boot.
cribbage-gb.zip (53.14 KB)

  View user's profile Send private message
  • Joined: 12 Dec 2010
  • Posts: 77
  • Location: Sheffield, England
Reply with quote
Post Posted: Wed Jan 05, 2022 6:53 pm
MattTaylor wrote
Fun fact: Dave and I were two of the co-founders of LSD, an Amiga demoscene group.


To this day I still enjoy the occasional play of Jesus on E's. Best Amiga demo!

Did you work on Battle Engine Aquila? I tested it, would love a modern remake of that.
  View user's profile Send private message Visit poster's website
  • Joined: 16 May 2002
  • Posts: 1356
  • Location: italy
Reply with quote
Post Posted: Wed Jan 05, 2022 10:41 pm
It took me a few hands to figure out how to play this game (I never heard about Cribbage), but here's some gameplay: https://www.youtube.com/watch?v=ubnog7iikho

I also have a question: there seems to be 4 more "Poker Face Paul" card games on our wiki (Blackjack, Gin, Poker, Solitaire), shouldn't they be collected as a series (e.g. like Sonic)?
  View user's profile Send private message Visit poster's website
  • Joined: 20 Feb 2017
  • Posts: 8
Reply with quote
Post Posted: Thu Jan 06, 2022 1:09 am
Thanks for posting this, it's interesting to look through. Out of curiosity, how did you use the same codebase on both the game gear and game boy? The game boy's CPU is missing some of the registers from a regular Z80 and I don't see anything in the code to to work around this.
  View user's profile Send private message
  • Joined: 06 Jan 2022
  • Posts: 1
Reply with quote
Post Posted: Thu Jan 06, 2022 4:09 am
thatawesomeguy wrote
Nice work on ROM!

For anyone trying to compile the Gameboy version, you need to edit CRIBBAGE.Z80 and change the first line to say GBOY EQU 1.

Attached is the assembled ROM but it seems to be missing part of the header so won't boot.


"u{game.rom,0,256" without anything attached to the parallel port gives the first bank (16 kilobytes) of ROM. (Trying to get a larger file just repeats the first 16K.) I combined the first bank with the parallel port output and padded the ROM to 128 kilobytes to get a complete ROM, although a bunch of things are broken.

The contents of MSX/SOLIBOY.BIN needs to be added at $1C000 (beginning of Bank 7), otherwise the game crashes at startup.

The graphics are messed up, though. I was able to add BAZEFONT.CGB (after SOLIBOY) to restore one of the fonts, but all the other graphics are still broken. I suspect that a lot of the graphics data is in the wrong position (and that the banks need to be moved around).
ROM.zip (57.63 KB)
ROM (in-game with broken graphics)

  View user's profile Send private message
  • Joined: 25 Jul 2007
  • Posts: 729
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Thu Jan 06, 2022 11:51 am
I tried the ROM on both Emulicious and SameBoy and neither would boot.

I also had the distinct impression that much of the data was in the wrong places, and there are large segments of plaintext that don't match the GG version so I suspect there's some non-ROM data mixed in there too.
  View user's profile Send private message
  • Joined: 21 Aug 2012
  • Posts: 363
  • Location: Berlin, Germany
Reply with quote
Post Posted: Thu Jan 06, 2022 2:42 pm
Matt, thank you very, very much. I love the music, too.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8649
  • Location: Paris, France
Reply with quote
Post Posted: Sun Jan 09, 2022 6:21 pm
Thank Matt.

On my first playthrough I noticed glitches on the right side of the result screen, which prompted me to do the parallel port logging on DosBox-X to look at the data. My output had 606 extra bytes accounted for.

However none of that data got accessed in my test with MEKA:
break r rom 1d510..


So I'm not sure what to make of it. Did you intently remove those 606 bytes? They are not in your first dump.

I also padded the ROM with FF as not all software/flash card will happily receive a non-power-of-two file.

- Regardless of those extra bytes couldn't repro the visual glitch (see attachment).
- I also got a crash (some infinite loop) at end of a 7-card w/ Auction Game.

Matt, in your memory was the game 100% finished and QA-ed ?

Quote
I also have a question: there seems to be 4 more "Poker Face Paul" card games on our wiki (Blackjack, Gin, Poker, Solitaire), shouldn't they be collected as a series (e.g. like Sonic)?

Good idea, done![/quote]

  View user's profile Send private message Visit poster's website
  • Joined: 16 Mar 2006
  • Posts: 281
Reply with quote
Post Posted: Sun Jan 09, 2022 10:07 pm
Great work - hopefully a downloadable sms rom will be on the cards soon! (No pun intended!)
  View user's profile Send private message
  • Joined: 13 Apr 2014
  • Posts: 25
  • Location: London, UK
Reply with quote
Post Posted: Mon Jan 10, 2022 2:55 pm
Bock wrote
Thank Matt.
So I'm not sure what to make of it. Did you intently remove those 606 bytes? They are not in your first dump.

I didn't remove anything, but it's possible KASM sent data that were unrelated to the ROM itself when you ran it.

Bock wrote
Matt, in your memory was the game 100% finished and QA-ed ?

It's an unreleased game, so certainly not fully QAed (e.g. externally by a publisher) - but from what I remember it was finished.
  View user's profile Send private message
  • Joined: 16 Sep 2017
  • Posts: 9
Reply with quote
Post Posted: Tue Jan 11, 2022 5:58 am
I'm confused, which one is the good ROM (with working graphics and such)? And how much padding is there in the alt? ~Red

Edit: Never mind, I figured out the second question. Here's the unpadded version for the sake of convenience. ~Red

Edit 2: We am dumb and forgot to clarify that we only figured out the second question. ~Cherri

  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!