Homebrew Homebrew Development

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,035
Country
United States
I'm currently experimenting with 3D graphics and I faced a really wired problem. After hours I got my code to work. It renders what it should render, but some triangles flicker and move around, but only on real hardware, with Citra it works perfectly. Then I reduced the polygon count to just a cube and after seperating the projection and the modelview matrix uniform instead of multiplying them on the CPU solved the problem on real hardware.

But after changing back to the model I used before it still doesn't work. The setup with the cube and with the other model is exactly the same. I already dumped all data to files and analyzed which triangles flicker but they are valid and as metioned before it works as it should with Citra.

So what could be the problem, I don't know what to do?
Without source code it is mostly guess work. Citra will happily display many things that are invalid on hardware.
 

catlover007

Developer
Developer
Joined
Oct 23, 2015
Messages
722
Trophies
1
XP
3,982
Country
Germany
https://gist.github.com/RSDuck/66632a88b238fb917b7918b8a0fead94
Yes, it is part of a Minecraft clone
EDIT: I added the shader to the gist and here is a screenshot:
Wte5bMr.png
 
Last edited by catlover007,

catlover007

Developer
Developer
Joined
Oct 23, 2015
Messages
722
Trophies
1
XP
3,982
Country
Germany
I actually found the problem by myself(Yesterday I already spend hours on this problem). The source of the problem was that I wrote two times two the same output register.

This fixed the problem:
Code:
mov r1, inclr
mov r1.w, ones

mov outclr, r1
Another wired thing related to Picasso is this:
Code:
mov outclr.xyz, inclr
mov outclr.w, ones
This works depending on the instruction before.

The PICA200 is a really weired GPU.
 

YugamiSekai

Mr. Picross
Member
Joined
Dec 24, 2014
Messages
2,015
Trophies
1
Age
22
XP
2,387
Country
United States
Also I (might be) working on a rhythm game homebrew. Is there any way to implement a timing system in C or do I need a separate file type like Project Mirai's DSC?
 

Hayleia

Well-Known Member
Member
Joined
Feb 26, 2015
Messages
1,485
Trophies
0
XP
1,294
Country
France
Also I (might be) working on a rhythm game homebrew. Is there any way to implement a timing system in C or do I need a separate file type like Project Mirai's DSC?
Not sure if that's what you're looking for but you can have a look at osGetTime. It returns the number of milliseconds since a certain date, so you can easily know the number of milliseconds since the music started for example.
 

catlover007

Developer
Developer
Joined
Oct 23, 2015
Messages
722
Trophies
1
XP
3,982
Country
Germany
Here I am again still writing a Minecraft clone(it's already open source: https://github.com/RSDuck/Craftus3DS).

And I encountert a even more weired issue. After walking a little bit in the world a few triangles just don't render. It isn't even hard to imagine they just don't render, which one depend on the view angle. I already double checked the shader, there shouldn't be the problem.
After I started to flush the buffers in linear heap the flickering was reduced but not completely removed. You can try it by yourself the code in the repo should compile.

If it can't be removed it wouln't be too bad, but it is distracting. All relevant code should be here: https://github.com/RSDuck/Craftus3DS/tree/master/source/craftus/render

EDIT: I noticed several things:
First of all the triangle flickering happends with 3D disabled much less.
The second thing is when I changed the rendering part that it renders every cluster(a vertical slice of a chunk with the size of 16x16x16 blocks) in a seperate draw call instead of drawing all cluster of a chunk with one(see here: https://gist.github.com/RSDuck/5f4ca6d8a75fe0af5c9318bf60d5ce07) it removed the flickering when 3D is disabled completely.
 
Last edited by catlover007,

catlover007

Developer
Developer
Joined
Oct 23, 2015
Messages
722
Trophies
1
XP
3,982
Country
Germany
I managed to solve the problem by myself, it seem to be a problem with Citro3D(maybe a bug), because when I switched from the new renderqueue system to the old render buffer system it works exactly as it should

EDIT: After submitting an issue on Citro3D and chatting with fincs the orgin of the problem was that I modified the vertex data outside(!) C3D_FrameBegin and C3D_FrameEnd. Writing outside of this range leads to corrupted data, because Citro3D let the GPU work when you don't give commands and modifiying vertex data while it gets read by the GPU gives this whole problem.
 
Last edited by catlover007,

Zingzo

Member
Newcomer
Joined
Jul 30, 2016
Messages
7
Trophies
0
Age
31
XP
88
Country
Norway
Hi! =) I'm new to this forum, so I'm not sure where to post this, but I hope I can post this here, if not please let me know and guide me to the right place.
I-m having some problems and question regarding browserhax. I have just installed it and gotten it to work on my 3ds, but the problem is, and this is where I feel lost. I want to back up my digital version of Pokemon Yellow, I have tried JKSM savemanager, but where I choose pokemon Yellow I get a red bottom screen and it freezes. I'm using version 11. I would appreciate it so much if anyone could help me or guide me. =)
 

erman1337

Well-Known Member
Member
Joined
Sep 27, 2015
Messages
1,211
Trophies
0
Location
Brussels
XP
983
Country
Belgium
Hi! =) I'm new to this forum, so I'm not sure where to post this, but I hope I can post this here, if not please let me know and guide me to the right place.
I-m having some problems and question regarding browserhax. I have just installed it and gotten it to work on my 3ds, but the problem is, and this is where I feel lost. I want to back up my digital version of Pokemon Yellow, I have tried JKSM savemanager, but where I choose pokemon Yellow I get a red bottom screen and it freezes. I'm using version 11. I would appreciate it so much if anyone could help me or guide me. =)
wrong place to post this, this is about developement of such apps. you could try another save manager
 

yodamerlin

Bok bok.
Member
Joined
Apr 1, 2014
Messages
322
Trophies
0
XP
1,050
Country
United Kingdom
It's been a while since I last had a look at the Homebrew scene. What's the recent news? And it seems that people are moving away from userland, is that an actual trend, or is it that the front page is biased towards cia only?
 

YugamiSekai

Mr. Picross
Member
Joined
Dec 24, 2014
Messages
2,015
Trophies
1
Age
22
XP
2,387
Country
United States
Trying to compile a citro3d homebrew, I get messages saying that some functions are undefined references even though I just updated it. Is there a fix?
 

nop90

Well-Known Member
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,136
Country
Italy
Trying to compile a citro3d homebrew, I get messages saying that some functions are undefined references even though I just updated it. Is there a fix?

There is always a fix but you need to be more specific.

With your information I can only say that:
  • if the error is from the compiler than you miss some #include statements, or you added the functions without defining them in a header file, or your makefile doesn't define the correct include directory
  • if the error is from the linker, you missed to link some libraries in the makefile, or you mixed c and cpp files without calling correctly the linker/compiler
There are a lot of other things that can go wrong, but these in my experience are the first to check with such an error.

For a better answer you should upload your code somewher (e.g. github) and let us check it.
 
  • Like
Reactions: YugamiSekai

randomdev

Well-Known Member
Member
Joined
Jun 7, 2015
Messages
155
Trophies
0
XP
236
Country
Brazil
Hi, I'd like to know what's your preference between new and original 3ds for homebrew, and hacking in general.
i know that some things aren't compatible with N3ds but works on o3ds (like downgrading, which can be more difficult), and n3ds has better performances.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: @light27, did you reincarnate?