v15 & new recompiler update

Discussion of development and patch submission.
User avatar
SarahWalker
Site Admin
Posts: 1705
Joined: Thu 24 Apr, 2014 4:18 pm

Re: v15 & new recompiler update

Post by SarahWalker » Mon 01 Apr, 2019 8:07 pm

tk421 wrote:
Mon 01 Apr, 2019 6:59 pm
I am sure v15 will be a big success. I am not sure which kind of CPU speed I would need to run a K6-2 cpu, but that would be really interesting to know.
Lots. On an i7-7700k @ 4.4 GHz I can generally run most non-3dfx things at K6-2/300, but dips below that are not uncommon. A few select games/demos can run at 400-500 MHz, but those are exceptions to the general rule.

tk421
Posts: 51
Joined: Sat 18 Jun, 2016 6:57 am

Re: v15 & new recompiler update

Post by tk421 » Sat 06 Apr, 2019 8:23 pm

Thank you for your reply. This is good news indeed for PCem.

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

Re: v15 & new recompiler update

Post by SarahWalker » Wed 24 Apr, 2019 8:28 pm

New recompiler is in as of rev 1417. While there has been a lot of testing already done, there are bound to be issues here and there. Most stuff should be working though.

szadycbr
Posts: 287
Joined: Mon 21 Nov, 2016 6:23 pm

Re: v15 & new recompiler update

Post by szadycbr » Wed 24 Apr, 2019 9:58 pm

Hi Everyone, i get this error : codegen_x86-64.c:16:32: fatal error: codegen_ops_x86-64.h: No such file or directory . and yeah the codegen_ops_x86-64.h is missing, is it on my side? or it is missing everywhere ?

User avatar
leilei
Posts: 674
Joined: Fri 25 Apr, 2014 4:47 pm

Re: v15 & new recompiler update

Post by leilei » Wed 24 Apr, 2019 10:11 pm

The makefile does have an absolute path to a mingw install for Wx. other than that, it compiles fine (for gcc 4.7.2 win32 anyway)

jznomoney
Posts: 92
Joined: Sat 06 Dec, 2014 9:11 pm

Re: v15 & new recompiler update

Post by jznomoney » Wed 24 Apr, 2019 10:14 pm

