Search found 211 matches

by mtheall
Wed Sep 04, 2024 6:17 pm
Forum: 3DS Development
Topic: Why is my Citro3D code not working
Replies: 3
Views: 1280

Re: Why is my Citro3D code not working

Code: Select all

C3D_DrawArrays(GPU_TRIANGLES, 0, sizeof(vertexList));

the last paramter is a count
try this

Code: Select all

C3D_DrawArrays(GPU_TRIANGLES, 0, sizeof(vertexList)/sizeof(vertexList[0]));
by mtheall
Sun Nov 05, 2017 11:20 pm
Forum: devkitARM
Topic: Template compilation error w GCC 7.1.0 (ambiguous overload)
Replies: 3
Views: 11959

Re: Template compilation error w GCC 7.1.0 (ambiguous overlo

I made some changes and this seems to work: #include <cstdint> #include <iostream> template <unsigned F> // changed F to unsigned struct fp { static_assert(F < 32); // assert shifts are valid constexpr static unsigned BITS = F; // change to constexpr static member instead of enum int32_t s; // to ...
by mtheall
Sun Mar 08, 2015 4:31 am
Forum: 3DS Development
Topic: V/G shader to properly generate rectangle from 1-2 vertices
Replies: 3
Views: 13671

Re: V/G shader to properly generate rectangle from 1-2 verti

This approach is simply not going to work for affine transformations. Your geoshader assumes that the two added vertices are axis-aligned with the two input vertices, which is simply not true for affine transformations (except for obvious cases like 90 degree rotation or horizontal flip, among ...
by mtheall
Fri Sep 06, 2013 3:48 pm
Forum: libfat
Topic: stat() no working properly on another dir than the CWD
Replies: 3
Views: 20582

Re: stat() no working properly on another dir than the CWD

Well, here is something similar. Make sure you are checking for errors! #include <stdio.h> #include <dirent.h> #include <sys/stat.h> #include <string.h> #include <unistd.h> int myReaddir(const char *Path) { static char path[PATH_MAX]; struct dirent *dent; struct stat st; DIR *dp; char *p, *end ...
by mtheall
Wed Aug 21, 2013 3:16 pm
Forum: devkitPPC
Topic: pipe functions
Replies: 2
Views: 14194

Re: pipe functions

This is probably popen creates a new process ('sort' in your case). I doubt there is process management from a homebrew perspective, let alone processes. In this specific case you may want to replace this code with an actual sort that doesn't rely on an external program. You said PARI/GP relies ...
by mtheall
Tue Jul 16, 2013 3:51 pm
Forum: DS/DSi Development
Topic: Garbage on top of screen when dissplaying text on background
Replies: 5
Views: 16299

Re: Garbage on top of screen when dissplaying text on backgr

There is no attachment. Can you provide the lines of code which set up VRAM and you backgrounds? You can also try to fill in this worksheet and provide a link to your configuration.
by mtheall
Tue Jul 16, 2013 3:32 pm
Forum: DS/DSi Development
Topic: Newb question, how to display text at x y location
Replies: 2
Views: 9174

Re: Newb question, how to display text at x y location

Well that's easy.

Code: Select all

iprintf("\x1b[%d;%dHRandom Text", locationx, locationy);
You may have to switch x and y. I don't remember which order it goes in.
by mtheall
Mon Feb 25, 2013 4:23 pm
Forum: DS/DSi Development
Topic: Problem Setting Up Backgrounds and VRAM
Replies: 4
Views: 13054

Re: Problem Setting Up Backgrounds and VRAM

This is sort of a duplicate of this post, but with these settings, but in this example VRAM_B is correctly mapped to account for going over the 128KB boundary. This setup should not be experiencing artifacts, so we may need more info about what you're doing (maybe paste the code where you're drawing ...
by mtheall
Mon Feb 25, 2013 4:14 pm
Forum: DS/DSi Development
Topic: Setting up VRAM banks
Replies: 3
Views: 13136

Re: Setting up VRAM banks

These are the settings you have, and these are probably the settings you want. In the first, you are going over the 128KB boundary, so this won't work unless you have VRAM_A and VRAM_B set to MAIN_BG. Notice how the map base for bitmap backgrounds is an offset into VRAM in 16KB chunks. The map base ...