RISC OS Open
Safeguarding the past, present and future of RISC OS for everyone
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account
Forums → General →

Hardware accelerated games/programs using Khronos

Subscribe to Hardware accelerated games/programs using Khronos 31 posts, 14 voices

Posts per page:

Pages: 1 2

 
Sep 10, 2016 5:16pm
Avatar Chris Gransden (337) 1105 posts

There’s a test version of the DarkPlaces Quake 1 engine available here. It’s an enhanced version of the original Quake 1 engine.
See here for more information.

You’ll need to source your own PAK files. The freely available shareware version is available from here. First create an ‘id1’ folder in the !DarkPlaces folder and drop the ‘PAK0.PAK’ into this.

It is only compatible with the Raspberry Pi due to using the GPU for hardware accleration. It’s been tested on a RPi zero (averages 20fps for the ‘demo1’ benchmark @1920x1080) and RPi 3 (averages 53 fps).
It runs full screen only as RISC OS has no knowledge of Open GL surfaces. I believe hardware overlay support is needed in RISC OS for use in the desktop.

It uses hardware accelerated graphics so you’ll also need khronos.
Just merge the !Boot and !System folders. It contains the Khronos module and the neccessary shared libraries.
The SDL2 libraries use the OpenGLES back end. Currently Khronos supports OpenVG and OpenGLES 1 and 2.

It’s only been tested with the shareware PAK file. See the !Help file for use with other mods.
Muliplayer is also untested.

There are a few issues to be aware of.
VSync doesn’t work so you may experience flickering/tearing.
Pressing multiple keys together causes the key press to be ignored. Let go of one of the other keys first.
The ‘Escape’ key always exits the program even if it’s bound to another action.

To toggle the menu press ‘F7’. The settings are saved in !Boot.Choices.darkplaces.
‘gpu_mem’ in ‘config.txt’ needs to set to at least 128. (gpu_mem=128)
It’s recommended to use the latest Raspberry Pi firmware and RISC OS rom.

Look out for further games/programs on Raspberry Pi on RISC OS using Khronos.

 
Sep 10, 2016 9:10pm
Avatar Chris Mahoney (1684) 2030 posts

Well done! Quake now runs faster – and at a higher resolution – under RISC OS on a Pi 1 than it does under DOSBox on a 3.3 GHz Intel i5.

 
Sep 11, 2016 2:29am
Avatar Chris Mahoney (1684) 2030 posts

quake 3

Is this available somewhere or are you just seeing what you want to see instead of what the thread actually says? :)

 
Sep 19, 2016 9:18am
Avatar SeñorNueces (1438) 160 posts

What the..? This is INCREDIBLE!! SDL2 using the GLES renderer on Risc OS on the Pi!
The potential of this is huge: Current ScummVM, RetroArch/LibRetro (thinking about all these cores working on Risc OS makes my head explode), and a loooong etc.
Is vsync doable? It will be needed for RetroArch/LibRetro at least as audio/video sync relies heavily on proper vsync.

 
Dec 14, 2016 3:24pm
Avatar Chris Gransden (337) 1105 posts

Some progress to report.

RetroArch is now working. There are about 30 cores running. Some run too slowly to be useful. (PS One, 3do, Atari Jaguar and Sega Saturn).
Others need at least a RPI 3 to run fast enough. It’s quite tricky configuring the correct the keyboard controls. There’s no Joystick support on RISC OS. Also pressing multiple keys together has problems. VSync is not working so there is noticable screen tearing.

If anyone would like to try it and possibly help with the keyboard configuration I can make a version available for download.

Quake 3 is working to a degree. On a RPI3 the directional controls stop responding after a few seconds. Seems OK on a RPi 2. A bit juddery at 1080p but OK at lower resolutions.

Also Neverputt and Neverball. (Quake 3, Neverputt and Neverball ported by Lee Noar).

They all run in full screen only in the current RISC OS resolution. If using the latest RISC OS rom that allows native screen mode changes it’s much easier to change resolution if it runs too slow.

