optiroc / libsfx Goto Github PK
View Code? Open in Web Editor NEWSuper Nintendo (SNES) development framework
License: MIT License
Super Nintendo (SNES) development framework
License: MIT License
Hi (again... sorry),
I got several build issues on the example you provided in libSFX.
1/ Hello-Mode7: make output : http://sprunge.us/RaQh
2/ Mode7-Transform : http://sprunge.us/fThY
3/ X-GSU : http://sprunge.us/PSVO
For 1/ and 2/, no sfc was produced.
For 3/ a SuperFX.sfc is generated, but is not functionnal (pink background, tested with higan, snes9x, nosns) ?
Have a good day,
Respectfully,
ekyo
When creating a program with a map file to use for the rom and a map file to use for the SMP, the compiler gets confused and tries to use them interchangably. This causes obvious errors when the SMP doesn't have the right mapping details.
With only one map file, the CPU doesn't seem to want to steal the SMP's, but the SMP will try and use the main CPU's. This makes it impossible to create a program with a larger than normal ROM and also SMP overlays.
Hello, thank you for this excellent library, it helped me kickstart my dive into snes programming!
I load a background with
LZ4_decompress Map, EXRAM, y
VRAM_memcpy VRAM_MAP_LOC, EXRAM, y
LZ4_decompress Tiles, EXRAM, y
VRAM_memcpy VRAM_TILES_LOC, EXRAM, y
CGRAM_memcpy 0, Palette, sizeof_Palette
and after the user presses the start button, another background will be loaded with
LZ4_decompress Scr2Map, EXRAM, y
VRAM_memcpy VRAM_MAP_LOC, EXRAM, y
LZ4_decompress Scr2Tile, EXRAM, y
VRAM_memcpy VRAM_TILES_LOC, EXRAM, y
CGRAM_memcpy 0, Scr2Pal, sizeof_Scr2Pal
Unfortunately, this other background is garbled. The palette seems to load OK, but the map seems to be broken.
I have constructed a minimal example here (copy it into a subfolder of libsfx, e.g. into the examples folder):
https://github.com/josefcs/twopage-libsfx/
Forgive me, if I am missing something obvious here, but to me this seems like a bug.
Further pointers of what is going wrong would be very apreciated.
Thank you!
In the SMP-Play
example the data in the SMP zeropage doesn't seem to get included in the main binary, and never gets loaded into APURAM.
Is this intended behavior? What would the procedure be to include the zeropage in the SMP binary?
Here's a screenshot from BizHawk's Hex Editor, showing the first few bytes of APURAM. The string Zero!
that's included in the source file is not loaded: Imgur Link
Sorry if i'm completely misinterpreting the example. Thanks for help in advance.
Recently, I've written a (somewhat CPU-heavy) effect that renders into a buffer and uses WRAM_memset to clear the buffer each time. Since almost all the normal vblank DMA bandwidth is used to get the buffer into VRAM, I end up clearing the buffer mid-frame instead, where WRAM_memset becomes problematic on a real console.
Rather than touching VRAM, a safer option might be to just have a table of all 256 possible fill values in ROM and use that as the transfer source instead. This way, it can be safely used during active display.
The opcodes for the SuperFX blt and bge are swapped. libSFX assembles them as bge = 06xx and blt as 07xx, but these values should be reversed.
I have a LZ4-compressed file that crashes the decoder in SFX_LZ4_decompress/DecodeBlock. The cpu goes haywire and the stack loops around. I have permission to send the file privately, looking up your email to do so.
The shoulder button defines are the wrong way around. Curious that it's not been noticed til now, maybe so few games use them.
Master:
JOY_L = $0010
JOY_R = $0020
nocash docs:
15 1st Button B (1=Low=Pressed)
14 2nd Button Y
13 3rd Select Button
12 4th Start Button
11 5th DPAD Up
10 6th DPAD Down
9 7th DPAD Left
8 8th DPAD Right
7 9th Button A
6 10th Button X
5 11th Button L
4 12th Button R
3 13th 0 (High)
2 14th 0 (High)
1 15th 0 (High)
0 16th 0 (High)
.include "libSFX.i"
;-------------------------------------------------------------------------------
.segment "CODE"
.proc test
RW_push set:a16
RW_pull
.endproc
test.s(7): Error: Constant expression expected
../../libSFX/include/CPU.i(234): Note: Macro was defined here
test.s(7): Error: Constant expression expected
../../libSFX/include/CPU.i(238): Note: Macro was defined here
test.s(7): Error: Constant expression expected
../../libSFX/include/CPU.i(241): Note: Macro was defined here
test.s(7): Error: Constant expression expected
../../libSFX/include/CPU.i(244): Note: Macro was defined here
test.s(7): Error: Constant expression expected
../../libSFX/include/CPU.i(270): Note: Macro was defined here
../../libSFX/include/CPU.i(69): Note: Macro was defined here
"make": *** [.build/test.o] Error 1
Is there something non-obvious I might be doing wrong here? It seems like using any of the register size macros inside of a .proc causes problems with how those macros actually keep track of register state. I'd like to be able to tidy up my code/labels a bit but unfortunately this makes it difficult to do that without breaking any libSFX macros that use the RW macros (which is pretty much all of them...)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.