-
Notifications
You must be signed in to change notification settings - Fork 2
Generating TDL on real hardware
ittaG ordnasselA edited this page Dec 13, 2017
·
2 revisions
For testing purposes it might be handy to check output generated by tevasm
against the original libogc implementation on real hardware.
To do so, change main.cpp
to have something like this:
const auto dsize = 0x10000;
void* displayList = memalign(32, dsize);
memset(displayList, 0, dsize);
DCInvalidateRange(displayList, dsize);
// Build display list
GX_BeginDispList(displayList, dsize);
/* PUT SHADER CODE HERE */
auto size = GX_EndDispList();
printf("Size: %d\nData: ", size);
auto data = static_cast<unsigned char*>(displayList);
for (int i = 0; i < size; ++i) {
printf("%02x ", data[i]);
}
printf("\n");
You might need to add these includes as well:
#include <malloc.h>
#include <string.h>
Then, connect an USBGekko and wait for the hex dump.