It’s also possible to develop native applications on RISC OS using GCC that use Khronos with SDL2 and GLES. I’ll upload an example (spinning triangle) makefile and source. Plus all the necessary libraries.

 
Dec 14, 2016 3:45pm
Avatar Jeffrey Lee (213) 6028 posts

Sounds great – nice work!

 
Dec 14, 2016 10:57pm
Avatar Chris Gransden (337) 1105 posts

Neverball/Neverputt are available to download from here. By default Neverball is run. Change the !Run file to run neverputt instead.
Also download the updated khronos.zip. Just merge !Boot and !System.

 
Apr 3, 2017 6:25am
Avatar Greg (2474) 135 posts

Ive managed to get Darkplaces to run as I can here it but I cannot see any image.
Any ideas what this might be ?

 
Apr 6, 2017 1:09am
Avatar Tristan M. (2946) 1034 posts

I think there’s a GLES build option or something for Minetest, So I guess that could conceivably be ported maybe?

 
Apr 11, 2017 10:19am
Avatar SeñorNueces (1438) 160 posts

@Chris Gransden: I have a huge interest on some of the things this could bring!
Any hope for vsync working? RetroArch needs it badly I think…
What about current ScummVM (which runs on Raspbian runs on SDL2 which in turn uses GLES2 to render)?

 
Jun 11, 2017 11:45am
Avatar Leo Smiers (245) 55 posts

Yesterday I tried to run !Neverball on my RPI B (version 1). I downloaded the zip files from 14th december as linked here above. After merging the !Boot and !System files I started !Neverball. The only thing I saw was a grey screen with a pointer pressing escape terminated the program. I must say I was not very patient and pressed the key after about 10 seconds.

This was with:
RPI B version 1
screen 1920 × 1080
The latest rom (build june 10th).

Should it still work or has it stopped working with all the rom changes since 14th december?

 
Dec 21, 2017 11:09am
Avatar Jan Rinze (235) 343 posts

Is there some info available on the khronos module?
I have OpenGL backend for RISC OS under Linux, that can be used to pass on OpenGL.
The Acer Chromebook has a Tegra K1 which has very good OpenGL support.

 
Dec 21, 2017 12:23pm
Avatar Alan Buckley (167) 231 posts

Jan,

I don’t know if it’s of any use to you, but the source for khronos is in the gccsdk autobuilder.
WebSVN link: http://www.riscos.info/websvn/listing.php?repname=gccsdk&path=%2Ftrunk%2Fautobuilder%2Fsystem%2Fkhronos%2F&#ab2792e3cfcbcff245b8ee0096bca279e

 
Jan 11, 2018 6:35pm
Avatar Mike Carter (36) 51 posts

I think there’s a GLES build option or something for Minetest, So I guess that could conceivably be ported maybe?

That would be excellent.

 
Mar 18, 2018 6:13pm
Avatar Chris Gransden (337) 1105 posts

Should be a Rasperry Pi specific version of RetroArch v1.7.1 available to download in the next few days. So far there are 50 cores working. A few are too slow to be useful. Most run at 60 fps on Pi 3B/B+.

