Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
b30812a
fix(Scene2D): Fixed sprite width/height issue
ReyeMe Dec 2, 2025
366802d
fix(Scene2D): Fixed sprite width/height issue
ReyeMe Dec 2, 2025
09bb962
Update(Samples): Updated model loader in samples
ReyeMe Dec 5, 2025
8ce2c4c
Merge pull request #101 from ReyeMe/feature/update-nya-samples
jae686 Dec 28, 2025
c62ad98
feat(Scene2D): Improvements to Scene2D
ReyeMe Dec 28, 2025
f53ae2d
Merge pull request #102 from ReyeMe/feature/scene-2d-improvements
bimmerlabs Dec 29, 2025
07fd5e8
feat(Docs): Updated documentation
ReyeMe Dec 29, 2025
285eeba
feat(Docs): Updated documentation
ReyeMe Dec 29, 2025
b058413
Feat(CPK): Added new memory management options
ReyeMe Jan 9, 2026
046785d
Feat(CPK): Added new memory management options
ReyeMe Jan 10, 2026
5323845
feat(TV): Added ability to set custom resolution
ReyeMe Jan 10, 2026
db35254
feat(TV): Cleaned up resolutions enum
ReyeMe Jan 10, 2026
f272008
feat(TV): Added ability to set custom resolution
ReyeMe Jan 10, 2026
8535294
fix(UiManager): Correct opacity clamping method for shapes
willll Jan 10, 2026
13f2dc0
Merge pull request #106 from ReyeMe/fix/VDP1-ColorCalc-fix-Sample
willll Jan 10, 2026
86886f1
fix(Documentation): Increase docs version label
ReyeMe Jan 11, 2026
57cdb91
add simple Module sample
bimmerlabs Jan 30, 2026
424fc2a
Update Readme.md
bimmerlabs Jan 31, 2026
0267888
Update shared.mk
bimmerlabs Jan 31, 2026
f6d02ee
address comments
bimmerlabs Jan 31, 2026
6e9ce3b
fix typo (again)
bimmerlabs Jan 31, 2026
83f37b0
add support for Ymir
bimmerlabs Jan 31, 2026
8c8a642
remove comments
bimmerlabs Feb 5, 2026
a7ad0bc
fix newline
bimmerlabs Feb 5, 2026
40bdbb4
Merge pull request #109 from bimmerlabs/main
bimmerlabs Feb 5, 2026
f6d7f11
fixed small typo
jae686 Feb 11, 2026
39eb5a5
Merge pull request #110 from ReyeMe/fix-typo-in-scene2d.hpp
jae686 Feb 11, 2026
e62fc25
Shared.mk and make.sh are fixed work on MacOS
nemesis-saturn Mar 12, 2026
e23d98c
Merge pull request #112 from ReyeMe/SaturnRingLib-MacOS
ReyeMe Mar 12, 2026
a36148e
fix(Memory): Fixed TLSF makefile parameter
ReyeMe Mar 18, 2026
454b3bb
added support for %x in snprintfEx
jae686 Mar 19, 2026
459864b
updated documentation
jae686 Mar 19, 2026
c05a3e0
Merge pull request #113 from ReyeMe/bugfix/tlsf
jae686 Mar 19, 2026
59fd0b4
Merge pull request #114 from ReyeMe/snprintf-%x-extention
ReyeMe Mar 19, 2026
b6e2905
feat(Scene3D): Improvements to mesh and smoothmesh
ReyeMe Mar 28, 2026
0c21e49
Merge pull request #115 from ReyeMe/feature/mesh-data-improvements
ReyeMe Mar 28, 2026
f439106
fix(Memory): Fixed LWRAM reporting not working with TLSF
ReyeMe Mar 28, 2026
a7402e3
Merge pull request #116 from ReyeMe/bugfix/tlfs-reporting-lwram
ReyeMe Mar 28, 2026
ebc95d0
Fixed issue on the use of %f for FXP values (some fractional values w…
jae686 Mar 30, 2026
0902327
Merge pull request #118 from ReyeMe/main
jae686 Mar 30, 2026
453585d
Merge pull request #119 from ReyeMe/snprintfEx-FXP-printing-bugfix
jae686 Mar 31, 2026
e5fe252
fix(Linker): Fixed workarea not sizing when parameters change
ReyeMe Apr 8, 2026
5c71234
Merge pull request #121 from ReyeMe/bugfix/workarea-linker
ReyeMe Apr 8, 2026
36a506f
feat: add Timer/Tickstamp subsystem, Interrupt and System APIs (#120)
robertoduarte Apr 15, 2026
b874c91
feat(timer): add Tickstamp operators and CurrentTickstamp() accessor …
robertoduarte Apr 16, 2026
b32e9af
fix(Linker): Fixed workarea alignment issue
ReyeMe Apr 18, 2026
c25626d
Merge pull request #123 from ReyeMe/bugfix/linker-workarea-align
jae686 Apr 18, 2026
581840e
fix(Timer): Fixed delta time jitter on real HW
ReyeMe Apr 20, 2026
b5188d3
fix(Timer): Fixed delta time jitter on real HW
ReyeMe Apr 20, 2026
cb1a420
fix(Timer): Fixed typo causing Capture to read invalid time
ReyeMe Apr 21, 2026
4c0763e
Merge pull request #124 from ReyeMe/bugfix/timer-hw-jitter
ReyeMe Apr 22, 2026
c47cf85
feat(Scene2D): Added half brightness effect
ReyeMe May 9, 2026
d2a978a
Merge pull request #126 from ReyeMe/feature/scene2d-halfbright
jae686 May 9, 2026
7366eb9
feat(Input): Added function to get raw data from previous frame
ReyeMe May 9, 2026
b1fbc9c
Merge pull request #127 from ReyeMe/feature/input-manager
ReyeMe May 9, 2026
25b4b49
fix(Git): Update gitignore
ReyeMe May 9, 2026
a91fa6d
Fixed work area
ReyeMe May 20, 2026
ea465c0
fix(SGL): Fixed SGL binaries -by Abrasive
ReyeMe May 26, 2026
6250b4e
fix(Core): Fix compile with -Og
ReyeMe May 27, 2026
0e1fbe8
fix(TGA): Fix double free on palette deallocation
robertoduarte Jun 29, 2026
4e79923
fix(CPK): Fixed corrupted library
ReyeMe Jun 29, 2026
06de6e1
fix(Sample): Fixed broken VDP2 color calculation sample
ReyeMe Jun 29, 2026
0424d2d
refactor(tests): Enhance documentation for unit tests in ASCII, CD, a…
willll Jul 1, 2026
d300d1e
feat(Tests): Enhance ASCII display unit tests with detailed descripti…
willll Jul 1, 2026
99ac5c6
feat(DSP): Add unit tests for DSP program execution and register mani…
willll Jul 1, 2026
1f0919e
docs(Tests): Update README with USBGamers mode instructions and addit…
willll Jul 1, 2026
c7e7c3c
Add unit tests for mathematical types: Vector2D, Vector3D, Sphere, So…
willll Jul 1, 2026
dbc18cb
feat(tests): Update .gitignore to include imgui.ini and test result f…
willll Jul 1, 2026
53da727
feat(tests): Enhance run_tests.bat for USBGamers support and timeout …
willll Jul 1, 2026
efe179f
fix(tests): Remove volatile qualifier from loop index in timer diagno…
willll Jul 1, 2026
5bb89ef
fix(CRAM): Correct assignment operator for data initialization in RGB…
willll Jul 1, 2026
34e4913
Enhance angle tests with detailed descriptions and additional cases
willll Jul 1, 2026
a50612d
feat(tests): Enhance CRAM unit tests with setup state validation and …
willll Jul 1, 2026
f1c3954
feat(tests): Add comprehensive frustum unit tests covering extreme va…
willll Jul 1, 2026
3cea5c2
feat(tests): Add utility tests for math functions including Abs, Min,…
willll Jul 1, 2026
d796394
refactor(tests): Remove redundant header output calls in timer tests
willll Jul 3, 2026
dfb8794
fix(tests): Update header output condition in minunit to only display…
willll Jul 3, 2026
7a22cab
feat(scripts): Add run_on_saturn.bat script to execute USBGamers tools
willll Jul 3, 2026
1782f1e
fix(makefile): Change SRL_LOG_OUTPUT assignment to use conditional as…
willll Jul 3, 2026
47536ee
feat(register): Implement Register class with access mode and memory …
willll Jul 3, 2026
abeb92f
feat(devcart): Add SRL DevCart namespace with USB and SD card registe…
willll Jul 3, 2026
9458e0b
feat(logger): Enhance logging system with detailed output options and…
willll Jul 3, 2026
562fede
feat(tests): Refactor test result handling and enhance display functi…
willll Jul 3, 2026
3c9fd5a
fix(tests): Remove redundant assertions for Tickstamp values in curre…
willll Jul 3, 2026
9ded654
feat(tests): Add display utility functions and macros for test results
willll Jul 10, 2026
7792e58
Enhance documentation and refactor fixed-point (Fxp) unit tests
willll Jul 10, 2026
591aae0
Fix unix execution rights
willll Jul 11, 2026
83aa31f
fix(build): Improve error handling in buildall.bat script
willll Jul 11, 2026
a895eb0
fix(Memory): Fixed malloc initialization and SGL work area
ReyeMe Jul 12, 2026
a4c49be
Merge remote-tracking branch 'origin/main' into feature/UTs
willll Jul 13, 2026
8c1b65a
fix(build): Update file permissions for batch scripts
willll Jul 13, 2026
c6f357d
feat(scripts): Add run_on_saturn.bat files for various samples with e…
willll Jul 13, 2026
d858ae3
feat(scripts): Add getftx.sh and update setup_compiler.bat to include…
willll Jul 13, 2026
8879ccc
feat(run.bat): Add USBGamers emulator support and FTX execution logic
willll Jul 13, 2026
14b03f9
fix(srl.hpp): Remove trailing whitespace in environment validation co…
willll Jul 14, 2026
d634ac7
fix(srl_log.hpp): Remove trailing whitespace in documentation comments
willll Jul 14, 2026
194dc51
Implement code changes to enhance functionality and improve performance
willll Jul 14, 2026
7c15972
refactor(srl_register.hpp): Enhance documentation and improve code cl…
willll Jul 14, 2026
f97adf2
fix(srl_endian.hpp): Add missing namespace comment for clarity
willll Jul 14, 2026
8526a29
refactor(srl_devcart.hpp): Remove unused HostIo namespace and related…
willll Jul 14, 2026
31391b9
refactor(srl_register.hpp): Simplify isReadable and isWritable method…
willll Jul 15, 2026
3d19493
refactor(srl_register.hpp): Standardize method naming and improve cod…
willll Jul 15, 2026
26db907
refactor(srl_register.hpp): Move access mode checks into RegisterBase…
willll Jul 15, 2026
d4444ad
refactor(srl_register.hpp): Improve documentation consistency by stan…
willll Jul 15, 2026
9e2c98a
refactor(srl_devcart.hpp): Standardize documentation and improve nami…
willll Jul 15, 2026
01ca5a1
refactor(srl_log.hpp): Correct casing in documentation and method ref…
willll Jul 15, 2026
99a695a
refactor(srl_devcart.hpp): Remove outdated note regarding register ad…
willll Jul 15, 2026
c91a62e
refactor(srl_devcart.hpp): Remove unnecessary include of srl_register…
willll Jul 15, 2026
532dfb7
refactor(srl_devcart.hpp): Remove blocking wait functions and add tim…
willll Jul 15, 2026
a7c92c4
refactor(srl_devcart.hpp): Replace USBFlags class with struct and sim…
willll Jul 15, 2026
2dc6559
refactor(display.hpp): Improve variable naming and structure for clar…
willll Jul 15, 2026
c22cbd3
Refactor test utility functions and improve test suite structure
willll Jul 15, 2026
6360d6d
refactor(main.cxx): Improve variable naming and formatting for consis…
willll Jul 15, 2026
3ef70d4
fix(UT): Implement ftx call to run_tests.bat
ReyeMe Jul 16, 2026
2cc2bc7
docs(readme.md): Enhance USBGamers setup instructions for Linux and W…
willll Jul 16, 2026
156f521
feat(tests): Add VSCode tasks for building and running unit tests
willll Jul 16, 2026
b671c69
refactor(tests): Update VSCode tasks and build scripts for improved u…
willll Jul 18, 2026
460db7c
fix(tests): Correct command paths in VSCode tasks for unit tests
willll Jul 18, 2026
ab9d787
fix(tests): Add missing './' prefix to command paths in VSCode tasks
willll Jul 18, 2026
523fe0a
fix(scripts): Restore original PATH on exit in make.bat and make.sh
willll Jul 18, 2026
e79857a
fix(make.bat): Fixed make execution
ReyeMe Jul 21, 2026
344c58c
Merge pull request #133 from ReyeMe/feature/UTs
jae686 Jul 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@
/[Dd]ocumentation/*
!/[Dd]ocumentation/resources

/[Mm]odules_extra/**
!/[Mm]odules_extra/Put_extra_modules_here.txt
!/[Mm]odules_extra/samplemodule/**

/[Mm]odules/[Ss][Gg][Ll]/[Dd]ocumentation/*
!/[Mm]odules/[Ss][Gg][Ll]/[Dd]ocumentation/resources
/[Mm]odules/[Ss][Gg][Ll]/[Ii][Pp]/[Bb]uild[Dd]rop/**

/[Mm]odules/[Ss][Gg][Ll]/[Ss][Rr][Cc]/*.o
/[Mm]odules/[Tt][Ll][Ss][Ff]/*.o

/[Ss]amples/**/imgui.ini
/[Ss]amples/**/*.o
/[Ss]amples/**/[Bb]uild[Dd]rop/**
/[Cc]ompiler/msys2/tmp/*
Expand Down Expand Up @@ -46,7 +51,10 @@

/[Tt]ests/**/[Bb]uild[Dd]rop/**
/[Tt]ests/**/*.o
/[Tt]ests/**/imgui.ini
/[Tt]ests/**/*.log
/[Tt]ests/uts.json
/[Tt]ests/uts.xml

/Projects/**
!/Projects/Put_your_projects_here.txt
Expand All @@ -55,3 +63,8 @@
# Compiler folder
/[Cc]ompiler/**
Compiler/

# Python bytecode
**/__pycache__/
**/*.pyc

Binary file modified Documentation/resources/doc_img/slPerspective.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ PROJECT_NAME = SaturnRingLibrary
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 0.9.1
PROJECT_NUMBER = 0.9.2

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
3 changes: 3 additions & 0 deletions Samples/Debug - Print/run_on_saturn.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:; "../../tools/scripts/run.sh" USBGamers; exit;
@ECHO Off
"../../tools/scripts/run.bat" USBGamers
3 changes: 3 additions & 0 deletions Samples/Input - Gun/run_on_saturn.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:; "../../tools/scripts/run.sh" USBGamers; exit;
@ECHO Off
"../../tools/scripts/run.bat" USBGamers
3 changes: 3 additions & 0 deletions Samples/Logs/run_on_saturn.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:; "../../tools/scripts/run.sh" USBGamers; exit;
@ECHO Off
"../../tools/scripts/run.bat" USBGamers
3 changes: 3 additions & 0 deletions Samples/Makefile - pre and post build/run_on_saturn.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:; "../../tools/scripts/run.sh" USBGamers; exit;
@ECHO Off
"../../tools/scripts/run.bat" USBGamers
3 changes: 3 additions & 0 deletions Samples/Math - Random image/run_on_saturn.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:; "../../tools/scripts/run.sh" USBGamers; exit;
@ECHO Off
"../../tools/scripts/run.bat" USBGamers
3 changes: 3 additions & 0 deletions Samples/Math - Random/run_on_saturn.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:; "../../tools/scripts/run.sh" USBGamers; exit;
@ECHO Off
"../../tools/scripts/run.bat" USBGamers
3 changes: 3 additions & 0 deletions Samples/SH2 - Slave/run_on_saturn.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:; "../../tools/scripts/run.sh" USBGamers; exit;
@ECHO Off
"../../tools/scripts/run.bat" USBGamers
3 changes: 3 additions & 0 deletions Samples/SMPC - Clock/run_on_saturn.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:; "../../tools/scripts/run.sh" USBGamers; exit;
@ECHO Off
"../../tools/scripts/run.bat" USBGamers
3 changes: 3 additions & 0 deletions Samples/SRL - Event/run_on_saturn.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:; "../../tools/scripts/run.sh" USBGamers; exit;
@ECHO Off
"../../tools/scripts/run.bat" USBGamers
93 changes: 93 additions & 0 deletions Samples/SRL - Modules/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# SampleModule – SRL Module Example
SampleModule is an example of an **SRL** extra module using the `modules_extra` system.

It demonstrates how to structure a module, integrate it into a project, and distribute assets and build logic.

## This module shows how to:
- Add external modules via a project Makefile
- Organize module files for SRL
- Use module.mk for custom build behavior
- Automatically copy module data into a project
- Chain multiple modules together
- Write header-only modules (recommended)

## 1) Adding a Module to Your Project
To include a module in your project, add this line to your project’s Makefile:
```
MODULES_EXTRA = samplemodule
```
Replace SampleModule with the name of your module.

To include multiple modules, separate them with spaces:
```
MODULES_EXTRA = SampleModule AnotherModule MyModule
```
## 2) Module Location
Place your module inside the SRL modules_extra directory:
```
saturnringlib/
└── modules_extra/
└── SampleModule/
```
## 3) Module Structure (SRL Style)
A typical SRL module layout:
```
SampleModule/
├── INC/
│ └── samplemodule.hpp
├── cd/
│ └── data/
│ └── example.bin
└── module.mk
```
### INC Folder (Important)
All module source files go in **INC**.
Header-only modules (.hpp) are highly encouraged.
If you place .c or .cpp files in **INC**, SRL will automatically compile them.
This allows modules to be simple, portable, and easy to integrate.

### Example:
```
#include <samplemodule.hpp>
SampleModule::HelloWorld::ShowMessage();
```
### cd/data Folder (Automatic Copy)
If your module needs to provide files to the project (e.g. binaries, assets, drivers), place them in:
```
SampleModule/cd/data/
```
During the build, these files are automatically copied to the project’s:
```
project_root/cd/data/
```
### Typical use cases:
- Sound drivers (e.g. SDRV.BIN)
- Binary assets
- Textures, maps, fonts, etc.

## 4) Custom Build Logic (module.mk)
Each module can define a **module.mk** file to extend the build process.

You can use module.mk to:
- Add compiler flags
- Add include paths
- Define custom copy rules
- Add build steps or dependencies
- Customize how the module integrates with SRL

## 5) Using Multiple Modules (Module Chaining)
Modules can be combined freely.
To use multiple modules, list them in the project Makefile:
```
MODULES_EXTRA = samplemodule dependencymodule anothermodule
```
Don't forget to include dependencies in your module:
```
#include <dependencymodule.hpp>
```
There is no special syntax required—modules are resolved through the same mechanism.
A module can depend on another module as long as it is listed in `MODULES_EXTRA`.

## 6) Design Philosophy
Modules should be lightweight and header-focused, making them portable and easy to drop into projects.

1 change: 1 addition & 0 deletions Samples/SRL - Modules/cd/data/ABS.TXT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NOT Abstracted by SEGA
1 change: 1 addition & 0 deletions Samples/SRL - Modules/cd/data/BIB.TXT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NOT Bibliographiced by SEGA
Empty file.
3 changes: 3 additions & 0 deletions Samples/SRL - Modules/clean.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:; "../../tools/scripts/make.sh" clean; exit;
@ECHO Off
"../../tools/scripts/make.bat" clean
3 changes: 3 additions & 0 deletions Samples/SRL - Modules/compile.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:; "../../tools/scripts/make.sh" $1; exit;
@ECHO Off
"../../tools/scripts/make.bat" %1
39 changes: 39 additions & 0 deletions Samples/SRL - Modules/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Configuration
SRL_MAX_TEXTURES = 100 # Number of VDP1 texture slots
SRL_MODE = NTSC # Valid options are PAL or NTSC
SRL_HIGH_RES = 0 # 480i mode
SRL_FRAMERATE = 1 # Framerate control (0=dynamic, 1=< 60/value)
SRL_MAX_CD_BACKGROUND_JOBS = 1 # Maximum number of files GFS can open at once
SRL_MAX_CD_FILES = 256 # Maximum number of files on a CD
SRL_MAX_CD_RETRIES = 5 # Number of times to retry on unsuccessful read
SRL_MALLOC_METHOD = TLSF # Allocation method: TLSF or SIMPLE are supported.

# Sound driver specific configuration
SRL_USE_SGL_SOUND_DRIVER = 0 # Set to 1 if you want to use SGL sound driver, this will copy necessary files into the CD folder
SRL_ENABLE_FREQ_ANALYSIS = 0 # Set to 1 if you want to enable frequency analysis for CD audio, this will load a DSP program into effect slot 1, SGL sound driver must be enabled

# SGL configuration
SGL_MAX_VERTICES = 2500 # Number of vertices that can be used
SGL_MAX_POLYGONS = 1500 # Number of polygons that can be used
SGL_MAX_EVENTS = 1 # Number of events that can be used
SGL_MAX_WORKS = 1 # Number of works that can be used

# include extra modules
MODULES_EXTRA = samplemodule

# Disk name
CD_NAME = SRL-Modules

# Directory build will be placed into
BUILD_DROP = ./BuildDrop

# SRL installation directory
SRL_INSTALL_ROOT ?= ../..

# Find all .c and .cxx files
SOURCES = $(patsubst ./%,%,$(shell find src/ -name '*.c'))
SOURCES += $(patsubst ./%,%,$(shell find src/ -name '*.cxx'))

# Include shared makefile
SDK_ROOT = $(SRL_INSTALL_ROOT)/saturnringlib
include $(SDK_ROOT)/shared.mk
3 changes: 3 additions & 0 deletions Samples/SRL - Modules/run_on_saturn.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:; "../../tools/scripts/run.sh" USBGamers; exit;
@ECHO Off
"../../tools/scripts/run.bat" USBGamers
3 changes: 3 additions & 0 deletions Samples/SRL - Modules/run_with_Ymir.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:; "../../tools/scripts/run.sh" ymir; exit;
@ECHO Off
"../../tools/scripts/run.bat" ymir
3 changes: 3 additions & 0 deletions Samples/SRL - Modules/run_with_kronos.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:; "../../tools/scripts/run.sh" kronos; exit;
@ECHO Off
"../../tools/scripts/run.bat" kronos
3 changes: 3 additions & 0 deletions Samples/SRL - Modules/run_with_mednafen.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:; "../../tools/scripts/run.sh" mednafen; exit;
@ECHO Off
"../../tools/scripts/run.bat" mednafen
25 changes: 25 additions & 0 deletions Samples/SRL - Modules/src/main.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include <srl.hpp>
#include <samplemodule.hpp>

using namespace SampleModule;

int main()
{
SRL::Core::Initialize(SRL::Types::HighColor::Colors::Black);

Digital port0(0);

HelloWorld::ShowMessage();

while(1)
{
if (port0.WasPressed(Digital::Button::A))
{
HelloWorld::ShowMessage(true);
}

SRL::Core::Synchronize();
}

return 0;
}
3 changes: 3 additions & 0 deletions Samples/STL/run_on_saturn.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:; "../../tools/scripts/run.sh" USBGamers; exit;
@ECHO Off
"../../tools/scripts/run.bat" USBGamers
10 changes: 7 additions & 3 deletions Samples/VDP1 - 3D - Animation/src/modelObject.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,13 @@ class ModelObject
*/
uint8_t IsWireframe : 1;

/** @brief Render faces without any light applied
*/
uint8_t NoLight : 1;

/** @brief Reserved for future use
*/
uint8_t Reserved : 7;
uint8_t Reserved : 6;

/** @brief This field is set if HasTexture field is false
*/
Expand Down Expand Up @@ -218,7 +222,7 @@ class ModelObject
(attributeHeader->HasTransparency != 0 ? CL_Trans : 0) |
(attributeHeader->HasHalfBrightness != 0 ? CL_Half : 0),
(attributeHeader->IsWireframe != 0 ? sprPolyLine : (attributeHeader->HasTexture != 0 ? sprNoflip : sprPolygon)),
UseLight);
(attributeHeader->NoLight != 0 ? No_Option : UseLight));
#pragma GCC diagnostic pop
}

