Supermodel is now on GitHub

Discuss Supermodel and your favorite Model 3 games. Show off your latest threads, this is the place to see and be seen.
Forum rules
Keep it classy!

  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!

Re: Supermodel is now on GitHub

Postby k_rollo » Wed Aug 17, 2022 6:03 pm

Hi Bart,
Noticed there seems to be 2 different commits on the same build date:
Screenshot_1.jpg
Screenshot_1.jpg (71.46 KiB) Viewed 468 times

Do we assume the datestamp (2022-08-16) is still the latest?
k_rollo
 
Posts: 75
Joined: Sun Jul 03, 2022 8:15 pm

Re: Supermodel is now on GitHub

Postby zuppa_di_pesce » Mon Sep 12, 2022 11:29 pm

k_rollo wrote:Took the latest devbuild and forgot every package has its own Supermodel.ini. Forgot to back up mine and overwrote it. Have to re-do my custom controller mappings. :cry:

EDIT: Is it possible not to include the Supermodel.ini in the next builds since it generates anyway on -config-inputs iirc? This makes it easier to overwrite everything else every update.

Better could be rename it to Supermodel.default.
And adding instructions to rename it into Supermodel.ini to effectively use it.
But why don't you simply overwrite the EXE and Games.xml only? ;)
"Did you surfcast that fish?" - "Kinda... But... That wasn't a fish... It was a GNU!"
User avatar
zuppa_di_pesce
 
Posts: 120
Joined: Fri Jun 12, 2020 1:51 pm
Location: surfCASTING on a beach

Re: Supermodel is now on GitHub

Postby Bart » Mon Sep 19, 2022 10:40 am

k_rollo wrote:Hi Bart,
Noticed there seems to be 2 different commits on the same build date:
Screenshot_1.jpg

Do we assume the datestamp (2022-08-16) is still the latest?


