On Saturday, 16 April 2022 at 20:36:12 UTC, Adam Ruppe wrote:
__gshared ubyte[] framebuffer = (cast(ubyte*) 0) [0 .. 16320];
ubyte[] framebuffer() { return (cast(ubyte*) 0) [0 .. 16320]; }
Thank you, Adam.
I'll go with both, as existing examples in other languages use
pointer arithmetic.
N
On Saturday, 16 April 2022 at 14:29:09 UTC, Pierce Ng wrote:
```
pub const FRAMEBUFFER: *allowzero volatile [16320]u8 =
@intToPtr(*allowzero volatile [16320]u8, 0);
pub const TILES : *[8192]u8 = @intToPtr(*[8192]u8, 0x4000);
pub const SPRITES : *[8192]u8 = @intToPtr(*[8192]u8, 0x6000);
```
I b