430VX and Win98/ME now crashes PCem

Support and general discussion.
Post Reply
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

430VX and Win98/ME now crashes PCem

Post by leilei »

Doesn't seem to matter what the CPU is, PCem crashes while booting Windows 98 and Windows Me. There's nothing in the log that shows more than a truncated "Create texture". I wish I had more info to give

Win95 and 2K are fine. I believe today's changes had regressed this since this config worked yesterday.

Here's a config where it happens. HDC contains a stock Win98SE installation without any updates/patches besides DX7 and 3dfxV2 drivers.

Code: Select all

midi = 3
gameblaster = 0
gus = 0
ssi2001 = 0
voodoo = 1
model = 430vx
cpu_manufacturer = 0
cpu = 11
cpu_use_dynarec = 1
cpu_waitstates = 0
gfxcard = mach64gx
video_speed = -1
sndcard = sbawe32
cpu_speed = 24
has_fpu = 1
disc_a = 
disc_b = 
hdd_controller = ide
mem_size = 131072
cdrom_drive = 71
cdrom_enabled = 1
cdrom_channel = 3
cdrom_path = 
hdc_sectors = 63
hdc_heads = 16
hdc_cylinders = 5000
hdc_fn = D:\vm\W98-8.img
hdd_sectors = 63
hdd_heads = 16
hdd_cylinders = 16383
hdd_fn = D:\vm\Games15.img
hde_sectors = 63
hde_heads = 16
hde_cylinders = 16383
hde_fn = D:\vm\Games16.img
hdf_sectors = 0
hdf_heads = 0
hdf_cylinders = 0
hdf_fn = 
drive_a_type = 5
drive_b_type = 0
bpb_disable = 0
joystick_type = 0
mouse_type = 2
enable_sync = 1
lpt1_device = none
vid_resize = 1
video_fullscreen_scale = 1
video_fullscreen_first = 1
zip_channel = -1
netcard = 

[3DFX Voodoo Graphics]
type = 2
framebuffer_memory = 4
texture_memory = 4
bilinear = 1
dacfilter = 1
render_threads = 2
sli = 0
recompiler = 1

[Sound Blaster AWE32]
addr = 544
emu_addr = 1568
onboard_ram = 8192
opl_emu = 1

[Joysticks]
joystick_0_nr = 0
joystick_1_nr = 0

[SDL2]
screenshot_format = png
screenshot_flash = 1
custom_width = 640
custom_height = 480
fullscreen = 0
fullscreen_mode = 0
scale = 1
scale_mode = 1
vsync = 0
focus_dim = 0
alternative_update_lock = 0
render_driver = direct3d
szadycbr
Posts: 295
Joined: Mon 21 Nov, 2016 6:23 pm

Re: 430VX and Win98/ME now crashes PCem

Post by szadycbr »

it also crashes trying to boot win98se cd rom.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: 430VX and Win98/ME now crashes PCem

Post by SarahWalker »

Doesn't seem to reproduce for me. I tried with both 98 and 98SE.

Could you try to narrow down which commit has caused the issue?
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 430VX and Win98/ME now crashes PCem

Post by leilei »

The FDC commit did it.

Disabling the onboard FDD in the award 430vx bios allows Win98 to boot without a crash, so maybe that's it

GCC 4.7.2 still used for compiling.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: 430VX and Win98/ME now crashes PCem

Post by SarahWalker »

Still can't reproduce this.

Does the emulator itself crash, or does Windows 98/ME crash?

Have you tried doing a clean build?

Can you attach the CMOS RAM file you're using?
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 430VX and Win98/ME now crashes PCem

Post by leilei »

Emulator crashes.

Yes i've done a clean build (deleted all .o files, no profiles etc)


I typically run make on this text file:

Code: Select all

-include makefile.mingw-wx-sdl2