Yes, the top one is the most recent. The dates are not chronological because a pull request (a contributor's changes) was merged, and some of those commits may have been performed at an earlier date.

Here is the recent git commit history. The most recent commits are on top. Note the dates:

Code: Select all
* 0eef09b  (HEAD -> master, origin/master, origin/HEAD) (2022-08-08 09:18:59) toxieainc Revert "port some changes from MAME/MESS"
* d7041a8  (2022-07-23 00:18:02) toxieainc fix missing version GLSL compiler warnings on startup
* 7052e83  (2022-07-18 22:45:23) toxieainc port some changes from MAME/MESS
* a60f998  (2022-08-08 09:18:59) toxieainc Revert "port some changes from MAME/MESS"
* 6c24bf7  (2022-07-23 00:05:54) toxieainc Optimize quad rendering by replacing the double computations for the area computation with the equivalent shoelace algorithm along with kahans algorithm to compute the cross products. In addition pull out the /w to the end, which increases precision even more.
* d919f38  (2022-07-18 22:45:23) toxieainc port some changes from MAME/MESS
* dda6d4c  (2022-08-16 18:33:33) Bart Trzynadlowski Added some options to default Supermodel.ini that otherwise are not documented anywhere because README.txt is out of date
* e06788e  (2022-08-14 11:10:13) ToBul Fix SUPERMODEL_DEBUGGER build. - Ian
* d4633a8  (2022-08-08 09:18:59) toxieainc Revert "port some changes from MAME/MESS"
* 03002d3  (2022-07-18 22:45:23) toxieainc port some changes from MAME/MESS
* 2df681f  (2022-07-18 22:41:36) toxieainc equivalent optimizations, NFC
* cb9d73c  (2022-07-18 22:26:11) toxieainc port some (simple) changes from MAME/MESS
*   d60feab  (2022-07-18 13:00:27) trzy Merge pull request #1 from toxieainc/master
|\
| *   7b87908  (2022-07-18 21:53:49) toxie Merge branch 'trzy:master' into master
| |\
| |/
|/|
* |   bd4399b  (2022-07-16 21:01:44) trzy Merge pull request #2 from ToBul/master
|\ \
| * | e1e61c4  (2022-07-12 10:45:39) Tony Bulmer Games.xml: Align ROM names with MAME.
|/ /
| * 27e071d  (2022-07-18 21:43:13) toxieainc add comment
| * dda48d7  (2022-07-17 20:29:25) toxieainc address review
| * 24173a2  (2022-07-17 20:25:51) toxieainc revert "" -> std::string()
| * c42a2d8  (2022-07-17 20:23:11) toxieainc check for __GNUC__ instead of just assuming it
| * abb1273  (2022-07-11 18:49:02) toxieainc slightly optimize DrawTileLine (less branches/logic)
| * b98be0c  (2022-07-11 18:47:13) toxieainc optimize ReadRegister, as localtime (at least on MSVC/Windows) is significantly showing up in profiling
| * ba7145d  (2022-07-11 18:42:15) toxieainc use intrinsics for endian swap
| * b2b8396  (2022-07-11 18:27:44) toxieainc missed 2 changed files with last commit
| * 4961951  (2022-07-11 18:10:41) toxieainc fix a real error (m68kdasm) and some harmless performance warnings and use modern headers
| * e0053b3  (2022-07-11 17:43:59) toxieainc fix some real errors (Model3,InputSystem), minor errors (SCSP,SDL/Main) and some performance warnings
|/
* 46eff8c  (2022-06-23 14:06:07) Bart Trzynadlowski supermodel_build_bot.py: New build bot script for GitHub
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: Supermodel is now on GitHub

Postby k_rollo » Thu Sep 22, 2022 7:54 am

Bart wrote:The dates are not chronological because a pull request (a contributor's changes) was merged, and some of those commits may have been performed at an earlier date.

Makes sense. Thanks Bart.
k_rollo
 
Posts: 75
Joined: Sun Jul 03, 2022 8:15 pm

Re: Supermodel is now on GitHub

Postby k_rollo » Thu Sep 22, 2022 8:00 am

zuppa_di_pesce wrote:But why don't you simply overwrite the EXE and Games.xml only? ;)

That was the intent, but forgot the release always came with Supermodel.ini and that caused the accidental overwrite. :) Normally, emulators like Flycast or PCSX2 just ship with the executables/binaries. Files that are generated on execution like config files are not included so a drag-n-drop update doesn't overwrite any existing config.
k_rollo
 
Posts: 75
Joined: Sun Jul 03, 2022 8:15 pm

Re: Supermodel is now on GitHub

Postby rokfpoewrkcpoqwkcp » Mon Dec 26, 2022 1:07 pm

Observations about building in GitHub actions. (From a non dev. Apologies for the long post.)

If you put the build instructions for Mac, Win and Linux into 3 different yml action files, only Linux currently works on GitHub.
Win and Mac complain about "SDL not found" or "Framework not found".

The reason seems to be the makefiles.
Linux makefile finds its SDL2 install dynamically with,
Code: Select all
SDL2_CFLAGS = $(shell sdl2-config --cflags)
SDL2_LIBS = $(shell sdl2-config --libs)

Win makefile uses a path,
Code: Select all
SDL2_INCLUDE_DIR = \msys64\mingw64\include\SDL2
SDL2_LIB_DIR = \msys64\mingw64\lib

The Win path fails as it can't resolve on GitHub.
As soon as you realise the GitHub "Runners" are nothing like VMs, and are not trying to emulate a desktop environment at all, it makes sense.
'Runners' are just glorified shells grinding through jobs as efficiently as possible, so normal paths just won't work.

Problem is, you can't use 'sdl2-config --libs' on Windows as the resulting '-mwindows' means you lose the terminal.
But you can use something like,
Code: Select all
SDL2_INCLUDE_DIR = $(shell sdl2-config --prefix)"/include/SDL2"
SDL2_LIB_DIR = $(shell sdl2-config --prefix)"/lib"
and it will work. (Is there a better way than this?)

Getting Mac to build is easy enough if you use brew. I have never used a Mac, but from what I can see, brew is to Mac what MSYS is to Windows.
It's just giving you a Linux style environment and packages. This means if you have built with Linux or MSYS, you already know what the header and lib paths have to be.
With that in mind, you can create a Mac makefile similar to the Windows one, also finding the SDL2 install dynamically.
You will need to change the Framework lib names to their standard lib names.
Code: Select all
-framework SDL2        simply becomes      -lSDL2
-framework SDL2_net    simply becomes      -lSDL2_net

Also, you will need to remove '-DSUPERMODEL_OSX' from 'PLATFORM_CXXFLAGS' to avoid getting derailed by the '#ifdef SUPERMODEL_OSX' macro in Src\OSD\SDL\SDLIncludes.h
You will need to dodge that macro as you are no longer using the SDL2 Frameworks which have a different directory structure.

Here's a repo with all 3 building...

https://github.com/ToBul/Supermodel/commits/workflows

Btw, these yml scripts only build Supermodel. 'Artifacts' appear in the respective Actions workflow summary. Posting a 'Release' will need an extra step that I've not even played with.
I actually fear a world where everyone is posting their own releases, so I'm reluctant to go any further.


Thoughts:
GitHub doesn't currently have a Mac M1 runner, but could it be possible to use the normal Mac runner and create a cross build?
If brew is like MSYS, you should be able to install the ARM packages, change the paths, libs and override the ARCH flag to create the right tool chain?
We need some Mac users to try it and see if it's possible. Please post you're results here if you have any luck.
Last edited by rokfpoewrkcpoqwkcp on Sat Sep 23, 2023 3:36 pm, edited 2 times in total.
rokfpoewrkcpoqwkcp
 
Posts: 119
Joined: Mon Nov 18, 2019 3:40 pm

Re: Supermodel is now on GitHub

Postby Joaquim Gonçalves » Tue Dec 27, 2022 8:50 am

k_rollo wrote:Hi Bart,
Noticed there seems to be 2 different commits on the same build date:
Screenshot_1.jpg

Do we assume the datestamp (2022-08-16) is still the latest?


I found the solution, if you see next time 2 versions with the same date, download both of them and check the .exe date. The one is recent it's the latest one. :)
User avatar
Joaquim Gonçalves
 
Posts: 680
Joined: Wed Dec 10, 2014 5:12 pm
Location: Portugal

Re: Supermodel is now on GitHub

Postby Bart » Wed Dec 28, 2022 7:26 pm

rokfpoewrkcpoqwkcp wrote:Observations about building in GitHub actions. (From a non dev. Apologies for the long post.)

If you put the build instructions for Mac, Win and Linux into 3 different yml action files, only Linux currently works on GitHub.
Win and Mac complain about "SDL not found" or "Framework not found".

The reason seems to be the makefiles.
Linux makefile finds its SDL2 install dynamically with,
Code: Select all
SDL2_CFLAGS = $(shell sdl2-config --cflags)
SDL2_LIBS = $(shell sdl2-config --libs)

Win makefile uses a path,
Code: Select all
SDL2_INCLUDE_DIR = \msys64\mingw64\include\SDL2
SDL2_LIB_DIR = \msys64\mingw64\lib

The Win path fails as it can't resolve on GitHub.
As soon as you realise the GitHub "Runners" are nothing like VMs, and are not trying to emulate a desktop environment at all, it makes sense.
'Runners' are just glorified shells grinding through jobs as efficiently as possible, so normal paths just won't work.

Problem is, you can't use 'sdl2-config --libs' on Windows as the resulting '-mwindows' means you lose the terminal.
But you can use something like,
Code: Select all
SDL2_INCLUDE_DIR = $(shell sdl2-config --prefix)"/include/SDL2"
SDL2_LIB_DIR = $(shell sdl2-config --prefix)"/lib"
and it will work. (Is there a better way than this?)

Getting Mac to build is easy enough if you use brew. I have never used a Mac, but from what I can see, brew is to Mac what MSYS is to Windows.
It's just giving you a Linux style environment and packages. This means if you have built with Linux or MSYS, you already know what the header and lib paths have to be.
With that in mind, you can create a Mac makefile similar to the Windows one, also finding the SDL2 install dynamically.
You will need to change the Framework lib names to their standard lib names.
Code: Select all
-framework SDL2        simply becomes      -lSDL2
-framework SDL2_net    simply becomes      -lSDL2_net

Also, you will need to remove '-DSUPERMODEL_OSX' from 'PLATFORM_CXXFLAGS' to avoid getting derailed by the '#ifdef SUPERMODEL_OSX' macro in Src\OSD\SDL\SDLIncludes.h
You will need to dodge that macro as you are no longer using the SDL2 Frameworks which have a different directory structure.

Here's a repo with all 3 building...

https://github.com/ToBul/Supermodel/commits/workflows

Btw, these yml scripts only build Supermodel. 'Artifacts' appear in the respective Actions workflow summary. Posting a 'Release' will need an extra step that I've not even played with.
I actually fear a world where everyone is posting their own releases, so I'm reluctant to go any further.


Thoughts:
GitHub doesn't currently have a Mac M1 runner, but could it be possible to use the normal Mac runner and create a cross build?
If brew is like MSYS, you should be able to install the ARM packages, change the paths, libs and override the ARCH flag to create the right tool chain?
We need some Mac users to try it and see if it's possible. Please post you're results here if you have any luck.


What sort of environment do Github actions work in? Do we have to pull in SDL each time? There is an outstanding PR that is having issues with the Windows build right now.
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: Supermodel is now on GitHub

Postby rokfpoewrkcpoqwkcp » Thu Dec 29, 2022 8:07 am

Bart wrote:What sort of environment do Github actions work in? Do we have to pull in SDL each time?

Yes. It may take a few seconds to allocates you a 'runner'. It initiates, runs your job, then closes and destroys.
The "Artifacts" it creates last 90 days max in public repos. You can shorten this time with "retention-days" in the yml file.

Bart wrote:There is an outstanding PR that is having issues with the Windows build right now.

That's why I made this post now. I got Supermodel building in GitHub a while back. A few of us had been having trouble with this, me included.
If I was some sort of dev and confident in what I was doing was correct, then I would of made my own PR.
Hopefully what I have found just nudges us further down the road a bit and saves a bit of time.


PS
Other things to note about GitHub Actions:

The non paid runners aren't that fast.

Writing yml files is a pain in the butt. The whole indentation and syntax thing is super fussy.

You only get 2000 free minutes of build time a month, but there's a kicker....
1 min of Ubuntu counts as 1 min
1 min of Win counts as 2 min
1 min of Mac counts as 10 min
So you'll get through your build time quicker than you think.
You're remaining time shows up under "Billing and plans" in your GitHub account settings.

The Ubuntu Runner builds Supermodel fastest. So experiment and practice with Ubuntu to save time and minutes.

EDIT:
Just to clarify, anyone logged in to their GitHub account can download an '"Artifact" from a successful build on a public repo.
It's actually a good way of getting an early MAME build before they post an official 'release'.
rokfpoewrkcpoqwkcp
 
Posts: 119
Joined: Mon Nov 18, 2019 3:40 pm

Re: Supermodel is now on GitHub

Postby Jiterdomer » Sun Feb 05, 2023 7:20 pm

LA Machineguns slows down the game when there's a lot of explosions going on.
Feel the heartbeat of my machine through this tight seat. I feel every motion of my machine
Image
User avatar
Jiterdomer
 
Posts: 627
Joined: Mon Sep 26, 2011 6:37 pm
Location: Los Angeles, California

PreviousNext

Return to The Catwalk

Who is online

Users browsing this forum: No registered users and 0 guests

cron