New Game: Minesweeper

Include new and ported/converted games, and old games/tools. Subjects about CP/M software goes in the CP/M Forum.
under4mhz
Posts: 30
Joined: 11 Apr 2021 05:12
Location: Brisbane, Australia
Contact:

New Game: Minesweeper

Post by under4mhz »

The classic game of searching for mines.

Press 'A' to reveal the square, press 'S' button to flag as a mine.
screenshot1.png
screenshot1.png (2.27 KiB) Viewed 6140 times
screenshot2.png
screenshot2.png (2.22 KiB) Viewed 6140 times
screenshot3.png
screenshot3.png (8.92 KiB) Viewed 6140 times
screenshot4.png
screenshot4.png (9.44 KiB) Viewed 6140 times
Attachments
Minesweeper-MTX-1.00.zip
(33.49 KiB) Downloaded 326 times
Support me on Patreon: https://www.patreon.com/Under4Mhz
User avatar
gunrock
Posts: 245
Joined: 28 Oct 2020 21:17

Re: New Game: Minesweeper

Post by gunrock »

Love the faux Win95 styling!
Steve G
Danish Memotech MTX 512, MFX and loving it
Martin A
Posts: 799
Joined: 09 Nov 2013 21:03

Re: New Game: Minesweeper

Post by Martin A »

I can't get it to run on real hardware.

The file is too big and overwrites the disc system before it's finished loading.
User avatar
Dave
Posts: 1280
Joined: 11 Aug 2012 18:16
Contact:

Re: New Game: Minesweeper

Post by Dave »

The first Memotech virus ? :o
User avatar
Dave
Posts: 1280
Joined: 11 Aug 2012 18:16
Contact:

Re: New Game: Minesweeper

Post by Dave »

I couldn't get his first game to run either. I have not tried on a real MTX yet (which is why I had not commented before now), but the MTX file does not seem to have a proper header
Martin A
Posts: 799
Joined: 09 Nov 2013 21:03

Re: New Game: Minesweeper

Post by Martin A »

It's got a valid RUN header 0x8000 0x7c00

However anything longer than 0x5700 starts over writing the CPM BDOS that's loaded in from 0xD700 to provide disc services.

I've sort of got it running, by reading in to lower memory, then using Panel to move it up to 0x8000.

There's screen corruption issues from pushing the VDP interfact too hard though. Pitty, as it looks good with those "wondows" colours and such.
Load Screen
Load Screen
Img_4098.jpg (70.71 KiB) Viewed 6073 times
Deaded
Deaded
Img_4100.jpg (51.67 KiB) Viewed 6073 times
under4mhz
Posts: 30
Joined: 11 Apr 2021 05:12
Location: Brisbane, Australia
Contact:

Re: New Game: Minesweeper

Post by under4mhz »

Thanks for the feedback.

I didn't realise CPM was in the higher memory. I've changed it to limit the memory to 21K.

I only actually use 16K, I just padded it make my life easier.

I've also added some wait states around the VDP decompressor.

(It did run fine in MEMU)
Attachments
Minesweeper-MTX-1.01.zip
(33.56 KiB) Downloaded 324 times
Support me on Patreon: https://www.patreon.com/Under4Mhz
Bill B
Posts: 593
Joined: 26 Jan 2014 16:31

Re: New Game: Minesweeper

Post by Bill B »

It depends how you run MEMU.

If you use the -cpm switch then CP/M functionality is emulated and extra high memory is available.

If you load the CP/M boot ROM using -rom4 boot-type07.rom, and have a disk image, then the memory map in MEMU is the same as real hardware.
Martin A
Posts: 799
Joined: 09 Nov 2013 21:03

Re: New Game: Minesweeper

Post by Martin A »

No trashing the CPM code area this time :) instead USER RUN is being pedantic about the file size, and erroring "no data" as the file is too short.

The header format for the RUN file is data block start, and data block size. So the file size needs to be (at least) 4 bytes longer than the data block size.

To make it work with a 20992 byte data block size, the file needs to be 20996 bytes. Or the block size in the header needs reducing to 20988 (0x51FC) to work with a 20992 byte file size.

With 4 random bytes added to the end of the file, I've sucessfully got it to load and run. Unfortunately it's still corrupting the display.
Img_4106.jpg
Img_4106.jpg (68.63 KiB) Viewed 5999 times
You're not the only on caught out by code that works in emulation, but not on real hardware. Interesting things happen if you don't set the read & white bits correctly for address updates as I found out :http://primrosebank.net/computers/mtx/p ... om_dev.htm
Martin A
Posts: 799
Joined: 09 Nov 2013 21:03

Re: New Game: Minesweeper

Post by Martin A »

Having re-read Andy's notes in the Hextrain sources, I suspect that the problem is the sequence

Code: Select all

OUT  (C),E
OUT  (C),D
OUT  (1),A


You could try inserting the 2 NOPS between the address setup and the data write . Although only a 3us address set up to data read delay is mentioned in manual, apparently there needs to be a delay between an address set up and a data write too.

Code: Select all

OUT  (C),E
OUT  (C),D
NOP
NOP
OUT  (1),A
Post Reply