#221✎ 407hakkeRNGHiddenEaster EggsQSP Contest 2 Contest ParticipantI participated in the second SmileBASIC Source QSP Contest!Expert ProgrammerProgramming no longer gives me any trouble. Come to me for help, if you like!Programming Strength
also let's say your programming level isnt good
Just because someone wrote bad code in the past doesn't mean they can' t improve, even if it is RGames. What makes you think you're so qualified to make these kinds of sweeping generalized judgements?
Anyone with the willingness to work for a long time on something can make something decent. I doubt that this emulator is the most optimized it could possibly be, period, no questions asked. It might not run very close to real time, but with more optimizations, it can probably run quite a bit faster than it can currently.
but now the question becomes: is "a bit faster" worthy of wasting a long time?
Posted
#222✎ 1571randoIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthThird YearMy account is over 3 years oldWebsiteAvatar TabooI didn't change my avatar for 180 daysWebsite
also let's say your programming level isnt good
Just because someone wrote bad code in the past doesn't mean they can' t improve, even if it is RGames. What makes you think you're so qualified to make these kinds of sweeping generalized judgements?
Anyone with the willingness to work for a long time on something can make something decent. I doubt that this emulator is the most optimized it could possibly be, period, no questions asked. It might not run very close to real time, but with more optimizations, it can probably run quite a bit faster than it can currently.
I agree, looking at myself. I went from making a horrible crappy hello neighbor clone into making a usable 3D engine over 2 years. That shows that putting time into learning and improving does help.
Posted
#223✎ 296h267Third YearMy account is over 3 years oldWebsiteAvatar TabooI didn't change my avatar for 180 daysWebsiteMinecraft Is Awesome!I love Minecraft!Express Yourself
But still, I want to see if I can do anything to make it faster. Using BG tiles and Sprites, minimizing FOR Loops (if it uses a lot)
0. Familiarization
If you have not familiarized yourself with how the Game Boy works, I strongly recommend doing so if you're going to make any meaningful improvements. For your case specifically, you'll want to pay attention to which registers in memory correspond to drawing graphics. The PPU (pixel processing unit)'s I/O registers are hex $FF40 through $FF4B. There are a lot of resources that can help you find out what all of these registers do. I recommend the offical dev manual here: https://ia801906.us.archive.org/19/items/GameBoyProgManVer1.1/GameBoyProgManVer1.1.pdf
1. Sprite-Background Priority
As far as I know, there is no way make anything (besides the console) display on top of the sprite layer in SmileBASIC.
The sprites in the Game Boy can be draw behind parts of the background. How would you implement that without getting into computationally-expensive operations?
2. Sprite Limitations
On the Game Boy, only 10 sprites can be drawn per line. The 11th will be cut off at that line. Not cut out entirely, just at the specific lines where there are 11 sprites in a row? How are you going to implement this sprite limit and have the sprites get cut off properly?
3. HDMA
This is a big one. HDMA, among other things, allows for the background to be scrolled after every line it is drawn. This can be used to produce a wavy effect on the screen. SmileBASIC doesn't have anything that does this, so you would probably be stuck copying graphics a lot.
And there's probably more than that.
Posted
Edited
by h267
#224✎ 1571randoIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthThird YearMy account is over 3 years oldWebsiteAvatar TabooI didn't change my avatar for 180 daysWebsiteThere actually is a way to move sprites behind the BG. Both SPOFS and BGOFS have a z argument.
Posted
#225✎ 296h267Third YearMy account is over 3 years oldWebsiteAvatar TabooI didn't change my avatar for 180 daysWebsiteMinecraft Is Awesome!I love Minecraft!Express Yourself
There actually is a way to move sprites behind the BG. Both SPOFS and BGOFS have a z argument.
Won't that move the entire background layer through? A specific pixel color need to be filtered and moved behind the others.
Posted
#226✎ 55SaladFingersThe largest problem for using built-in graphics is that the gameboy can change its graphics registers mid-frame, so the the frame can be partly drawn when data is changed
Posted
#227✎ 296h267Third YearMy account is over 3 years oldWebsiteAvatar TabooI didn't change my avatar for 180 daysWebsiteMinecraft Is Awesome!I love Minecraft!Express Yourself
The largest problem for using built-in graphics is that the gameboy can change its graphics registers mid-frame, so the the frame can be partly drawn when data is changed
Yup. For example, a horizontal wavy effect in the background layer that I mentioned earlier can be achieved by changing the SCX register in a sinusoidal pattern on every line during H-Blank.
Posted
#228✎ 86Missingno50Deep SleepHiddenWebsiteIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthAvatar TabooI didn't change my avatar for 180 daysWebsiteProbably X and Y, because those aren't on the original or GBC.
Posted
#229✎ 567HTV04Forum LeaderHiddenAchievementsThird YearMy account is over 3 years oldWebsiteIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthJust tried your emulator on SB4 with the Petit Converter tool, it works slightly faster than on the New 3DS, but not by much (around 5 seconds per frame). This says a lot about the possibility of emulation with SB4. We may not be able to get playable results.
Posted
Edited
by HTV04
#230✎ 186TarudahatQSP Contest 2 Contest ParticipantI participated in the second SmileBASIC Source QSP Contest!OSP Contest 3 Contest ParticipantI participated in the third SmileBASIC Source OSP Contest!Avatar TabooI didn't change my avatar for 180 daysWebsite
Just tried your emulator on SB4 with the Petit Converter tool, it works slightly faster than on the New 3DS, but not by much (around 5 seconds per frame). This says a lot about the possibility of emulation with SB4. We may not be able to get playable results.
How long did I take you to get past the first screen of Tetris? (if you were trying that on sb4)
Posted
#231✎ 74RaichuBenderAvatar TabooI didn't change my avatar for 180 daysWebsiteAvatar EmbargoI didn't change my avatar for 90 daysWebsiteAvatar BlockI didn't change my avatar for 30 days.Website
Just tried your emulator on SB4 with the Petit Converter tool, it works slightly faster than on the New 3DS, but not by much (around 5 seconds per frame). This says a lot about the possibility of emulation with SB4. We may not be able to get playable results.
What does it say?
Posted
#232✎ 567HTV04Forum LeaderHiddenAchievementsThird YearMy account is over 3 years oldWebsiteIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming Strength
Just tried your emulator on SB4 with the Petit Converter tool, it works slightly faster than on the New 3DS, but not by much (around 5 seconds per frame). This says a lot about the possibility of emulation with SB4. We may not be able to get playable results.
What does it say?
Hey! This was before you started announcing the progress of your emulator! Don't shame me!
Really looking forward to your emulator!
Posted
Edited
by HTV04
#233✎ 74RaichuBenderAvatar TabooI didn't change my avatar for 180 daysWebsiteAvatar EmbargoI didn't change my avatar for 90 daysWebsiteAvatar BlockI didn't change my avatar for 30 days.Website
Just tried your emulator on SB4 with the Petit Converter tool, it works slightly faster than on the New 3DS, but not by much (around 5 seconds per frame). This says a lot about the possibility of emulation with SB4. We may not be able to get playable results.
What does it say?
Hey! This was before you started announcing the progress of your emulator! Don't shame me!
Really looking forward to your emulator!
Haha, sorry if that came of as rude. Been checking this thread for any potential updates. Had to react to your post. :)
Posted
#234✎ 35Forsaken_AstralDev1Intermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthVideo GamesI like to play video games!HobbiesDay PersonI like the warm sunshine and wake up early!Express YourselfProbably you can make a C# compiler,how did you make this? Just asking!
Posted