This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Byte shenanigans, little endian | |
uint32_t p(uint32_t pix) { uint8_t argb[4]; argb[3-1]=pix>>24; argb[3-2]=pix>>16; argb[3-3]=pix>>8; argb[3-0]=pix>>0; return *(uint32_t*)argb; } | |
_Z1pj: # edi=1234 | |
mov eax, edi # edi=1234 eax=1234 | |
mov edx, edi # edi=1234 eax=1234 edx=1234 | |
shr eax, 24 # edi=1234 eax=0001 edx=1234 | |
shr edx, 16 # edi=1234 eax=0001 edx=0012 | |
sal eax, 16 # edi=1234 eax=0100 edx=0012 | |
mov ah, dl # edi=1234 eax=0120 edx=0012 | |
mov edx, edi # edi=1234 eax=0120 edx=1234 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assume DRAM is constant endian | |
u8[] DRAM = {1,2,3,4} | |
big endian | |
pix = *(int32_t *)(DRAM + addr); - pix = 1234 | |
argb[1 ^ BYTE_ADDR_XOR] = (unsigned char)(pix >> 24); - argb[1] = 1 | |
argb[2 ^ BYTE_ADDR_XOR] = (unsigned char)(pix >> 16); - argb[2] = 2 | |
argb[3 ^ BYTE_ADDR_XOR] = (unsigned char)(pix >> 8); - argb[3] = 3 | |
argb[0 ^ BYTE_ADDR_XOR] = (unsigned char)(pix >> 0); - argb[0] = 4, argb[]={4,1,2,3} | |
scanline[i] = *(int32_t *)(argb); - scanline = 4123 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html><html lang="en" data-cast-api-enabled="true"><head><script>var ytcsi = {gt: function(n) {n = (n || '') + 'data_';return ytcsi[n] || (ytcsi[n] = {tick: {},span: {},info: {}});},tick: function(l, t, n) {ytcsi.gt(n).tick[l] = t || +new Date();},span: function(l, s, e, n) {ytcsi.gt(n).span[l] = (e ? e : +new Date()) - ytcsi.gt(n).tick[s];},setSpan: function(l, s, n) {ytcsi.gt(n).span[l] = s;},info: function(k, v, n) {ytcsi.gt(n).info[k] = v;},setStart: function(s, t, n) {ytcsi.info('yt_sts', s, n);ytcsi.tick('_start', t, n);}};(function(w, d) {ytcsi.perf = w.performance || w.mozPerformance ||w.msPerformance || w.webkitPerformance;ytcsi.setStart('dhs', ytcsi.perf ? ytcsi.perf.timing.responseStart : null);var isPrerender = (d.visibilityState || d.webkitVisibilityState) == 'prerender';var vName = d.webkitVisibilityState ? 'webkitvisibilitychange' : 'visibilitychange';if (isPrerender) {ytcsi.info('prerender', 1);var startTick = function() {ytcsi.setStart('dhs');d.removeEventListener(vName, startTick);} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/libretro-v2.h | |
+++ b/libretro-v2.h | |
@@ -1890,18 +1890,32 @@ void retro_reset(struct retro_core_data *core_handle); | |
*/ | |
void retro_run(struct retro_core_data *core_handle); | |
+enum retro_serialize_type { | |
+ RETRO_SERIALIZE_TYPE_SRAM = 0, /* This refers to save data. */ | |
+ RETRO_SERIALIZE_TYPE_SAVESTATE, /* This refers to all internal core state. */ | |
+ |
NewerOlder