Homebrew Emulation GameYob, a gameboy emulator for DS

sverx

a DS homebrewer
Newcomer
Joined
Dec 23, 2008
Messages
32
Trophies
0
Website
adshomebrewersdiary.blogspot.com
XP
108
Country
Italy
The reason the copying is necessary is because the sub engine can only use one of the 128k vram banks, bank C. I can't switch it out... the bank which is taking the snapshot needs to be allocated to the LCD memory area. The best I could do, without copying, was to have it displaying at 30 fps, with every other frame being black. No good. So the snapshot is captured to bank D, and every vblank, the contents of D are copied to C. I don't need to copy all of it, just 256x144x2 bytes (or possibly 160x144x2 noncontinuous bytes), but that's still a lot.

You really made me worry about being completely gone crazy... no, actually the fact is that you have to use bank C and background on odd frames and bank D and bitmap objects (sprites! really!!!) on even frames. What I'm not sure now is if rotscale double bitmap objects exist or not... I've never used them but it should be theoretically possible (ATTR0_ROTSCALE_DOUBLE|ATTR0_BMP).
So you'll have to break up the captured image into sprites and resize them. Not easy. Also, you have to make sure you're using the proper "Bitmap OBJ Mapping (DISPCNT.6,5,22)"

I believe it's easier to resize backgrounds and sprites directly on main engine and forget capture ;)
 
  • Like
Reactions: VatoLoco and Drenn

Drenn

Well-Known Member
OP
Member
Joined
Feb 22, 2013
Messages
574
Trophies
0
XP
696
Country
Canada
I believe it's easier to resize backgrounds and sprites directly on main engine and forget capture ;)
If there's a way to do that I'd love to know how. I'm under the impression that tile-based background layers are unscaleable.

You really made me worry about being completely gone crazy... no, actually the fact is that you have to use bank C and background on odd frames and bank D and bitmap objects (sprites! really!!!) on even frames. What I'm not sure now is if rotscale double bitmap objects exist or not... I've never used them but it should be theoretically possible (ATTR0_ROTSCALE_DOUBLE|ATTR0_BMP).
So you'll have to break up the captured image into sprites and resize them. Not easy. Also, you have to make sure you're using the proper "Bitmap OBJ Mapping (DISPCNT.6,5,22)"
Bitmap sprites, well that hadn't even occurred to me! Scaling them in the same manner as the background certainly sounds like a complex task... I'm wondering how a filter would work this way. Can sprites be blended with themselves...?

Anyway. The scaling I have is finally fairly usable, so, you can try it out using the master branch latest build. There are 2 filters, neither of which is particularly great. I'd recommend using filter B.

THe only thing that keeps me back on lameboy compared to this awesome emulator is the damn scaling the lameboy has
If it ever gets implemented i will surely go with this one.
No excuse to use lameboy anymore :evil:
 

dickfour

Banned!
Banned
Joined
Jun 20, 2011
Messages
581
Trophies
0
XP
164
Country
United States
I'm using an XL so there's no need for scaling :)
I just went back and tried Lameboy and it's not even close. Scaling or not I'd never use it again. There's just no reason
 
  • Like
Reactions: VatoLoco

wzhy90

Member
Newcomer
Joined
Apr 24, 2013
Messages
19
Trophies
0
XP
112
Country
Switzerland
If there's a way to do that I'd love to know how. I'm under the impression that tile-based background layers are unscaleable.


Bitmap sprites, well that hadn't even occurred to me! Scaling them in the same manner as the background certainly sounds like a complex task... I'm wondering how a filter would work this way. Can sprites be blended with themselves...?

Anyway. The scaling I have is finally fairly usable, so, you can try it out using the master branch latest build. There are 2 filters, neither of which is particularly great. I'd recommend using filter B.


No excuse to use lameboy anymore :evil:
I have cloned the source, and I want to translate it to chinese. how can I add a chinese font in source?
 

sverx

a DS homebrewer
Newcomer
Joined
Dec 23, 2008
Messages
32
Trophies
0
Website
adshomebrewersdiary.blogspot.com
XP
108
Country
Italy
Bitmap sprites, well that hadn't even occurred to me! Scaling them in the same manner as the background certainly sounds like a complex task... I'm wondering how a filter would work this way. Can sprites be blended with themselves...?

Oh, right, you wanted to hardware blend and jitter the image to 'filter' it. No, unfortunately there's no sprite-to-sprite blending. This makes this whole bitmap objects thing unfeasible.

If there's a way to do that I'd love to know how. I'm under the impression that tile-based background layers are unscaleable.

