Comments (5)
Oh I never tried that, let me keep that open as a future feature.
I never tried it, but I think ideally from C, you should run something like:
__asm__ __volatile__ ("jsr 0xc00468" : : :
"d0","d1","d2","d3","d4","d5","d6","d7",
"a0","a1","a2","a3","a4","a5","a6");
I'm not sure of the calling convention so here the example request gcc to save all registers.
I'll add a dedicated header with the appropriate macros to call all the BIOS functions.
from ngdevkit.
No problem, I am going to try today.
from ngdevkit.
Excellent ! It works. Quickly, I retrieved with success the user name of the memcard.
`
#define BIOS_CARD_COMMAND ((volatile u8*)0x10FDC4)
#define BIOS_CARD_ANSWER ((volatile u8*)0x10FDC6)
#define BIOS_CARD_START ((volatile u32*)0x10FDC8)
char data[8];
char msg[4];
*BIOS_CARD_START = (u32)data;
*BIOS_CARD_COMMAND = 7;
asm volatile ("jsr 0xc00468" : : :
"d0","d1","d2","d3","d4","d5","d6","d7",
"a0","a1","a2","a3","a4","a5","a6");
display(1, 2, data); // display user name data string on fx layer
snprintf(msg, 4, "%2d", *BIOS_CARD_ANSWER);
display(1, 3, msg);// display error code
`
from ngdevkit.
Great!
For what it's worth, latest ngdevkit master provides additional headers/helpers that allow you to access the data in the BIOS's memory as if they were regular C variables:
#include <ngdevkit/bios-ram.h>
[...]
bios_card_start = (u32)data;
bios_card_command = 7;
Maybe that can be of interest for you.
from ngdevkit.
Also I am able to load/save data.
After experimenting, I want to raise 2 issues:
- the NGH number must be considered in hex literally. For exxample, Puzzle Bobble NGH is 83, so a call for it would be:
*BIOS_CARD_FCB = 0x83;
- The BIOS_CARD_SUB must be read as 16 bits with data search command (1). But writing only 8 bits with load data command (2). It seems to work both with save data command (3)
from ngdevkit.
Related Issues (20)
- Windows MSYS2 install pacman ' failed retrieving file ngdevkit.db.sig' HOT 2
- README-linux.md: ngdevkit.list sources list may be wrong and may miss readline-dev package dependency HOT 1
- 06-sound-sample no sound on real hardware with NEOSD HOT 7
- Makefile Issue In Terminal HOT 4
- Use the open source bios with roms not made with NGDevKit. HOT 2
- Main.o error
- Compile Issue
- Can't compile the devkit HOT 1
- Save on MVS backup RAM HOT 6
- FYI: two related projects HOT 1
- Vertical shrinking & garbage HOT 7
- C++ compile issue HOT 2
- failed to install on macos brew HOT 3
- Debug in mame Help HOT 2
- Neo geo cd conversation help! HOT 3
- unable to locate package error HOT 4
- P ROM size is not enough HOT 19
- Typo in README-mingw.md HOT 5
- Suggestion: Discord Server For ngdevkit.
- Support bank switching of P-ROM2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngdevkit.