View actraiser_wip_msu1.asm
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
arch snes.cpu | |
// MSU memory map I/O | |
constant MSU_STATUS($2000) | |
constant MSU_ID($2002) | |
constant MSU_AUDIO_TRACK_LO($2004) | |
constant MSU_AUDIO_TRACK_HI($2005) | |
constant MSU_AUDIO_VOLUME($2006) | |
constant MSU_AUDIO_CONTROL($2007) |
View rawobjcopy.zig
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
const Allocator = @import("std").mem.Allocator; | |
const ArenaAllocator = @import("std").heap.ArenaAllocator; | |
const ArrayList = @import("std").ArrayList; | |
const File = @import("std").fs.File; | |
const HeapAllocator = @import("std").heap.HeapAllocator; | |
const elf = @import("std").elf; | |
const fs = @import("std").fs; | |
const io = @import("std").io; | |
const sort = @import("std").sort; |
View Result_PC
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
fixed=2048 | |
fixed2=640 | |
result=3.51 / 819 |
View win32_helloworld.zig
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
usingnamespace @import("std").os.windows; | |
extern "user32" fn MessageBoxA(hWnd: ?HANDLE, lpText: ?LPCTSTR, lpCaption: ?LPCTSTR, uType: UINT) callconv(.Stdcall) c_int; | |
pub export fn WinMain(hInstance: ?HINSTANCE, hPrevInstance: ?HINSTANCE, lpCmdLine: ?LPWSTR, nShowCmd: INT) callconv(.Stdcall) INT { | |
_ = MessageBoxA(null, "Zig is pretty great!", "Wow much exposure", 4); | |
return 0; | |
} |
View com_call.zig
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
fn comFindReturnType(comptime vTableType: type, comptime name: []const u8) type { | |
for (@typeInfo(vTableType).Struct.fields) |field| { | |
if (std.mem.eql(u8, field.name, name)) { | |
const funcType = @typeInfo(@typeInfo(field.field_type).Optional.child); | |
return funcType.Fn.return_type.?; | |
} | |
} | |
return void; | |
} |
View final_result.zig
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
fn findImageFormat(inStream: *ImageInStream, seekStream: *ImageSeekStream) !ImageFormat { | |
const allFuncs = comptime blk: { | |
// TODO: Use ArrayList when Zig support compile-time allocator | |
var result:[16]fn(inStream: *ImageInStream, seekStream: *ImageSeekStream) anyerror!ImageFormat = undefined; | |
var index:usize = 0; | |
inline for (std.meta.declarations(AllImageFormats)) |decl| { | |
switch(decl.data) { | |
.Type => |entryType| { | |
const entryTypeInfo = @typeInfo(entryType); | |
if (entryTypeInfo== .Struct) { |
View debug_ir.log
This file has been truncated, but you can view the full file.
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
; ModuleID = 'test' | |
source_filename = "test" | |
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-unknown-linux-gnu" | |
%"[]u8" = type { i8*, i64 } | |
%std.builtin.StackTrace = type { i64, %"[]usize" } | |
%"[]usize" = type { i64*, i64 } | |
%std.target.LinuxVersionRange = type { %std.builtin.Range, %std.builtin.Version } | |
%std.builtin.Range = type { %std.builtin.Version, %std.builtin.Version } |
View d3d11.zig
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
const DxContext = struct { | |
device: ?*dx.ID3D11Device = null, | |
deviceContext: ?*dx.ID3D11DeviceContext = null, | |
swapChain: ?*dx.IDXGISwapChain = null, | |
mainRenderTargetView: ?*dx.ID3D11RenderTargetView = null, | |
}; | |
var dxContext: DxContext = undefined; |
View build.json
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
{ | |
"os": "windows", | |
"libraries": [ | |
"c", | |
"d3d12", | |
"dxgi", | |
"d3dcompiler", | |
"dxguid" | |
], | |
"include_dirs": [], |
View zig_d3d12.zig
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
const std = @import("std"); | |
const win32 = @import("win32.zig"); | |
const d3d12 = @import("d3d12.zig"); | |
const dxgi = @import("dxgi1_4.zig"); | |
const d3dcompiler = @import("d3dcompiler.zig"); | |
const windows = std.os.windows; | |
const L = std.unicode.utf8ToUtf16LeStringLiteral; |
OlderNewer