Tile based backgrounds CAN be scaled and rotated. On DS you've even got extended rotscale backgrounds, which supports up to 1024 tiles that can be even flipped (as in regular text BGs). But, again, if you scale also the sprites you won't have any blending filter there. So maybe you've found the right compromise, capturing the rendered MAIN screen to vram D and copying contents to vram C each frame for a 15bpp bitmap background on SUB screen, where you can have BG2 and BG3 (both using the same image) hardware blending and jittering them... well, not bad ;)
 

Coto

-
Member
Joined
Jun 4, 2010
Messages
2,979
Trophies
2
XP
2,564
Country
Chile
Oh, right, you wanted to hardware blend and jitter the image to 'filter' it. No, unfortunately there's no sprite-to-sprite blending. This makes this whole bitmap objects thing unfeasible.

Tile based backgrounds CAN be scaled and rotated. On DS you've even got extended rotscale backgrounds, which supports up to 1024 tiles that can be even flipped (as in regular text BGs). But, again, if you scale also the sprites you won't have any blending filter there. So maybe you've found the right compromise, capturing the rendered MAIN screen to vram D and copying contents to vram C each frame for a 15bpp bitmap background on SUB screen, where you can have BG2 and BG3 (both using the same image) hardware blending and jittering them... well, not bad ;)

I'm interested in this, about rotscale backgrounds. If you use them, the 2D engine is "busy" to perform another hw operation at the same time? Or is that part of the 3D engine?
 

pyrofool

Active Member
Newcomer
Joined
Apr 29, 2012
Messages
32
Trophies
1
XP
1,316
Country
United States
I noticed if there is an in game save from the game its self and you hit the reset option, when the game resets it does not reload the saved data. When you exit and load the game again, the save shows up. Maybe the reset function does not directly mirror the load game function.
 

sverx

a DS homebrewer
Newcomer
Joined
Dec 23, 2008
Messages
32
Trophies
0
Website
adshomebrewersdiary.blogspot.com
XP
108
Country
Italy
I'm interested in this, about rotscale backgrounds. If you use them, the 2D engine is "busy" to perform another hw operation at the same time? Or is that part of the 3D engine?

'Tiled' backgrounds on DS can be of 3 types: 'normal', 'rotscale' (aka 'affine') and 'extended rotscale'. You can have 4 'normal' -OR- 3 'normal' and 1 of the other 2 kinds -OR- 2 normal and 2 of the other 2 kinds. Check BG modes here. All that is generated by the 2D core. Better: all that is possible on both 2D cores of the DS :)
 

Sizednochi

Well-Known Member
Member
Joined
Dec 16, 2012
Messages
697
Trophies
1
XP
862
Country
Brazil
EDIT: I made more because why not :P
I made a small contribution for anyone using custom borders, you can download them here:

Purple: http://www.mediafire.com/?yaw5c29jl5j7mb9
Teal: http://www.mediafire.com/?i8r4innwuy1qrzn
Dandelion (Yellow): http://www.mediafire.com/?uu50vx55r57bqoz
Blue: http://www.mediafire.com/?g3zac8gmg6dv66c
Kiwi (Light Green): http://www.mediafire.com/?qn5vicp6svyec5u
Berry (Fuchsia): http://www.mediafire.com/?fghp12j3fea3rfw
Atomic Purple: http://www.mediafire.com/?gvarybah37n9w5x

Pikachu Edition: http://www.mediafire.com/?l7yu8871h9v20u0
Pokémon Center Limited Edition: http://www.mediafire.com/?0m3pxad16qj13rf

Previews:
yaw5c29jl5j7mb9fg.jpg
i8r4innwuy1qrznfg.jpg
uu50vx55r57bqozfg.jpg
g3zac8gmg6dv66cfg.jpg
qn5vicp6svyec5ufg.jpg
fghp12j3fea3rfwfg.jpg
gvarybah37n9w5xfg.jpg
l7yu8871h9v20u0fg.jpg
0m3pxad16qj13rffg.jpg
PS.: You have to rename the one you want to border.bmp and place it on the Root of your SD, as of now you can't select individual borders.​
 

Coto

-
Member
Joined
Jun 4, 2010
Messages
2,979
Trophies
2
XP
2,564
Country
Chile
'Tiled' backgrounds on DS can be of 3 types: 'normal', 'rotscale' (aka 'affine') and 'extended rotscale'. You can have 4 'normal' -OR- 3 'normal' and 1 of the other 2 kinds -OR- 2 normal and 2 of the other 2 kinds. Check BG modes here. All that is generated by the 2D core. Better: all that is possible on both 2D cores of the DS :)

