Search found 14 matches

by Tenry
Tue Oct 19, 2021 2:17 am
Forum: Switch Development
Topic: Emulator crash after eglCreateWindowSurface()
Replies: 1
Views: 8845

Re: Emulator crash after eglCreateWindowSurface()

I found the issue in my GLSL shader code I'm compiling after EGL initialization. The head of my GLSL shaders look like this: #version 430 core #line 1 "vertex_shader.glsl" ... I add "#line" statements into the shader code so in case of an error (on PC) I see the actual file and l...
by Tenry
Tue Oct 19, 2021 1:38 am
Forum: Switch Development
Topic: Emulator crash after eglCreateWindowSurface()
Replies: 1
Views: 8845

Emulator crash after eglCreateWindowSurface()

I am new to Switch homebrewing and I'm about to port my existing mini engine (originally written in C++ using SDL2 + OpenGL 4.3) to the Switch. It seems that I can not go with SDL2 + OpenGL (using my own OpenGL code), so I am following the existing examples using EGL + OpenGL. I am testing the build...
by Tenry
Sat Oct 15, 2011 1:54 pm
Forum: devkitARM
Topic: How to create position independent code for dynamic loading?
Replies: 0
Views: 4304

How to create position independent code for dynamic loading?

How can I create position independent code, which I may load dynamically into memory for use? That feature might be useful if I have to use a lot of memory for other things and don't have enough space for ALL functions being loaded in the same time.
by Tenry
Wed Jul 27, 2011 3:23 pm
Forum: DS/DSi Development
Topic: Reading/Writing Files
Replies: 17
Views: 19138

Re: Reading/Writing Files

you need to use a loader that supports argv. there are probably other ways to get this, but you can replace the default loader with HomebrewMenu and it will work. HomebrewMenu is not pretty (text only) but it is fast and functional. you can get it here: http://sourceforge.net/projects/devkitpro/fil...
by Tenry
Wed Jul 27, 2011 1:23 pm
Forum: DS/DSi Development
Topic: Reading/Writing Files
Replies: 17
Views: 19138

Re: Reading/Writing Files

The nitrofs thing is working now for me in Emulator, but trying to initialize it on the hardware (with DSTT) it always get stuck!
It's also the same problem using the nitrodir example.

What should I do? Do I have to live with that the rom internal filesystem will not work on my hardware?
by Tenry
Wed Jul 27, 2011 1:03 pm
Forum: DS/DSi Development
Topic: Reading/Writing Files
Replies: 17
Views: 19138

Re: Reading/Writing Files

The default arm7 initialises maxmod yes. Please use an arm9 only project template, custom arm7 code *will* cause you grief. Providing support for people who use custom arm7 code causes us so much grief that we're reluctant to do it. There are very few reasons why you would need to change the arm7 c...
by Tenry
Wed Jul 27, 2011 11:43 am
Forum: DS/DSi Development
Topic: Reading/Writing Files
Replies: 17
Views: 19138

Re: Reading/Writing Files

Hm, what do I have to change in which makefile to get files from a certain directory into my rom? Yes, I indeed have 3 makefiles, one for arm9, one for arm7 and the general one. And I don't want to change that structure, because some minor edits of the arm7 executable might be useful for me (I don't...
by Tenry
Wed Jul 27, 2011 1:17 am
Forum: DS/DSi Development
Topic: Reading/Writing Files
Replies: 17
Views: 19138

Re: Reading/Writing Files

have a look at the nitrodir example under filesystem/nitrofs - it adds files to nitrofs. Ah okay, that might solve my issue. Can I initialize fat AND nitrofs both in my project, so that I'm able to read nitrofs files and read/write fat files at any time? Would be fopen("test.txt", "r...
by Tenry
Tue Jul 26, 2011 11:49 am
Forum: DS/DSi Development
Topic: Reading/Writing Files
Replies: 17
Views: 19138

Re: Reading/Writing Files

Ah, I see, no support by emulators (like no$gba and DeSmuMe)? Okay, I've tested some code on my DS: if(!fatInitDefault()) printf("Init FAT: Error!\n"); else { FILE *fp = fopen("fat:/test.bin", "rb"); if(!fp) printf("Reading fat:/test.bin: Error!\n"); else { fc...
by Tenry
Mon Jul 25, 2011 9:07 pm
Forum: DS/DSi Development
Topic: Reading/Writing Files
Replies: 17
Views: 19138

Reading/Writing Files

How do I read and write files (using libfat)? I've searched all the internet, but I never can read or write a file. I use fatInitDefault(), and I linked to -lfat! It always returns false. Also, whenever using fopen() after "initializing" (with "test.txt" or "fat:/test.txt&qu...