Expand Down Expand Up @@ -273,7 +277,7 @@ class ModelObject
(attributeHeader->HasTransparency != 0 ? CL_Trans : 0) |
(attributeHeader->HasHalfBrightness != 0 ? CL_Half : 0),
(attributeHeader->IsWireframe != 0 ? sprPolyLine : (attributeHeader->HasTexture != 0 ? sprNoflip : sprPolygon)),
(attributeHeader->HasFlatShading != 0 ? UseLight : UseGouraud));
(attributeHeader->NoLight != 0 ? No_Option : (attributeHeader->HasFlatShading != 0 ? UseLight : UseGouraud)));
#pragma GCC diagnostic pop

*gouraudIterator += 1;
Expand Down
2 changes: 1 addition & 1 deletion Samples/VDP1 - 3D - Flat teapot/src/main.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ int main()

// Load teapot
// Original model file can be found in the models folder in root of the sample
// Model was converted with ModelConverter (see https://github.com/ReyeMe/ModelConverter-linux), command parameters were: ModelConverter -i "D:\teapot.obj" -o "D:\FPOT.NYA" -s 1.0
// Model was converted with ModelConverter (see https://github.com/ReyeMe/ModelConverter-linux), command parameters were: ModelConverter -i "D:\teapot.obj" -o "D:\FPOT.NYA" -t Flat -s 1.0
ModelObject teapot = ModelObject("FPOT.NYA");

// Setup camera location
Expand Down
Loading
Loading