CFLAGS = -O3 -march=i686 -fomit-frame-pointer -msse2 -mstackrealign -fno-strict-aliasing -std=gnu99 
LIBS = -mwindows -lopengl32 -lopenal32 -lstdc++ -lwxbase30ud -lwxmsw30ud_core -lwxmsw30ud_xrc -lmingw32 -lSDL2main -lSDL2  -mwindows  -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -static
-std=gnu99 is added for the Wx parts as i'm using an older GCC with slightly older libWx (which works well anyway)

and here's the NVR.
Attachments
ICRASH430vx.nvr
(128 Bytes) Downloaded 443 times
shermanp
Posts: 175
Joined: Sat 18 Feb, 2017 2:09 am

Re: 430VX and Win98/ME now crashes PCem

Post by shermanp »

Just tried compiling the latest commit and booted Win 98SE with no crashes.

I'm compiling in an MSYS2 environment.

Config as follows:

Code: Select all

midi = 1
gameblaster = 0
gus = 0
ssi2001 = 0
voodoo = 1
model = 430vx
cpu_manufacturer = 0
cpu = 10
cpu_use_dynarec = 1
cpu_waitstates = 0
gfxcard = mach64gx
video_speed = 5
sndcard = sb16
cpu_speed = 0
has_fpu = 0
disc_a = 
disc_b = 
hdd_controller = ide
mem_size = 131072
cdrom_drive = 0
cdrom_enabled = 1
cdrom_channel = -1
cdrom_path = D:\ISO\starwarsracer.iso
hdc_sectors = 63
hdc_heads = 16
hdc_cylinders = 16254
hdc_fn = C:\StandaloneProg\pcem\Images\Win98-PentiumMMX.img
hdd_sectors = 0
hdd_heads = 0
hdd_cylinders = 0
hdd_fn = 
hde_sectors = 0
hde_heads = 0
hde_cylinders = 0
hde_fn = 
hdf_sectors = 0
hdf_heads = 0
hdf_cylinders = 0
hdf_fn = 
drive_a_type = 5
drive_b_type = 0
bpb_disable = 0
joystick_type = 4
mouse_type = 3
enable_sync = 1
lpt1_device = none
vid_resize = 0
video_fullscreen_scale = 1
video_fullscreen_first = 1
netcard = 
zip_channel = 2

[Sound Blaster 16]
addr = 544
opl_emu = 1

[Joysticks]
joystick_0_nr = 1
joystick_1_nr = 0
joystick_2_nr = 0
joystick_3_nr = 0
joystick_0_axis_0 = 0
joystick_0_axis_1 = 1
joystick_0_axis_2 = 3
joystick_0_button_0 = 0
joystick_0_button_1 = 1
joystick_0_button_2 = 2
joystick_0_button_3 = 3
joystick_0_pov_0_x = -2147483648
joystick_0_pov_0_y = 1073741824

[SDL2]
screenshot_format = png
screenshot_flash = 1
custom_width = 640
custom_height = 480
fullscreen = 0
fullscreen_mode = 0
scale = 1
scale_mode = 1
vsync = 0
focus_dim = 0
alternative_update_lock = 0
render_driver = gl3

[GL3]
input_scale = 1.000000
input_stretch = 1
shader_refresh_rate = 0.000000

[GL3 Shaders]
shaders = 1
shader0 = C:\StandaloneProg\pcem\Shaders\llshader\monitor-crt-sxga99.glslp

