Homebrew GBARunner2

brunocar

Well-Known Member
Member
Joined
Aug 14, 2017
Messages
826
Trophies
0
Age
40
XP
2,198
Country
Argentina
@Gericom hmm, weird, i cant get saves to load, maybe im putting them in the wrong place (same folder as roms), no build, no rom or no SRAM patch can help me boot any of the super mario advance games

EDIT: SMA3 with SRAM patch on the non WRAM arm7 build boot but locks down randomly (4 times it locked to the "nintendo presents" screen, but it got to the first menu once before locking up), however, SMA1 only boots to a "save is corrupted" message if its without an SRAM patch, SRAM patched SMA2 now suddenly works for some reason, but it gets stuck when you try to create a new game on SMW or pressing start on Mario Bros

EDIT 2: while i cant get SMA4 to boot, i took the recommendation from the compat list about the save slots on it and applied it to SMA2, which can get to the intro with luigi, but just as its about to end it soft locks, but it too seems to randomly softlock
 
Last edited by brunocar,
D

Deleted User

Guest
I don´t think there is. It all depends on when Gericom plans to implement saving in GBARunner2.
 

WdevRipple

Member
Newcomer
Joined
May 16, 2018
Messages
11
Trophies
0
XP
71
Country
Sweden
would it be easy to splice some code from the gbc emu in srloader into gbarunner. (the touchscreen save/load thing)
also, because i did some minor work on Gba4ios (debug) i have some save method code.
i dont know if these things would be useful, just trying to help :)
 

Caboosium

Well-Known Member
Newcomer
Joined
Jan 19, 2018
Messages
48
Trophies
0
Age
21
Location
Planet Reach
XP
354
Country
United States
would it be easy to splice some code from the gbc emu in srloader into gbarunner. (the touchscreen save/load thing)
also, because i did some minor work on Gba4ios (debug) i have some save method code.
i dont know if these things would be useful, just trying to help :)

He left the GitHub. Get a copy of the code, implement your save code, then show it to him.
 

WdevRipple

Member
Newcomer
Joined
May 16, 2018
Messages
11
Trophies
0
XP
71
Country
Sweden
I found the source kind of confusing... and i would have to write the assembly code for bottom touch and screen access... kind of a mess, but possible.it would also be required to rewrite all the emulator code in order to implement a way to pull the ram at any time. looked at it and it would need to be COMPLETELY rewritten with virtual ram variables that could be pulled DURING execution. and better file system access too. its difficult but unless @Gericom is already working on it, i will try to do it.

ps.get better soon @Gericom !

EDIT:small bug, but the screen doesn't disable when closed(dsixl).wrking on that too :)
 
Last edited by WdevRipple,

Caboosium

Well-Known Member
Newcomer
Joined
Jan 19, 2018
Messages
48
Trophies
0
Age
21
Location
Planet Reach
XP
354
Country
United States
I found the source kind of confusing... and i would have to write the assembly code for bottom touch and screen access... kind of a mess, but possible.it would also be required to rewrite all the emulator code in order to implement a way to pull the ram at any time. looked at it and it would need to be COMPLETELY rewritten with virtual ram variables that could be pulled DURING execution. and better file system access too. its difficult but unless @Gericom is already working on it, i will try to do it.

ps.get better soon @Gericom !

EDIT:small bug, but the screen doesn't disable when closed(dsixl).wrking on that too :)

Awesome
 

Gericom

Well-Known Member
OP
Member
Joined
Jun 30, 2011
Messages
1,383
Trophies
2
Age
25
XP
4,730
Country
Netherlands
would it be easy to splice some code from the gbc emu in srloader into gbarunner. (the touchscreen save/load thing)
also, because i did some minor work on Gba4ios (debug) i have some save method code.
i dont know if these things would be useful, just trying to help :)
Well, supporting various save types other than sram is a separate thing from supporting saving to sd. Still for that first matter which could be implemented later, it could still be useful to look how others did it.
I found the source kind of confusing... and i would have to write the assembly code for bottom touch and screen access... kind of a mess, but possible.it would also be required to rewrite all the emulator code in order to implement a way to pull the ram at any time. looked at it and it would need to be COMPLETELY rewritten with virtual ram variables that could be pulled DURING execution. and better file system access too. its difficult but unless @Gericom is already working on it, i will try to do it.

ps.get better soon @Gericom !

EDIT:small bug, but the screen doesn't disable when closed(dsixl).wrking on that too :)
Yeah, since it's all assembly it isn't as clear as I'd like ofc. I have been trying to reorganize stuff a bit some time ago so that it is more clear in which files certain parts are. I also tried to improve filesystem access a bit with c++ classes. Still doing stuff during execution needs special precautions. Basically it should work as follows:

1. Make or find the save file (this is basically done, I didn't test actually making the file, but the one that made that code appearently did, making is disabled by a define)
2. Maybe store the fat entries somewhere for speed?
3. When the game writes to the save, start a timer on arm7, reset it as long as the game keeps writing.
4. When the timer ends, the game is likely done, signal the arm9 that the save should be written to sd.
5. The arm9 gets the irq and processes it, the game is temporary halted while some c code for writing the save is executed, then it returns to the irq handler and game execution continues.

And yeah, sleep isn't implemented, but could also be implemented with the irq handler probably.
 

WdevRipple

Member
Newcomer
Joined
May 16, 2018
Messages
11
Trophies
0
XP
71
Country
Sweden
@Gericom i am terrible at assembly and have no clue where to start when it comes to bottom touch and screen access...
Also, i need to figure out what language i should use on different parts and how i should use it.
if you could write the basic structure of the code with lots of comments that would get this done a lot faster :)
i want to assess touch and bottom before i implement saving...
but i am pretty far on saving, i just need a way to pause rom execution so the .sav doesn't keep getting written to.
thanks!


1. Make or find the save file (this is basically done, I didn't test actually making the file, but the one that made that code appearently did, making is disabled by a define)
where is the define?
and is there more than one?
i couldn't find it/them...
 
Last edited by WdevRipple,
  • Like
Reactions: Deleted User

Gericom

Well-Known Member
OP
Member
Joined
Jun 30, 2011
Messages
1,383
Trophies
2
Age
25
XP
4,730
Country
Netherlands
@Gericom i am terrible at assembly and have no clue where to start when it comes to bottom touch and screen access...
Also, i need to figure out what language i should use on different parts and how i should use it.
if you could write the basic structure of the code with lots of comments that would get this done a lot faster :)
i want to assess touch and bottom before i implement saving...
but i am pretty far on saving, i just need a way to pause rom execution so the .sav doesn't keep getting written to.
thanks!

(i am only going to compile for arm9 for now)

where is the define?
and is there more than one?
i couldn't find it/them...
It's in sd_access.cpp (at the top). For touch you would have to implement some stuff on arm7 to request the additional keys (including hinge and touch) and the touch data if needed from arm9 (ipc command or so).

For the irq handler look in arm9/source/emu/irq.s
 
Last edited by Gericom,
  • Like
Reactions: WdevRipple

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: @K3Nv2, https://www.youtube.com/watch?v=Vbqh0vXaRLw