Many thanks for the info given sverx ;)
 

Drenn

Well-Known Member
OP
Member
Joined
Feb 22, 2013
Messages
574
Trophies
0
XP
696
Country
Canada
I have cloned the source, and I want to translate it to chinese. how can I add a chinese font in source?
You'd have to replace consoleDemoInit calls with consoleInit calls (see here), and copy your font to the sub graphics engine. Maybe use the implementation of consoleDemoInit() in libnds as a guideline? I've never used a font other than the default myself.
EDIT: I made more because why not :P
I made a small contribution for anyone using custom borders, you can download them here:

Purple: http://www.mediafire.com/?yaw5c29jl5j7mb9
Teal: http://www.mediafire.com/?i8r4innwuy1qrzn
Dandelion (Yellow): http://www.mediafire.com/?uu50vx55r57bqoz
Blue: http://www.mediafire.com/?g3zac8gmg6dv66c
Kiwi (Light Green): http://www.mediafire.com/?qn5vicp6svyec5u
Berry (Fuchsia): http://www.mediafire.com/?fghp12j3fea3rfw
Atomic Purple: http://www.mediafire.com/?gvarybah37n9w5x
Pikachu Edition: http://www.mediafire.com/?l7yu8871h9v20u0

Previews:
yaw5c29jl5j7mb9fg.jpg
1z5cd8122wmwfcafg.jpg
uu50vx55r57bqozfg.jpg
pfvlp7vgkdrwjb1fg.jpg
3k289r25ikt19ojfg.jpg
fghp12j3fea3rfwfg.jpg
gvarybah37n9w5xfg.jpg
19oo0k6ifcsq6k5fg.jpg

PS.: You have to rename the one you want to border.bmp and place it on the Root of your SD, as of now you can't select individual borders.
Nice :) When I make a new stable release I'll link to these in the first post, if you don't mind.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Xdqwerty @ Xdqwerty:
    also gonna install twilight menu in my r4 flashcard
  • Psionic Roshambo @ Psionic Roshambo:
    One thing that just occurred to me.... The sound on the 2600 sucked less back then the harsh sound we hear now is from infinitely better speakers we have now, back when the 2600 was new speakers produced a almost muffled sound, like CRTs made old graphics look slightly better.
  • Psionic Roshambo @ Psionic Roshambo:
    I wonder if I could recommend that to some emulation devs that perhaps the sound could use some smoothing out to simulate those old TVs
  • Psionic Roshambo @ Psionic Roshambo:
    I think a few of the early systems could benefit from that, at least up to the 8 bit generation, by the 16 bit generation I think TVs had gotten a lot better in almost every way
  • Xdqwerty @ Xdqwerty:
    i dont have an sd card adapter but I have an usb sd card adapter
  • K3Nv2 @ K3Nv2:
    Old people games
  • Xdqwerty @ Xdqwerty:
    its not the one that comes with the r4
  • Xdqwerty @ Xdqwerty:
    doesnt work (my flashcard is from r4isdhc.com)
  • Xdqwerty @ Xdqwerty:
    might install ysmenu first
  • Psionic Roshambo @ Psionic Roshambo:
    Try Wood firmware
  • Psionic Roshambo @ Psionic Roshambo:
    For your R4
  • Psionic Roshambo @ Psionic Roshambo:
    It's old but it's the best firmware out for DS stuff
  • Xdqwerty @ Xdqwerty:
    it says it only works for the original R4, R4i Gold (r4ids.cn), R4iDSN (r4idsn.com) and Acekard R.P.G.
  • Xdqwerty @ Xdqwerty:
    nvm it does support mine
  • Xdqwerty @ Xdqwerty:
    but why choose it over ysmenu @Psionic Roshambo?
  • Xdqwerty @ Xdqwerty:
    bc im stupid?
  • Xdqwerty @ Xdqwerty:
    yea ik im stupid
  • Xdqwerty @ Xdqwerty:
    good night
  • Psionic Roshambo @ Psionic Roshambo:
    Just give it a try, but honestly if you have a 3DS you can play DS games without a card just off the internal SD card
  • Psionic Roshambo @ Psionic Roshambo:
    Slightly slower loading but a bit more convenient
  • BakerMan @ BakerMan:
    guys, my fuckin headphones have an out of place speaker
  • K3Nv2 @ K3Nv2:
    Did you try wearing them?
    B @ btjunior: @Xdqwerty 16