I get this:
pcem-keyboard_pcjr.o:keyboard_pcjr.c:(.text+0x3fd): undefined reference to `cassette_set_motor'
pcem-keyboard_pcjr.o:keyboard_pcjr.c:(.text+0x561): undefined reference to `cassette_input'
pcem-keyboard_xt.o:keyboard_xt.c:(.text+0x37f): undefined reference to `cassette_set_motor'
pcem-keyboard_xt.o:keyboard_xt.c:(.text+0x4f6): undefined reference to `cassette_input'
pcem-model.o:model.c:(.text+0xcb): undefined reference to `cassette_device'
pcem-model.o:model.c:(.text+0x177): undefined reference to `cassette_device'
pcem-model.o:model.c:(.text+0x527): undefined reference to `cassette_device'
pcem-model.o:model.c:(.text+0xa27): undefined reference to `cassette_device'
pcem-model.o:model.c:(.text+0x152a): undefined reference to `acc2168_init'
pcem-model.o:model.c:(.text+0x1eb6): undefined reference to `i430hx_init'
pcem-model.o:model.c:(.text+0x1532): undefined reference to `acc3221_init'
pcem-wx-sdl2.o:wx-sdl2.c:(.text+0x20d8): undefined reference to `cassettefn'
pcem-wx-sdl2.o:wx-sdl2.c:(.text+0x20f5): undefined reference to `cassette_eject'
pcem-wx-sdl2.o:wx-sdl2.c:(.text+0x2101): undefined reference to `cassette_load'
pcem-wx-sdl2.o:wx-sdl2.c:(.text+0x21f1): undefined reference to `cassette_eject'
collect2.exe: error: ld returned 1 exit status
mingw32-make[1]: *** [Makefile:1122: pcem.exe] Error 1
mingw32-make[1]: Leaving directory 'C:/msys64/home/snap8/pcem/src'
mingw32-make: *** [Makefile:364: all-recursive] Error 1

szadycbr
Posts: 287
Joined: Mon 21 Nov, 2016 6:23 pm

Re: v15 & new recompiler update

Post by szadycbr » Wed 24 Apr, 2019 10:18 pm

Thanks leilei, and jznomoney , with normal procedure i get this also, exactely :(

shermanp
Posts: 121
Joined: Sat 18 Feb, 2017 2:09 am

Re: v15 & new recompiler update

Post by shermanp » Wed 24 Apr, 2019 10:19 pm

leilei wrote:
Wed 24 Apr, 2019 10:11 pm
The makefile does have an absolute path to a mingw install for Wx. other than that, it compiles fine (for gcc 4.7.2 win32 anyway)
It always has. Thankfully you can override make variables on the command line, so I've got a batch file that points to the location of my WX install.

I started to try and make a fancy pants all-in-one cross platform Makefile, but have put it to one side in favour of finishing my VHD work. I've had real difficulty figuring out how to automatically locate WX on Windows, and I'm not even sure it's possible. Unlike Linux, you can't just call wx-config and call it a day. Unless you're using MSYS2 of course.

shermanp
Posts: 121
Joined: Sat 18 Feb, 2017 2:09 am

Re: v15 & new recompiler update

Post by shermanp » Wed 24 Apr, 2019 10:22 pm

BTW, compiled for me fine on MinGW-w64 with GCC 7.2

It looks like Sarah added some makefile fixes not too long ago at commit 51e4eb5, is that the problem?

jznomoney
Posts: 92
Joined: Sat 06 Dec, 2014 9:11 pm

Re: v15 & new recompiler update

Post by jznomoney » Wed 24 Apr, 2019 10:25 pm

I have the makefile fixes commit. I deleted the whole folder and pulled it again and still doesn't work.

szadycbr
Posts: 287
Joined: Mon 21 Nov, 2016 6:23 pm

Re: v15 & new recompiler update

Post by szadycbr » Wed 24 Apr, 2019 10:29 pm

Ps. leilei , my gcc is 4.6.3 from debian stretch repos, is it not good enough?
EDIT: also with enable release i get this : .o `test -f 'codegen.c' || echo './'`codegen.c
mv -f .deps/pcem-codegen.Tpo .deps/pcem-codegen.Po
make[1]: *** No rule to make target 'codegen_backend.c', needed by 'pcem-codegen_backend.o'. Stop. :( and codegen_backend.c is missing :(

User avatar
leilei
Posts: 674
Joined: Fri 25 Apr, 2014 4:47 pm

Re: v15 & new recompiler update

Post by leilei » Wed 24 Apr, 2019 10:40 pm

Those makefiles probably weren't updated as codegen_backend.c is now codegen_block.c

jznomoney
Posts: 92
Joined: Sat 06 Dec, 2014 9:11 pm

Re: v15 & new recompiler update

Post by jznomoney » Wed 24 Apr, 2019 10:43 pm

I figured out my issues. In the src folder in Makefile.am I was missing cassette.c acc2168.c i430hx.c and acc3221.c under pcem_SOURCES =

darksabre76
Posts: 60
Joined: Tue 12 Sep, 2017 4:33 am
Location: Seattle, WA, USA
Contact:

Re: v15 & new recompiler update

Post by darksabre76 » Wed 24 Apr, 2019 11:43 pm

Here's an updated Makefile.am for those who use it (I have it split weirdly because I was tracking down missing files).
Attachments
Makefile.am.7z
(2.42 KiB) Downloaded 47 times

darksabre76
Posts: 60
Joined: Tue 12 Sep, 2017 4:33 am
Location: Seattle, WA, USA
Contact:

Re: v15 & new recompiler update

Post by darksabre76 » Thu 25 Apr, 2019 12:42 am

After this newest stuff, my crappy computer can idle in Win98 at 90% instead of the 50-60% that it was pulling before. LEGO Island also runs at >85%, before it would stutter and sputter along around 50% or less. Kudos :)

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

Re: v15 & new recompiler update

Post by SarahWalker » Thu 25 Apr, 2019 7:18 am

Makefile.am fixed in rev 1418. Sorry about that, it got broken at some point when merging the regular and dev branches together.

gladstone
Posts: 14
Joined: Wed 19 Jul, 2017 11:44 am

Re: v15 & new recompiler update

Post by gladstone » Thu 25 Apr, 2019 4:25 pm

Hello! Many thanks SarahWalker

I can run PCem under Chromebook (aarch64) with Crostini.
Some bugs with gui and gtk-errors. I tried MS-DOS and Keyboard works :)

szadycbr
Posts: 287
Joined: Mon 21 Nov, 2016 6:23 pm

Re: v15 & new recompiler update

Post by szadycbr » Thu 25 Apr, 2019 5:17 pm

hey , gladstone , what compiling tools and what version do you have on this chromebook? did you try 430vx board?
EDIT: do you have intel cpu i your chromebook? the chromebook debian 9 version must be bit different. but chrome was talking about it being ready for developers. but your is probably arm64 cpu.

User avatar
leilei
Posts: 674
Joined: Fri 25 Apr, 2014 4:47 pm

Re: v15 & new recompiler update

Post by leilei » Thu 25 Apr, 2019 7:36 pm

It does work on a Pi3b at least. I can 100% a 486SX16 on most things but there's a big VC4 video output bottleneck in Raspbian...

darksabre76
Posts: 60
Joined: Tue 12 Sep, 2017 4:33 am
Location: Seattle, WA, USA
Contact:

Re: v15 & new recompiler update

Post by darksabre76 » Thu 25 Apr, 2019 9:29 pm

It's great to see the individual makefiles going away as the Automake script gets better and better :) Less things to worry about updating everytime.

sards3
Posts: 3
Joined: Tue 02 Apr, 2019 7:55 pm

Re: v15 & new recompiler update

Post by sards3 » Thu 25 Apr, 2019 11:01 pm

Great news. Sarah, I don't know if you have the time or inclination to do this, but I would be interested in reading a technical writeup about the new recompiler (high level design, how it differs from the old one, any interesting features, etc.)

gladstone
Posts: 14
Joined: Wed 19 Jul, 2017 11:44 am

Re: v15 & new recompiler update

Post by gladstone » Fri 26 Apr, 2019 6:05 am

leilei wrote:
Thu 25 Apr, 2019 7:36 pm
It does work on a Pi3b at least. I can 100% a 486SX16 on most things but there's a big VC4 video output bottleneck in Raspbian...
Did you try with the opengl driver (raspi-config)?

gladstone
Posts: 14
Joined: Wed 19 Jul, 2017 11:44 am

Re: v15 & new recompiler update

Post by gladstone » Fri 26 Apr, 2019 6:10 am

szadycbr wrote:
Thu 25 Apr, 2019 5:17 pm
hey , gladstone , what compiling tools and what version do you have on this chromebook? did you try 430vx board?
EDIT: do you have intel cpu i your chromebook? the chromebook debian 9 version must be bit different. but chrome was talking about it being ready for developers. but your is probably arm64 cpu.
Hi yes 430vx but it's slow :). I'm on a lenovo S330 it's arm based. I think crostini is debian 9 default. I'm running the default in stable channel.
I did install some pre req like build-essential, automake, libwxwidget, libsdl2 and some other. Then do hg clone | automake | configure | make.

szadycbr
Posts: 287
Joined: Mon 21 Nov, 2016 6:23 pm

Re: v15 & new recompiler update

Post by szadycbr » Fri 26 Apr, 2019 7:03 am

Hey gladstone, it is all different than x86_64 cpu, i thought your compiling procedure could help, but no :( anyway, it is fascinating that PCem runs on this cpu, you got better phones this days, so i guess year or two and we should see somehow Android port! thanks, and take care :)

jznomoney
Posts: 92
Joined: Sat 06 Dec, 2014 9:11 pm

Re: v15 & new recompiler update

Post by jznomoney » Fri 26 Apr, 2019 7:52 pm

I am having issues with the 486 Packard Bell PB410A and the new dynamic recompiler.
I can't get windows 95 to install properly. I get through the first part of the install of 95 but once it reboots to the second part of the install I get a windows protection error. If I disable the dynamic recompiler it works fine. Also when booting with an msdos 6.22 boot disk emm386 also locks the machine.

I have attached my config

I also tried this with other 486 systems and they work fine with the dynamic recompiler.
Attachments
tester.cfg
(1.49 KiB) Downloaded 39 times

User avatar
leilei
Posts: 674
Joined: Fri 25 Apr, 2014 4:47 pm

Re: v15 & new recompiler update

Post by leilei » Fri 26 Apr, 2019 10:12 pm

gladstone wrote:
Fri 26 Apr, 2019 6:05 am
leilei wrote:
Thu 25 Apr, 2019 7:36 pm
It does work on a Pi3b at least. I can 100% a 486SX16 on most things but there's a big VC4 video output bottleneck in Raspbian...
Did you try with the opengl driver (raspi-config)?
yeah, not without a big thermometer icon appearing though. :(

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

Re: v15 & new recompiler update

Post by SarahWalker » Sat 27 Apr, 2019 5:33 pm

jznomoney wrote:
Fri 26 Apr, 2019 7:52 pm
I am having issues with the 486 Packard Bell PB410A and the new dynamic recompiler.
I can't get windows 95 to install properly. I get through the first part of the install of 95 but once it reboots to the second part of the install I get a windows protection error. If I disable the dynamic recompiler it works fine. Also when booting with an msdos 6.22 boot disk emm386 also locks the machine.

I have attached my config

I also tried this with other 486 systems and they work fine with the dynamic recompiler.
Windows 95 install fixed in rev 1429. I did see some video bugs though, so there's been a regression since I last tried it.

szadycbr
Posts: 287
Joined: Mon 21 Nov, 2016 6:23 pm

Re: v15 & new recompiler update

Post by szadycbr » Sat 27 Apr, 2019 7:51 pm

i managed to compile it on vbox in 32bit linux and it compiles fine. i had again same errors trying to run cpu with recompiler, but i took this 32bit build and run it on 64bit os, and it feels amazing, it does strangely go from 100 to 80 constantly every half second, dont know why all these problems appear. have anyone else compiled it on 64bit linux?

PS. i remember when i run nfs3 using voodoo2 and p100 it did go kinda choppy, now at the same config it is way smoother :) Thank You all for this, it is getting better and better. and yeah, although i have problems running it, it is much faster! :)

EluanCM
Posts: 70
Joined: Tue 27 Oct, 2015 2:07 pm
Location: Brazil
Contact:

Re: v15 & new recompiler update

Post by EluanCM » Sat 27 Apr, 2019 7:53 pm

Under x86-64 Linux, this configuration segfaults the new recompiler when installing Windows 98 (First edition) right after scandisk, no backtrace since the code is recompiled.

Code: Select all

gameblaster = 0
gus = 0
ssi2001 = 0
voodoo = 1
model = fic_va503p
cpu_manufacturer = 1
cpu = 9
cpu_use_dynarec = 1
cpu_waitstates = 0
gfxcard = mach64gx
video_speed = 5
sndcard = sbawe32
cpu_speed = 28
disc_a = 
disc_b = 
hdd_controller = ide
mem_size = 196608
cdrom_drive = 0
cdrom_channel = 3
cdrom_path = 
zip_channel = -1
hdc_sectors = 63
hdc_heads = 15
hdc_cylinders = 8306
hdc_fn = /home/eluancm/PCem/hdd_4gb_c8306_h15_s63_win98.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 = 
hdg_sectors = 0
hdg_heads = 0
hdg_cylinders = 0
hdg_fn = 
hdh_sectors = 0
hdh_heads = 0
hdh_cylinders = 0
hdh_fn = 
hdi_sectors = 0
hdi_heads = 0
hdi_cylinders = 0
hdi_fn = 
drive_a_type = 5
drive_b_type = 0
bpb_disable = 0
cd_speed = 24
joystick_type = 0
mouse_type = 3
enable_sync = 1
netcard = rtl8029as
lpt1_device = none
vid_resize = 0
video_fullscreen_scale = 0
video_fullscreen_first = 1

[ATI Mach64GX]
memory = 2

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

[Sound Blaster AWE32]
addr = 544
emu_addr = 1568
onboard_ram = 512
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 = auto

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

[GL3 Shaders]
shaders = 0
(Also the CPU speed is detected wrong.)

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

Re: v15 & new recompiler update

Post by SarahWalker » Sun 28 Apr, 2019 9:05 am

SarahWalker wrote:
Sat 27 Apr, 2019 5:33 pm
jznomoney wrote:
Fri 26 Apr, 2019 7:52 pm
I am having issues with the 486 Packard Bell PB410A and the new dynamic recompiler.
I can't get windows 95 to install properly. I get through the first part of the install of 95 but once it reboots to the second part of the install I get a windows protection error. If I disable the dynamic recompiler it works fine. Also when booting with an msdos 6.22 boot disk emm386 also locks the machine.

I have attached my config

I also tried this with other 486 systems and they work fine with the dynamic recompiler.
Windows 95 install fixed in rev 1429. I did see some video bugs though, so there's been a regression since I last tried it.
Rev 1430 fixes the graphics issues.

Post Reply