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,565
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
866
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,565
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.
    cearp @ cearp: Welcome hazbeans