Closed darkstar closed 2 years ago
From what I quickly find online, it seems this may require the IBM BASIC ROM to be present?
In any case, I tried running it with the latest DOSBox-X build as such:
dosbox-x -set machine=cga -set cputype=8086 -c "boot Casino.img"
And after a few choices, it started playing PC speaker music for a brief moment and then gave a black screen with a stream of errors as such in the log:
LOG: 58084944 ERROR CPU:Write 0 to rom at f074d
LOG: 58108862 ERROR CPU:Write 0 to rom at f27b5
LOG: 58132780 ERROR CPU:Write 0 to rom at f6885
LOG: 58180366 ERROR CPU:Write 0 to rom at eea21
LOG: 58204230 ERROR CPU:Write 0 to rom at eed5d
LOG: 58228148 ERROR CPU:Write 6e to rom at ef3d5
LOG: 58251994 ERROR CPU:Write 2bb to rom at f00c5
LOG: 58275668 ERROR CPU:Write 0 to rom at f00c3
LOG: 58299534 ERROR CPU:Write 0 to rom at f00c1
LOG: 58323236 ERROR CPU:Write 0 to rom at f1a9d
LOG: 58346940 ERROR CPU:Write 0 to rom at f1a9b
LOG: 58370642 ERROR CPU:Write 0 to rom at f4e51
LOG: 58394464 ERROR CPU:Write 3500 to rom at fb5bd
LOG: 58418166 ERROR CPU:Write 0 to rom at f8495
LOG: 58442030 ERROR CPU:Write 0 to rom at f2245
LOG: 58465722 ERROR CPU:Write c600 to rom at f2243
LOG: 58489544 ERROR CPU:Write c600 to rom at f5da1
LOG: 58513246 ERROR CPU:Write 0 to rom at fd45d
LOG: 58537068 ERROR CPU:Write 700 to rom at fc1d5
LOG: 58560748 ERROR CPU:Write 3600 to rom at fc1d3
Thy pc booter version also hangs in dosbox-staging.
There is another version of this game on archive.org which does work: https://archive.org/details/msdos_Casino_Games_1982
I downloaded it and checked it out, and it is not a PC booter, but rather a GWBasic executable with some .BAS and .EXE files.
The booter version also has basica.com
and a couple of (scrambled) BAS files on it
Things seem to go wrong here
057A:00003D8A call 00000986 ($-3407) EAX:0000F000 EBX:0000007F ECX:000007D3 EDX:00000000 ESI:00003C32 EDI:0000081D EBP:0000FFFE ESP:0000FFFE DS:099C ES:099C FS:0000 GS:0000 SS:099C CF:0 ZF:1 SF:0 OF:0 AF:0 PF:1 IF:0
057A:00000986 mov bp,4C79 EAX:0000F000 EBX:0000007F ECX:000007D3 EDX:00000000 ESI:00003C32 EDI:0000081D EBP:0000FFFE ESP:0000FFFC DS:099C ES:099C FS:0000 GS:0000 SS:099C CF:0 ZF:1 SF:0 OF:0 AF:0 PF:1 IF:0
057A:00000989 jmp short 00000979 ($-12) (up) EAX:0000F000 EBX:0000007F ECX:000007D3 EDX:00000000 ESI:00003C32 EDI:0000081D EBP:00004C79 ESP:0000FFFC DS:099C ES:099C FS:0000 GS:0000 SS:099C CF:0 ZF:1 SF:0 OF:0 AF:0 PF:1 IF:0
057A:00000979 jmp 00000203 ($-779) (up) EAX:0000F000 EBX:0000007F ECX:000007D3 EDX:00000000 ESI:00003C32 EDI:0000081D EBP:00004C79 ESP:0000FFFC DS:099C ES:099C FS:0000 GS:0000 SS:099C CF:0 ZF:1 SF:0 OF:0 AF:0 PF:1 IF:0
057A:00000203 pop si EAX:0000F000 EBX:0000007F ECX:000007D3 EDX:00000000 ESI:00003C32 EDI:0000081D EBP:00004C79 ESP:0000FFFC DS:099C ES:099C FS:0000 GS:0000 SS:099C CF:0 ZF:1 SF:0 OF:0 AF:0 PF:1 IF:0
057A:00000204 push cs EAX:0000F000 EBX:0000007F ECX:000007D3 EDX:00000000 ESI:00003D8D EDI:0000081D EBP:00004C79 ESP:0000FFFE DS:099C ES:099C FS:0000 GS:0000 SS:099C CF:0 ZF:1 SF:0 OF:0 AF:0 PF:1 IF:0
057A:00000205 push si EAX:0000F000 EBX:0000007F ECX:000007D3 EDX:00000000 ESI:00003D8D EDI:0000081D EBP:00004C79 ESP:0000FFFC DS:099C ES:099C FS:0000 GS:0000 SS:099C CF:0 ZF:1 SF:0 OF:0 AF:0 PF:1 IF:0
057A:00000206 mov si,4C9A EAX:0000F000 EBX:0000007F ECX:000007D3 EDX:00000000 ESI:00003D8D EDI:0000081D EBP:00004C79 ESP:0000FFFA DS:099C ES:099C FS:0000 GS:0000 SS:099C CF:0 ZF:1 SF:0 OF:0 AF:0 PF:1 IF:0
057A:00000209 push si EAX:0000F000 EBX:0000007F ECX:000007D3 EDX:00000000 ESI:00004C9A EDI:0000081D EBP:00004C79 ESP:0000FFFA DS:099C ES:099C FS:0000 GS:0000 SS:099C CF:0 ZF:1 SF:0 OF:0 AF:0 PF:1 IF:0
057A:0000020A mov si,F600 EAX:0000F000 EBX:0000007F ECX:000007D3 EDX:00000000 ESI:00004C9A EDI:0000081D EBP:00004C79 ESP:0000FFF8 DS:099C ES:099C FS:0000 GS:0000 SS:099C CF:0 ZF:1 SF:0 OF:0 AF:0 PF:1 IF:0
057A:0000020D push si EAX:0000F000 EBX:0000007F ECX:000007D3 EDX:00000000 ESI:0000F600 EDI:0000081D EBP:00004C79 ESP:0000FFF8 DS:099C ES:099C FS:0000 GS:0000 SS:099C CF:0 ZF:1 SF:0 OF:0 AF:0 PF:1 IF:0
057A:0000020E push bp EAX:0000F000 EBX:0000007F ECX:000007D3 EDX:00000000 ESI:0000F600 EDI:0000081D EBP:00004C79 ESP:0000FFF6 DS:099C ES:099C FS:0000 GS:0000 SS:099C CF:0 ZF:1 SF:0 OF:0 AF:0 PF:1 IF:0
057A:0000020F retf EAX:0000F000 EBX:0000007F ECX:000007D3 EDX:00000000 ESI:0000F600 EDI:0000081D EBP:00004C79 ESP:0000FFF4 DS:099C ES:099C FS:0000 GS:0000 SS:099C CF:0 ZF:1 SF:0 OF:0 AF:0 PF:1 IF:0
F600:00004C79 add [bx+si],al ds:[F67F]=0000 EAX:0000F000 EBX:0000007F ECX:000007D3 EDX:00000000 ESI:0000F600 EDI:0000081D EBP:00004C79 ESP:0000FFF8 DS:099C ES:099C FS:0000 GS:0000 SS:099C CF:0 ZF:1 SF:0 OF:0 AF:0 PF:1 IF:0
F600:00004C7B add [bx+si],al ds:[F67F]=0000 EAX:0000F000 EBX:0000007F ECX:000007D3 EDX:00000000 ESI:0000F600 EDI:0000081D EBP:00004C79 ESP:0000FFF8 DS:099C ES:099C FS:0000 GS:0000 SS:099C CF:0 ZF:1 SF:0 OF:0 AF:0 PF:1 IF:0
F600:00004C7D add [bx+si],al ds:[F67F]=0000 EAX:0000F000 EBX:0000007F ECX:000007D3 EDX:00000000 ESI:0000F600 EDI:0000081D EBP:00004C79 ESP:0000FFF8 DS:099C ES:099C FS:0000 GS:0000 SS:099C CF:0 ZF:1 SF:0 OF:0 AF:0 PF:1 IF:0
F600:00004C7F add [bx+si],al ds:[F67F]=0000 EAX:0000F000 EBX:0000007F ECX:000007D3 EDX:00000000 ESI:0000F600 EDI:0000081D EBP:00004C79 ESP:0000FFF8 DS:099C ES:099C FS:0000 GS:0000 SS:099C CF:0 ZF:1 SF:0 OF:0 AF:0 PF:1 IF:0
Yeah it has IBMDOS.COM, etc. as files in the .img.
@darkstar, the game will close very quickly as you said if using 8000 cycles as you are. Try a much lower value, like 350, and it should at least play through the intro music.
For me the music is choppy if using output=opengl like you have in your .conf. With output=default the music is smooth.
It works in MAME. At the F600:00004C79
point it runs ROM code.
From what I quickly find online, it seems this may require the IBM BASIC ROM to be present?
You're probably correct.
Is the ROM BASIC entry point consistent?
I can think of two things that might help:
For this program anyway, it appears to be hard-coded to enter at F600:4C79
. You can see the hex values for it in BASICA.COM, which is executed by the AUTOEXEC.BAT file in the .img.
Interesting... Is this consistent with BASICA.COM across MS-DOS 1.x, MS-DOS 2.x, MS-DOS 3.x, etc.?
Don't know, but the BASICA.COM in casino.zip above is identical to the one at https://github.com/microsoft/MS-DOS/blob/master/v1.25/bin/BASICA.COM.
It might only be hard-coded like that in the BASICA.COM of MS-DOS 1.x. I did a quick look through some of the many MS-DOS images. I didn't see BASICA.COM or similar in a MS-DOS 3.31 image. In MS-DOS 2.x images, when there was a BASIC.COM, BASICA.COM or BASICA.EXE, I didn't find hex values 79 4C in them. So, certainly not an exhaustive search or investigation, but it seems like maybe it's only MS-DOS 1.x BASICA.COM.
MS-DOS 2.1 BASIC.COM and BASICA.COM appear to do the same RETF, but to F600:2DB0.
MS-DOS 3.3 replaces them with GWBASIC.EXE.
By the way, if you ever construct a bootable disk image and GWBASIC.EXE complains that "you cannot SHELL to basic", GWBASIC.EXE checks a byte value in segment 0x0050 (something like 0050:0008?) that is NORMALLY zero, however if you made the disk image using Linux tools like mkdosfs and mtools, or mounted the image using Linux's vfat driver, segment 0x0050 will have nonzero values because the MS-DOS boot code uses that segment as a scratch area for the root directory. Certain formerly "reserved" fields of the directory entry later used by "long file names" in Windows 95 are normally zero and happen to overlap GWBASIC.EXE's "I am running" flag. It just so happens that if Linux, Windows, or anything write the newer "creation" and "accessed" timestamps added by Windows 95, those timestamps left over in memory can confuse GWBASIC.EXE.
Why does the intro and music start to play if the game requires ROM BASIC? Isn't this a red herring, because if the game really required ROM BASIC to be present, one would expect it to crash/halt earlier on already...
If you could change the code of DOSBOX-X so that DOSBOX-X searches for a BASIC rom image file and then starts BASIC from the BASIC rom image file.
These are the BASIC rom files PC98 Backup-of-Ce2-Bios.zip IBMPC ibmpc.zip
:
I'll try adding support to load the IBM ROM BASIC image.
I tried adding support for loading the N88 ROM BASIC image some time back. Maybe it was the particular BIOS image I tried, but the ROM BASIC part seems to call directly into other parts of the ROM BIOS so I can't just load part of it and expect it to work.
Why does the intro and music start to play if the game requires ROM BASIC? Isn't this a red herring, because if the game really required ROM BASIC to be present, one would expect it to crash/halt earlier on already...
If you take a look inside casino.img, it has an AUTOEXEC.BAT file. That file gets run when you boot the image. It contains commands to run INTRO.EXE, DRAWING.EXE, then BASICA.COM with the parameter "start". INTRO.EXE and DRAWING.EXE apparently don't need ROM BASIC and show the options and intro. (Intro and music don't just start to play, they play all the way through if you lower your cycles count) But BASICA.COM tries to use the ROM BASIC, expecting it to be there.
New code has been added to load the IBM ROM BASIC into segment F600:0000.
INT 18h processing was updated to jump to ROM BASIC if an image was provided.
BASICA.COM seems able to work with it well enough.
Two things.
There's no command yet, but here's how you can do it.
Run DEBUG.EXE
Type "a" hit enter
Then type "INT 18h" and hit enter
Hit enter again
Type "g" to execute it.
The latest commit changes INT 18h handling to run ROM BASIC instead of a reboot handler.
@joncampbell123
The "INT 18h" gives an error on the "h" part.
In any case, I did a quick test. I booted PC DOS 1.1 and I was able to successfully run BASIC.COM and BASICA.COM with the ROM BIOS loaded.
Without the ROM you get the error "IBM ROM BASIC NOT IMPLEMENTED", but now with the ROM it starts BASIC or BASICA successfully.
edit running BASIC.COM or BASICA.COM directly from the dosbox-x shell also works
Got it working, just had to drop the 'h'.
DEBUG
-a
0DAB:0100 INT 18
0DAB:0102
-g
Code of Conduct & Contributing Guidelines
Have you checked that no other similar bug report(s) already exists?
What operating system(s) this bug have occurred on?
Windows 7
What version(s) of DOSBox-X have this bug?
0.83.18 SDL2 64bit
Describe the bug
When booting the IBM casino games booter, after starting the game, DosBox-X immediately crashes after playing the first few notes of the title tune. I attached the game here. casino.zip
DosBox-X closes too fast to copy out the console log
Expected behavior
No response
Steps to reproduce the behaviour
boot casino.img
Used configuration
Emulator log
No response
Additional context
No response