2048
3D Engine
3DO (4DO)
Amiga (P-UAE)
Arcade (FB Alpha)
Arcade (MAME 2003)
Arcade (MAME 2010)
Atari 2600 (Stella)
Atari 780 (ProSystem)
Atari 8-bit computer systems and 5200 (Atari800)
Atari Jaguar (Virtual Jaguar)
Atari Lynx (Handy)
Atar ST/STE/TT/Falcon (Hatari)
Cave Story (NXEngine)
Commodore 64 (VICE C64)
Dinothawr
Doom (PrBoom)
DOS (DOSBox)
Game Boy Advance (Beetle GBA)
Game Boy Advance (Meteor)
Game Boy Advance (mGBA)
Gmae Boy Advance (VBA Next)
Game Boy Advance (VBA-M)
Mattel – Intellivision (FreeIntv)
Mr.Boom (Bomberman)
MSX (fMSX)
MSX/SVI/ColecoVision/GB-1000 (blueMSX)
NEC PC-98 (Neko Project II)
Neo Geo Pocket/Color (Beetle NeoPop)
NES / Famicom (FCEUmm)
Odyssey2 / Videopac+ (O2EM)
PC Engine SuperGrafx (Beetle SGX)
PC Engine/PCE-CD (Beetle PCE FAST)
PC-FX (Beetle PC-FX)
Playstation (Beetle PSX)
Quake 1 (TyrQuake)
Rick Dangerous (XRick)
ScummVM
Sega MS/GG/MD/CD (Genesis Plus GX)
Sega MS/MD/CD/32X (PicoDrive)
Sega Saturn (Yabuase)
Sharp X68000 (PX68k)
SNES / Super Famicom (Beetle bsnes)
SNES / Super Famicom (Snes9x 2010)
SNES / Super Famicom (Snes9x)
Vectrex (vecx)
Virtual Boy (Beetle VB)
WonderSwan/Color (Beetle Cygne)
ZX Spectrum (Fuse)
ZX81 (EightyOne)

 
Mar 19, 2018 6:13am
Avatar David Feugey (2125) 2628 posts

No Amstrad CPC :|

 
Mar 22, 2018 7:51pm
Avatar Chris Gransden (337) 1105 posts

No Amstrad CPC :|

The CPC core in retroarch locks up. I have a port of caprice32 that I can make available. Runs at 100% 50fps on Rpi 3 with frame skip.

 
Mar 22, 2018 11:11pm
Avatar Holger Palmroth (487) 115 posts

A welcome addition to the emulator zoo. Please do.

 
Mar 23, 2018 11:31am
Avatar Steffen Huber (91) 1847 posts

Andreas Stroiczek aka Face Hugger open-sourced his CPCEmu some time ago, maybe someone could give it a go to make it ready for modern hardware? It is still in the dark StrongARM ages…

See http://www.huggers-world.de/mops.html

 
Mar 23, 2018 12:41pm
Avatar Holger Palmroth (487) 115 posts

Even better, but harder to do. Would love to see it’s comeback.

 
Mar 23, 2018 5:39pm
Avatar David Feugey (2125) 2628 posts

The CPC core in retroarch locks up. I have a port of caprice32 that I can make available. Runs at 100% 50fps on Rpi 3 with frame skip.

Oh yes. It was my first machine, and – thanks to a great choice of colors – the one with the most acceptable games.

 
Dec 21, 2018 8:06am
Avatar David Feugey (2125) 2628 posts

Should be a Rasperry Pi specific version of RetroArch v1.7.1 available to download in the next few days. So far there are 50 cores working. A few are too slow to be useful. Most run at 60 fps on Pi 3B/B+.

Any news?

Nota: will it be possible to launch directly the cores?
I love the idea to make ‘almost native RISC OS apps’ from emulated software.

 
Feb 20, 2021 3:40pm
Avatar Andy S (2979) 501 posts

Chris Gransden,

Neverball/Neverputt are available to download from here. By default Neverball is run. Change the !Run file to run neverputt instead.
Also download the updated khronos.zip. Just merge !Boot and !System.

It’s really exciting that Khronos is working under RISC OS.

I’ve just tried the builds of Neverball and Khronos from your links on a Pi 3 with RISC OS 5.28. Unfortunately I don’t seem to get any graphical output at all and it froze the Pi. I’ll try and get some more information when I can find a bit more time. Would you expect these to work on 5.28 or will they need to be recompiled?

 
Feb 20, 2021 5:27pm
Avatar Chris Gransden (337) 1105 posts

I just tried it on a Rpi 3B+ and it ran OK. Should be OK on 5.28.

Check config/txt has,

gpu_mem=128

The resolution must be <= 1080p

Also make sure cmdline/txt doesn’t have disable_mode_changes. It seems to be more reliable without.

 
Feb 20, 2021 5:46pm
Avatar Andy S (2979) 501 posts

Thanks Chris, I’ll try those settings a bit later.

