diff options
author | Ben Bridle <ben@derelict.engineering> | 2024-11-22 16:04:33 +1300 |
---|---|---|
committer | Ben Bridle <ben@derelict.engineering> | 2024-11-22 16:07:48 +1300 |
commit | fcbc3968bd95e4d19b37d9fa4bca51b1db8596ff (patch) | |
tree | 333c6cf63f4b2aea513a9691b29c8f397e139c46 /arm9/source/core.c | |
parent | e05888d141bc64e92d81859af0d87627e6fbc477 (diff) | |
download | bedrock-nds-fcbc3968bd95e4d19b37d9fa4bca51b1db8596ff.zip |
Implement name and author ports in system device
Diffstat (limited to 'arm9/source/core.c')
-rw-r--r-- | arm9/source/core.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arm9/source/core.c b/arm9/source/core.c index a1f9ec1..7136777 100644 --- a/arm9/source/core.c +++ b/arm9/source/core.c @@ -56,6 +56,8 @@ u8 dev_read(Bedrock *br, u8 port) { switch(port) { // SYSTEM DEVICE // TODO: name and author + case 0x00: return rb_read(&br->sys.name); + case 0x01: return rb_read(&br->sys.authors); case 0x02: return 0x00; // program memory size case 0x03: return 0x00; // program memory size case 0x04: return 0x00; // working stack size @@ -143,8 +145,10 @@ u8 dev_read(Bedrock *br, u8 port) { Signal dev_write(Bedrock *br, u8 port, u8 v) { switch(port) { // SYSTEM DEVICE - case 0x08: SET_HIGH(br->sys.sleep,v); return 0; - case 0x09: SET_LOW(br->sys.sleep,v); return SIG_SLEEP; + case 0x00: rb_reset(&br->sys.name); return 0; + case 0x01: rb_reset(&br->sys.authors); return 0; + case 0x08: SET_HIGH(br->sys.sleep,v); return 0; + case 0x09: SET_LOW(br->sys.sleep,v); return SIG_SLEEP; // MEMORY DEVICE case 0x10: mem_write1(&br->mem,v); return 0; case 0x11: mem_write1(&br->mem,v); return 0; |