[GL3 Shaders - crt-royale.cgp]
crt_gamma = 2.500000
lcd_gamma = 2.200000
levels_contrast = 1.000000
halation_weight = 0.000000
diffusion_weight = 0.075000
bloom_underestimate_levels = 0.800000
bloom_excess = 0.000000
beam_min_sigma = 0.020000
beam_max_sigma = 0.300000
beam_spot_power = 0.330000
beam_min_shape = 2.000000
beam_max_shape = 4.000000
beam_shape_power = 0.250000
beam_horiz_filter = 0.000000
beam_horiz_sigma = 0.350000
beam_horiz_linear_rgb_weight = 1.000000
convergence_offset_x_r = 0.000000
convergence_offset_x_g = 0.000000
convergence_offset_x_b = 0.000000
convergence_offset_y_r = 0.000000
convergence_offset_y_g = 0.000000
convergence_offset_y_b = 0.000000
mask_type = 1.000000
mask_sample_mode_desired = 0.000000
mask_specify_num_triads = 0.000000
mask_triad_size_desired = 3.000000
mask_num_triads_desired = 480.000000
aa_subpixel_r_offset_x_runtime = -0.333333
aa_subpixel_r_offset_y_runtime = 0.000000
aa_cubic_c = 0.500000
aa_gauss_sigma = 0.500000
geom_mode_runtime = 0.000000
geom_radius = 2.000000
geom_view_dist = 2.000000
geom_tilt_angle_x = 0.000000
geom_tilt_angle_y = 0.000000
geom_aspect_ratio_x = 432.000000
geom_aspect_ratio_y = 329.000000
geom_overscan_x = 1.000000
geom_overscan_y = 1.000000
border_size = 0.015000
border_darkness = 2.000000
border_compress = 2.500000
interlace_bff = 0.000000
interlace_1080i = 0.000000

[GL3 Shaders - monitor-crt-sxga99.glslp]
GAMMA_INPUT = 2.300000
RETRO_PIXEL_SIZE = 0.260000
GAMMA_OUTPUT = 1.000000
SHARPNESS_H = 0.600000
SHARPNESS_V = 0.850000
MASK_TYPE = 6.000000
MASK_STRENGTH_MIN = 0.060000
MASK_STRENGTH_MAX = 0.200000
MASK_SIZE = 1.000000
SCANLINE_STRENGTH_MIN = 0.100000
SCANLINE_STRENGTH_MAX = 0.450000
SCANLINE_BEAM_MIN = 0.600000
SCANLINE_BEAM_MAX = 2.000000
GEOM_CURVATURE = 0.000000
GEOM_WARP = 0.000000
GEOM_CORNER_SIZE = 0.000000
GEOM_CORNER_SMOOTH = 500.000000
INTERLACING_TOGGLE = 0.000000
HALATION = 0.030000
DIFFUSION = 0.120000
BRIGHTNESS = 1.050000

[3DFX Voodoo Graphics]
type = 2
framebuffer_memory = 4
texture_memory = 4
bilinear = 1
dacfilter = 0
render_threads = 2
sli = 0
recompiler = 1

User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: 430VX and Win98/ME now crashes PCem

Post by SarahWalker »

Does GDB point to anything helpful?

(Starting PCem through GDB hasn't worked for me since the new GUI got merged. If this also causes problems, try starting the emulator, then attaching GDB to it with --pid)
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 430VX and Win98/ME now crashes PCem

Post by leilei »

I've tried to make a debug build (though it seems to be failing to make the symbols) and attached gdb to its pid and I don't think it produces much useful info when it crashes at that point.

Code: Select all

[New Thread 4152.0x11a4]
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 4152.0xa7c]
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)

0x00000001 in ?? (warning: (Internal error: pc 0x1 in read in psymtab, but not i
n symtab.)

) at ../../include/wx/xrc/xmlreshandler.h:331
331     ../../include/wx/xrc/xmlreshandler.h: No such file or directory.
        in ../../include/wx/xrc/xmlreshandler.h
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)

(gdb) continue
Continuing.
warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)

Program received signal SIGSEGV, Segmentation fault.
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)
0x00000001 in ?? (warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)

) at ../../include/wx/xrc/xmlreshandler.h:331
331     in ../../include/wx/xrc/xmlreshandler.h
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)

(gdb) continue
Continuing.
warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)


Program exited with code 030000000005.
(gdb)
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: 430VX and Win98/ME now crashes PCem

Post by SarahWalker »

Does 'backtrace' give anything?
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 430VX and Win98/ME now crashes PCem

Post by leilei »

Code: Select all

) at ../../include/wx/xrc/xmlreshandler.h:331
#1  0x005435ad in ?? ()
#2  0x0054e234 in ?? ()
#3  0x0054c358 in ?? ()
#4  0x0055ca4a in ?? ()
#5  0x004270e2 in ?? ()
#6  0x00402082 in ?? ()
#7  0x0057143e in ?? ()
#8  0x00668ca1 in ?? ()
#9  0x6c7c3cf9 in SDL_LogCritical () from D:\PCemd\SDL2.dll
#10 0x00000000 in ?? ()
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)

