I don't think there's any objectively good solution to this perennial annoyance, so this is just some random thing that tries to tick the specific boxes I want ticked: simple to look at in the debugger; few/no casts during use; easy interop with existing C arrays; OK performance in an unoptimised build.
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
// This code is in the public domain. | |
using System; | |
using System.Collections.Generic; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Windows.Forms; | |
namespace Utils | |
{ | |
////////////////////////////////////////////////////////////////////////// |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text; | |
namespace minitags | |
{ | |
/// <summary> | |
/// ini file reader that can read from list of strings, which | |
/// unfortunately GetPrivateProfileString etc. won't. |
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
10REM>B.CHUNK3 | |
20: | |
30ONERRORMODE7:REPORT:PRINT" at line ";ERL:END | |
40: | |
50REM CLEAR MEMORY | |
60MODE2 | |
70: | |
80MODE5 | |
90: | |
100REM ENGAGE MODE 8 |
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
10REM>B.ADDRS | |
20: | |
30ONERRORMODE7:REPORT:PRINT" at line ";ERL:END | |
40: | |
50MODE6:HIMEM=&2F00 | |
60*FX154 0 | |
70*FX9 0 | |
80*FX10 1 | |
90?&FE00=1:?&FE01=32 | |
100PROCR(0,63) |
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
10REM>B.R62 | |
20ONERRORMODE7:REPORT:PRINT" at line ";ERL:END | |
30MODE7 | |
40*TV255 1 | |
50PROCASM | |
60: | |
70MODE2:MODE6:HIMEM=&5800 | |
80*FX154 0 | |
90*FX9 0 | |
100*FX10 1 |
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
////////////////////////////////////////////////////////////////////////// | |
////////////////////////////////////////////////////////////////////////// | |
// | |
// Read/Absolute,X | |
// | |
////////////////////////////////////////////////////////////////////////// | |
////////////////////////////////////////////////////////////////////////// | |
static void T1_R_ABX(M6502 *); | |
static void T2_R_ABX(M6502 *); |
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
(defun tom-layout () | |
(interactive) | |
(delete-other-windows) | |
(mmd-reset-major-mode-window-dedication) | |
(let (w) | |
(setq w (selected-window)) | |
(split-window-horizontally) | |
(split-window-horizontally) | |
(other-window 1) |
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
#include <shared/system.h> | |
#include "x11.h" | |
#include <X11/Xlib.h> | |
#include <X11/Xutil.h> | |
#include <X11/extensions/Xinerama.h> | |
#include <string.h> | |
#include <shared/log.h> | |
////////////////////////////////////////////////////////////////////////// | |
////////////////////////////////////////////////////////////////////////// |
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
////////////////////////////////////////////////////////////////////////// | |
////////////////////////////////////////////////////////////////////////// | |
// | |
// Read/Absolute | |
// | |
////////////////////////////////////////////////////////////////////////// | |
////////////////////////////////////////////////////////////////////////// | |
static void T1_R_ABS(M6502 *); | |
static void T2_R_ABS(M6502 *); |