I managed to get debug logs. It’s not actually freezing the Pi today. It just seg faults. This is the output for Dark Places.

DarkPlaces-Quake Unknown 16:27:32 Sep 10 2016 - release
Playing shareware version.
Skeletal animation uses generic code path (SSE not compiled in)
DPSOFTRAST not available (SSE2 not compiled in)

Fatal signal received: Segmentation fault

Stack backtrace:

Running thread 0x1b46f48 (Main Thread)
  ( 1c59f34) pc: 496d915c lr: 496d963c sp:  1c59f38  __write_backtrace()
  ( 1c59fa0) pc: 496d9370 lr: 496db288 sp:  1c59fa4  __unixlib_raise_signal()
  ( 1c59fb0) pc: 496db13c lr: 4961aea4 sp:  1c584fc  __h_cback()

  Register dump at 01c59fb4:

    a1:  1c58500 a2:        0 a3:       14 a4:        0
    v1:        0 v2:  1b9ecc0 v3:  1b35710 v4:  1b7fce8
    v5:        2 v6:        0 sl:  1c58208 fp:  1c58588
    ip:  1b49de4 sp:  1c584fc lr: 4961aea4 pc: 4a78de98
    cpsr: 20000110

  4961ae90 : x_όλ : ebfc5f78 : BL      &49532C78
  4961ae94 : ..‡ε : e5870000 : STR     R0,[R7,#0]
  4961ae98 : ..β : e28d0004 : ADD     R0,R13,#4
  4961ae9c : Dpε : e58d7044 : STR     R7,[R13,#68]
  4961aea0 : EΥ�λ : ebffd545 : BL      &496103BC
  4961aea4 : .. α : e1a00005 : MOV     R0,R5
  4961aea8 : €ύ�λ : ebfffd80 : BL      &4961A4B0
  4961aeac : œR•ε : e595529c : LDR     R5,[R5,#668]
  4961aeb0 : l0ε : e59d306c : LDR     R3,[R13,#108]

  ( 1c58588) pc: 4961adcc lr: 4961684c sp:  1c5858c  RPI_VideoInit()
  ( 1c585ac) pc: 496166b8 lr: 495338ac sp:  1c585b0  SDL_VideoInit_REAL()
  ( 1c585c8) pc: 49533748 lr: 49533954 sp:  1c585cc  SDL_InitSubSystem_REAL()
  ( 1c585d8) pc: 49533948 lr: 4958f0a4 sp:  1c585dc  SDL_Init_REAL()
  ( 1c585e8) pc: 4958f080 lr:    12874 sp:  1c585ec  SDL_Init()
  ( 1c585fc) pc:    12864 lr:   1343bc sp:  1c58600  VID_Init()
  ( 1c58a24) pc:   133fa0 lr:   1358e8 sp:  1c58a28  Host_Init()
  ( 1c58ebc) pc:   1358bc lr:     d850 sp:  1c58ec0  Host_Main()
  ( 1c58ed4) pc:     d7d8 lr: 496effc0 sp:  1c58ed8  main()


I’ll try your suggested settings and report back.

Next page

Pages: 1 2

Reply

To post replies, please first log in.

Forums → General →

Search forums

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Description

General discussions.

Voices

  • Chris Gransden (337)
  • Chris Mahoney (1684)
  • SeñorNueces (1438)
  • Jeffrey Lee (213)
  • Greg (2474)
  • Tristan M. (2946)
  • Leo Smiers (245)
  • Jan Rinze (235)
  • Alan Buckley (167)
  • Mike Carter (36)
  • David Feugey (2125)
  • Holger Palmroth (487)
  • Steffen Huber (91)
  • Andy S (2979)

Options

  • Forums
  • Login
Site design © RISC OS Open Limited 2018 except where indicated
The RISC OS Open Beast theme is based on Beast's default layout

Valid XHTML 1.0  |  Valid CSS

Powered by Beast © 2006 Josh Goebel and Rick Olson
This site runs on Rails

Hosted by Arachsys