(gdb)
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: 430VX and Win98/ME now crashes PCem

Post by SarahWalker »

That looks like a potentially useful backtrace; pity there aren't any symbols!

If you can't get a build with symbols, could you send me the binary that generated that backtrace? I may be able to figure out what's going on from that.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: 430VX and Win98/ME now crashes PCem

Post by SarahWalker »

Thanks for sending me the binary. I'm guessing though that it isn't the same build that you generated the above backtrace with, as none of the addresses match. Could you post a backtrace from the binary you've sent me?
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 430VX and Win98/ME now crashes PCem

Post by leilei »

With the large amounts of "warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)"'s omitted

Code: Select all

(gdb) backtrace
#0  0x00000001 in ?? (warning: (Internal error: pc 0x1 in read in psymtab, but n
ot in symtab.)

) at ../../include/wx/xrc/xmlreshandler.h:331

#1  0x00000002 in ?? (warning: (Internal error: pc 0x1 in read in psymtab, but n
ot in symtab.)

) at ../../include/wx/xrc/xmlreshandler.h:331
#2  0x00000001 in ?? (warning: (Internal error: pc 0x0 in read in psymtab, but n
ot in symtab.)

) at ../../include/wx/xrc/xmlreshandler.h:331

#3  0x00000000 in ?? ()
(gdb) continue
Continuing.
Program received signal SIGSEGV, Segmentation fault.

0x00000001 in ?? (warning: (Internal error: pc 0x1 in read in psymtab, but not i
n symtab.)

) at ../../include/wx/xrc/xmlreshandler.h:331
331     in ../../include/wx/xrc/xmlreshandler.h

(gdb) backtrace

#0  0x00000001 in ?? (warning: (Internal error: pc 0x1 in read in psymtab, but n
ot in symtab.)

) at ../../include/wx/xrc/xmlreshandler.h:331

#1  0x00000002 in ?? (warning: (Internal error: pc 0x1 in read in psymtab, but n
ot in symtab.)

) at ../../include/wx/xrc/xmlreshandler.h:331

#2  0x00000001 in ?? (warning: (Internal error: pc 0x0 in read in psymtab, but n
ot in symtab.)

) at ../../include/wx/xrc/xmlreshandler.h:331

#3  0x00000000 in ?? ()
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)

(gdb) continue
Continuing.
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)

Program exited with code 030000000005.
(gdb) backtrace
No stack.
(gdb)
Sorry about that earlier. I had to update to check out the timing stuff for the slower parts.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: 430VX and Win98/ME now crashes PCem

Post by SarahWalker »

