Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up --- Bug Reports --- Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: pcem4crt - pcem mod for crt v17  (Read 834 times)

0 Members and 1 Guest are viewing this topic.

psakhis

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 174
  • Last login:April 11, 2021, 03:23:02 am
  • I want to build my own arcade controls!
pcem4crt - pcem mod for crt v17
« on: December 06, 2020, 09:37:33 pm »
Hi every one,

I patched this great PC emulator for my arcade cabinet and i'm very happy with it.

New features:
   - 320x200@60hz vga timmings (no more 320x200@70hz are needed, more smooth for crt purposes running without slowdowns at full 100%)
   - autoswitch resolutions in fullscreen (borderless / exclusive modes). I strongly recommend fullscreen exclusive mode

Future changes:
   - opengl suport for linux (now only direct3d)
 
Download Link: pcem4crt download file
GITHUB Link: https://github.com/psakhis/pcem4crt

Recommendations for automation:
   - Install software inside hdd vhd/img files (one for every different configuration 486, xms, pentium, ems, ...)
   - Configure different machines with these img files
   - Every autoexec.bat of this machines run a floppy a:\start.bat  (360kb img disk file)
   - Every floppy img starts a different software from hdd vhd/img file, configure this floppy img at start emulator.

Thanks for Authors:
 PCEM        https://pcem-emulator.co.uk/
 Switchres  @Calamity






« Last Edit: December 08, 2020, 11:06:00 am by psakhis »

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 593
  • Last login:Today at 05:53:58 am
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Re: pcem4crt - pcem mod for crt v17
« Reply #1 on: December 07, 2020, 01:59:46 pm »
Hey !

Patched with ? May I suggest you take a look at the switchres library that Calamity has exported from GM ? this would make it portable to Linux :)
GroovyMAME / GroovyArcade discord: https://discord.gg/YtQ6pJh
GroovyArcade doc: https://gitlab.com/groovyarcade/support/-/wikis/home

psakhis

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 174
  • Last login:April 11, 2021, 03:23:02 am
  • I want to build my own arcade controls!
Re: pcem4crt - pcem mod for crt v17
« Reply #2 on: December 07, 2020, 03:35:17 pm »
I used libswitchres, it's really easy with wrapper opening .dll/so. Really good @Calamity works  :applaud:

I needed to modify a lot of pcem src files because BITMAP variable caused conflicts window.h, i should prepare patch files for the future...

All modifications are portable to the linux but i don't have installed any for test. All the src files are included on download file.

Emulator works really really well, just incredible DOS games with CRT. :cheers:




Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 593
  • Last login:Today at 05:53:58 am
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Re: pcem4crt - pcem mod for crt v17
« Reply #3 on: December 07, 2020, 03:38:23 pm »
then give a link to the source and I'll see how linux behaves ;)
GroovyMAME / GroovyArcade discord: https://discord.gg/YtQ6pJh
GroovyArcade doc: https://gitlab.com/groovyarcade/support/-/wikis/home

psakhis

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 174
  • Last login:April 11, 2021, 03:23:02 am
  • I want to build my own arcade controls!
Re: pcem4crt - pcem mod for crt v17
« Reply #4 on: December 07, 2020, 03:44:04 pm »
I modified "wx-sdl2-display-win.c", i think "wx-sdl2-display.c" it's the same for linux version. You can see in "src folder" of 7z file.

I think there aren't more files affected for windows vs linux.
When i detected a resolution change i launch an even to SDL for switchres
Quote
if (event.window.event == SDL_WINDOWEVENT_MAXIMIZED) {                       
                         if (video_fullscreen_mode == 0) {    
                            if (vid_resize!=0) //patch
                              vid_resize=0;                               
                                pclog("Maximized Switchres %i x %i!!!\n", event.window.data1,event.window.data2);     
                                SetMenu(hwnd, menu);
                      SDL_SetWindowFullscreen(window, 0);
                      SDL_SetWindowSize(window, remembered_rect.w, remembered_rect.h);
                      SDL_SetWindowPosition(window, remembered_rect.x, remembered_rect.y);
                      SDL_WarpMouseGlobal(remembered_mouse_x, remembered_mouse_y);
                      device_force_redraw();                                                       
                                update_switchres(event.window.data1,event.window.data2);
                                window_doinputgrab = 1;                                
                                window_dofullscreen = 1;           
                         }   
                          if (video_fullscreen_mode != 0) {  //needs vid_resize = 1 or 2     
                             if (vid_resize==0) //patch
                              vid_resize=1;                                                                       
                             pclog("Exclusive Switchres %i x %i!!!\n", event.window.data1,event.window.data2);                                            
                                update_switchres(event.window.data1,event.window.data2);                               
                                display_resize(event.window.data1,event.window.data2);                                   
                                window_dofullscreen = 1;     
                               
                         }





Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 593
  • Last login:Today at 05:53:58 am
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Re: pcem4crt - pcem mod for crt v17
« Reply #5 on: December 12, 2020, 11:23:17 am »
Just saw your github repo. If you allow me to share my opinion : you shouldn't embed the switchres code. If there is any update (and there will), you won't benefite from them. Eventually use a github submodule.

But I understood you used the shared library + API, right ? You didn't instanciate a switchres_manager object ?

Anyway, you can make + make install switchres. On linux at least, it will put the required files at their good place, and even drop a pgk-config .pc file. So it's a good way to get things done easily
GroovyMAME / GroovyArcade discord: https://discord.gg/YtQ6pJh
GroovyArcade doc: https://gitlab.com/groovyarcade/support/-/wikis/home

psakhis

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 174
  • Last login:April 11, 2021, 03:23:02 am
  • I want to build my own arcade controls!
Re: pcem4crt - pcem mod for crt v17
« Reply #6 on: December 12, 2020, 01:26:02 pm »
I try to do that, i'm a github noob (15 years without programming xD).

Effectively i use API with wrapper, so only needs a .dll/.so switchres file.


..
+void svga_switchres_init() {
+const char* err_msg;
+
+   pclog("Switchres %s.\n", LIBSWR);
+
+   // Load the lib
+   dlp = OPENLIB(LIBSWR);
..



Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7102
  • Last login:April 13, 2021, 01:21:26 am
  • Quote me with care
Re: pcem4crt - pcem mod for crt v17
« Reply #7 on: December 18, 2020, 11:00:23 am »
Hi psakhis,

It's a very nice surprise that you've implemented libswitchres in this emulator, thank you!
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead or pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi