-
Notifications
You must be signed in to change notification settings - Fork 5
Vdp2/rotation param b #137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
seven-shades
wants to merge
9
commits into
main
Choose a base branch
from
Vdp2/rotation-param-B
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e49fff1
Added Rotation parameter switching to RBG0 interface
seven-shades de1835f
Bug Fix- calling Transparent Disable no longer breaks VDP1 layer display
seven-shades 2f39796
-Made Map2Vram and Cell2VRAM public.
seven-shades b27b036
Update:
seven-shades 85462e7
Fix Docs
seven-shades c057647
Updates:
seven-shades db8a0ef
Test Changes
seven-shades f293db5
Merge pull request #136 from ReyeMe/main
seven-shades 0d1701f
Additions/ Fixes to VDP2 Samples
seven-shades File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| { | ||
| "configurations": [ | ||
| { | ||
| "name": "Saturn", | ||
| "includePath": [ | ||
| "${workspaceFolder}/../../saturnringlib", | ||
| "${workspaceFolder}/../../modules/sgl/INC", | ||
| "${workspaceFolder}/../../modules/tlsf", | ||
| "${workspaceFolder}/../../modules/SaturnMathPP", | ||
| "${workspaceFolder}/../../Compiler/sh2eb-elf/sh-elf/include", | ||
| "${workspaceFolder}/../../Compiler/sh2eb-elf/sh-elf/include/c++/14.2.0", | ||
| "${workspaceFolder}/../../saturnringlib/**" | ||
| ], | ||
| "compilerPath": "${workspaceFolder}/../../Compiler/sh2eb-elf/bin/sh-elf-gcc-14.2.0.exe", | ||
| "cStandard": "c23", | ||
| "cppStandard": "c++23", | ||
| "intelliSenseMode": "gcc-x86", | ||
| "defines": [ | ||
| "__STDC_HOSTED__=0", | ||
| "SRL_CUSTOM_SGL_WORK_AREA=0", | ||
| "SRL_MALLOC_MEMORY=131072", | ||
| "SRL_MAX_TEXTURES=100", | ||
| "SRL_MODE_PAL", | ||
| "SRL_FRAMERATE=0", | ||
| "SRL_MAX_CD_BACKGROUND_JOBS=1", | ||
| "SRL_MAX_CD_FILES=255", | ||
| "SRL_MAX_CD_RETRIES=5", | ||
| "SRL_DEBUG_MAX_PRINT_LENGTH=45", | ||
| "SRL_USE_SGL_SOUND_DRIVER=1", | ||
| "SRL_ENABLE_FREQ_ANALYSIS=1", | ||
| "DEBUG" | ||
| ] | ||
| } | ||
| ], | ||
| "version": 4 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "recommendations": [ | ||
| "ms-vscode.cpptools" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| { | ||
| "files.exclude": { | ||
| "**/*.o": true, | ||
| "**/*.bat": true, | ||
| "[Cc][Dd]/[Bb]uild[Dd]rop**" : true, | ||
| }, | ||
| "files.watcherExclude": { | ||
| "**/*.o": true, | ||
| "**/*.bat": true, | ||
| "[Cc][Dd]/[Bb]uild[Dd]rop**" : true, | ||
| }, | ||
| "C_Cpp.loggingLevel": "Debug", | ||
| "files.associations": { | ||
| "*.embeddedhtml": "html", | ||
| "*.H": "c", | ||
| "*.C": "c", | ||
| "*.def": "c", | ||
| "*.h": "c", | ||
| "*.c": "c", | ||
| "*.HPP": "cpp", | ||
| "*.CXX": "cpp", | ||
| "*.hpp": "cpp", | ||
| "*.cxx": "cpp", | ||
| "functional": "cpp", | ||
| "vector": "cpp" | ||
| }, | ||
| "cmake.configureOnOpen": false, | ||
| "makefile.makefilePath": "./makefile", | ||
| "C_Cpp.default.cppStandard": "c++23", | ||
| "C_Cpp.default.cStandard": "c17", | ||
| "C_Cpp.formatting": "vcFormat", | ||
| "C_Cpp.vcFormat.newLine.beforeOpenBrace.function": "newLine", | ||
| "C_Cpp.vcFormat.newLine.beforeOpenBrace.block": "newLine", | ||
| "C_Cpp.vcFormat.newLine.beforeOpenBrace.namespace": "newLine", | ||
| "C_Cpp.vcFormat.newLine.beforeOpenBrace.type": "newLine", | ||
| "C_Cpp.vcFormat.newLine.beforeOpenBrace.lambda": "newLine", | ||
| "C_Cpp.vcFormat.indent.lambdaBracesWhenParameter": false, | ||
| "C_Cpp.inlayHints.autoDeclarationTypes.enabled": true, | ||
| "C_Cpp.inlayHints.autoDeclarationTypes.showOnLeft": true, | ||
| "C_Cpp.inlayHints.referenceOperator.enabled": true, | ||
| "C_Cpp.inlayHints.referenceOperator.showSpace": true | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| { | ||
| // See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
| // for the documentation about the tasks.json format | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "label": "Run with Mednafen", | ||
| "type": "shell", | ||
| "command": "./run_with_mednafen.bat", | ||
| "problemMatcher": [], | ||
| "presentation": { | ||
| "showReuseMessage": false, | ||
| "clear": true | ||
| }, | ||
| "group": { | ||
| "kind": "build", | ||
| "isDefault": true | ||
| } | ||
| }, | ||
| { | ||
| "label": "Compile [DEBUG]", | ||
| "type": "shell", | ||
| "command": "./compile.bat debug", | ||
| "problemMatcher": [], | ||
| "presentation": { | ||
| "showReuseMessage": false, | ||
| "clear": true | ||
| }, | ||
| "group": { | ||
| "kind": "build", | ||
| "isDefault": true | ||
| } | ||
| }, | ||
| { | ||
| "label": "Compile [RELEASE]", | ||
| "type": "shell", | ||
| "command": "./compile.bat release", | ||
| "problemMatcher": [], | ||
| "presentation": { | ||
| "showReuseMessage": false, | ||
| "clear": true | ||
| }, | ||
| "group": { | ||
| "kind": "build", | ||
| "isDefault": true | ||
| } | ||
| }, | ||
| { | ||
| "label": "Clean", | ||
| "type": "shell", | ||
| "command": "./clean.bat", | ||
| "problemMatcher": [], | ||
| "presentation": { | ||
| "showReuseMessage": false, | ||
| "clear": true | ||
| }, | ||
| "group": { | ||
| "kind": "build", | ||
| "isDefault": true | ||
| } | ||
| }, | ||
| ] | ||
| } |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # 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 | ||
|
|
||
| # 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 | ||
|
|
||
| # Disk name | ||
| CD_NAME = VDP2_ScrollScreen | ||
|
|
||
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| /*VDP2 Scroll Layer Demo: | ||
| This Demo provides a sample of using the SRL::ASCII module to load custom fonts | ||
| and swap between multiple fonts and color palettes. The system is largely meant | ||
| to display debug messages to developers, but can be used for simple dialog | ||
| systems as well. | ||
| However because The characters printed are fixed to a tilemap grid, font | ||
| formatting features such as variable width characters and kerning are not | ||
| possible with this system. Fonts are limited to 16 color 8x8 characters. | ||
| */ | ||
| #include <srl.hpp> | ||
|
|
||
| using namespace SRL::Types; | ||
| using namespace SRL::Input; | ||
| using namespace SRL::Math; | ||
|
|
||
| //A custom 16 color palette to load for a font: | ||
| HighColor CustomPalette[16] = | ||
| { | ||
| HighColor::Colors::Black,//note: index 0 color in a palette will be transparent | ||
| HighColor::Colors::Red, | ||
| HighColor::Colors::Green, | ||
| HighColor::Colors::Blue, | ||
| HighColor::Colors::White, | ||
| HighColor::Colors::Magenta, | ||
| HighColor::Colors::Yellow, | ||
| HighColor::Colors::Black, | ||
| HighColor::Colors::Black, | ||
| HighColor::Colors::Black, | ||
| HighColor::Colors::Black, | ||
| HighColor::Colors::Black, | ||
| HighColor::Colors::Black, | ||
| HighColor::Colors::Black, | ||
| HighColor::Colors::Black, | ||
| HighColor::Colors::Black, | ||
| }; | ||
|
|
||
| int main() | ||
| { | ||
|
|
||
| SRL::Core::Initialize(HighColor(20,10,50)); | ||
|
|
||
| /* During initialization, SRL loads the SGL font to font index 0. | ||
| By default print statements will display using font index 0, palette index 0:*/ | ||
|
|
||
| SRL::Debug::Print(1,2,"SRL Ascii Font Demo"); | ||
| SRL::Debug::Print(1,7,"This is the Default SGL Font"); | ||
|
|
||
| /*The font system can use the first 8 16 color palettes in CRAM (0-7). | ||
| So we can load additional palettes to use with fonts: */ | ||
|
|
||
| //reserve CRAM palette 1 for a font palette: | ||
| SRL::CRAM::SetBankUsedState(1, SRL::CRAM::TextureColorMode::Paletted16, true); | ||
| SRL::CRAM::Palette MyPalette(SRL::CRAM::TextureColorMode::Paletted16, 1); | ||
|
|
||
| //load custom colors to CRAM palette 1 | ||
| MyPalette.Load(CustomPalette,16); | ||
|
|
||
| //Switch the current font palette: | ||
| SRL::ASCII::SetPalette(1); | ||
|
|
||
| //Now subsequent print statments will use palette 1: | ||
| SRL::Debug::Print(1,10, "This is a custom font palette-"); | ||
| SRL::Debug::Print(1,11, "8 palettes can display simultaneously!"); | ||
|
|
||
| //Switch back to palette 0 | ||
| SRL::ASCII::SetPalette(0); | ||
|
|
||
| /*Custom fonts can also be used. Up to 6 can be loaded and displayed at once (0-5). | ||
| The system loads 8x8 character ASCII tables from a bitmap source. | ||
| -Ensure the source is 4bpp (16 color) and the table begins with | ||
| one whitespace character followed by the standard Ascii characters. See the | ||
| included image in the CD::Data folder for an example of the proper table format. | ||
| -Only 7bit ascii tables (first 128 characters) are supported.*/ | ||
|
|
||
| //load bitmap of the custom font to work ram | ||
| SRL::Bitmap::TGA* CustomFont = new SRL::Bitmap::TGA("FONT1.TGA"); | ||
|
|
||
| //load custom font to Ascii index 1: | ||
| SRL::ASCII::LoadFont(CustomFont, 1); | ||
|
|
||
| //Now we can switch to the new font like we switched palettes: | ||
| SRL::ASCII::SetFont(1); | ||
| SRL::Debug::Print(1,14,"This is a custom font-"); | ||
| SRL::Debug::Print(1,15,"6 fonts can display simultaneously!"); | ||
|
|
||
| //Main Game Loop | ||
| while(1) | ||
| { | ||
| //Print statments will remain on screen until SRL::ASCII::Clear() is Called | ||
| SRL::Core::Synchronize(); | ||
| } | ||
| return 0; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useless change, plese revert