That's no use I'm afraid - the stack appears to be totally corrupted :(

Do you still have the binary that generated the original backtrace?
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: 430VX and Win98/ME now crashes PCem

Post by SarahWalker »

Thanks for the most recent binary; getting somewhere now!

The crash is here :

Code: Select all

void disc_seek(int drive, int track)
{
        if (drives[drive].seek)
                drives[drive].seek(drive, track); <---------- This jumps to address 1
}
The code checks that drives[drive].seek is non-NULL before calling it, but it appears to contain 1 so the check doesn't work.

For a (hopefully) final test, could you make the following change :

Code: Select all

void disc_seek(int drive, int track)
{
+        pclog("disc_seek: drive=%i func=%p\n", drive, drives[drive].seek)
        if (drives[drive].seek)
                drives[drive].seek(drive, track);
as well as uncommenting the fflush() in pclog(), re-run, then post the last few lines of the log? Or the entire log if it isn't too big.
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 430VX and Win98/ME now crashes PCem

Post by leilei »

Code: Select all

onesec
New CD command 12 446892401
New CD command 5A 446965045
New CD command 5A 446985185
IS CDROM - ABORT
FIFO is now 01, threshold is 10
FIFO is now 01, threshold is 10
disc_seek: drive=3 func=00000000
disc_seek: drive=3 func=00000000
disc_seek: drive=3 func=00000000
disc_seek: drive=3 func=00000000
disc_seek: drive=3 func=00000000
disc_seek: drive=3 func=00000000
disc_seek: drive=3 func=00000000
disc_seek: drive=3 func=00000000
FIFO is now 01, threshold is 10
disc_seek: drive=1 func=00000000
disc_seek: drive=1 func=00000000
disc_seek: drive=1 func=00000000
disc_seek: drive=1 func=00000000
disc_seek: drive=1 func=00000000
disc_seek: drive=1 func=00000000
disc_seek: drive=1 func=00000000
disc_seek: drive=1 func=00000000
onesec
disc_seek: drive=1 func=00000000
disc_seek: drive=1 func=00000000
disc_seek: drive=1 func=00000000
disc_seek: drive=1 func=00000000
disc_seek: drive=1 func=00000000
disc_seek: drive=1 func=00000000
disc_seek: drive=1 func=00000000
disc_seek: drive=1 func=00000000
disc_seek: drive=1 func=00000000
FIFO is now 01, threshold is 10
disc_seek: drive=2 func=00000001
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: 430VX and Win98/ME now crashes PCem

Post by SarahWalker »

Okay, think I have this now. Try rev 1018.
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 430VX and Win98/ME now crashes PCem

Post by leilei »

The crash is gone now. However the Win98SE guest now has a hang during boot. There's a lot of

Code: Select all

FIFO is now 01, threshold is 10
onesec
in the log

Disabling the FDC also gets past this.
teppic
Posts: 53
Joined: Tue 20 Jun, 2017 12:31 pm

Re: 430VX and Win98/ME now crashes PCem

Post by teppic »

Seems the Red Hat problem has led to all sorts of issues. I hope it's exposed proper bugs rather than just been a pain!
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: 430VX and Win98/ME now crashes PCem

Post by SarahWalker »

leilei wrote: Sun 04 Feb, 2018 9:28 pm The crash is gone now. However the Win98SE guest now has a hang during boot. There's a lot of

Code: Select all

FIFO is now 01, threshold is 10
onesec
in the log

Disabling the FDC also gets past this.
Could you send me the NVR file you're using? I'm suspecting something may have got screwed up in the BIOS configuration telling Windows that there's more than 2 floppy drives.
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 430VX and Win98/ME now crashes PCem

Post by leilei »

Okay though i don't expect this to be different from the previous NVR file I posted. I only have the 3.25 on the bios and config and didn't set this Windows up on two floppy drives. (none of my configs use the default dual 2.88mb config/setup)
Attachments
ihang 430vx.nvr
(128 Bytes) Downloaded 302 times
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: 430VX and Win98/ME now crashes PCem

Post by JosepMa »

leilei wrote: Sun 04 Feb, 2018 8:03 pm

Code: Select all

onesec
New CD command 12 446892401
New CD command 5A 446965045
New CD command 5A 446985185
On a side note, I don't know if you have some reference for the ATAPI commands.
I could find this wiki on internet:
https://wiki.osdev.org/ATAPI

Code: Select all

INQUIRY 	0x12 
MODE SENSE (10) 	0x5A 
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: 430VX and Win98/ME now crashes PCem

Post by SarahWalker »

JosepMa wrote: Mon 05 Feb, 2018 7:28 pmOn a side note, I don't know if you have some reference for the ATAPI commands.
Numerous - the official ATA/ATAPI specs are freely available, and much more reliable than relying on a random wiki.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: 430VX and Win98/ME now crashes PCem

Post by SarahWalker »

I've finally been able to reproduce this! Fix in rev 1019.

For the record, what is happening is that an unidentified driver (possibly for a tape streamer?) is executing commands on a non-existent drive 3, and does not handle unexpected FDC behaviour very well.
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 430VX and Win98/ME now crashes PCem

Post by leilei »

:mrgreen: Can confirm it's fixed!
Post Reply