code wiki / (root) / nx_pe_dll_d3d11.nx

nx_pe_dll_d3d11.nx

buildroot/runtime/nx_pe_dll_d3d11.nx

13847 B229 linesdepth 4pulls 7 transitivereach 0 importersview sourcekind tooltopic pe
docsdependenciesstructsconstsfunctions

about

nx_pe_dll_d3d11.nx -- the REAL game entry point. Superset of nx_pe_dll_id3d11: same data-driven 43-slot ID3D11Device vtable (compiled IUnknown+GetFeatureLevel bodies) PLUS the actual export D3D11CreateDeviceAndSwapChain (the literal first function a game calls). That export is MS-x64 glue that reads the out-params from the STACK (args 8-11 at [rsp+0x48..0x60] -- proving stack-arg access) and returns a STATIC device (real D3D allocates internally; a singleton static device in a new RW .data section is the honest minimal form). Verified against Microsoft's own PFN_D3D11_CREATE_DEVICE_AND_SWAP_CHAIN typedef so the arg->stack mapping comes from <d3d11.h>, not us. Method bodies = sovereign nx_cc NishiLang; vtable+glue = sovereign emitter (NO C++). ⚠static vtable/device baked @ fixed base 0x180000000 (.reloc TODO). Input /tmp/nishi_export_lib.s Output knowledge/nishi_d3d11.dll license_tier: ORIGINAL expect_exit: 0

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nxasm_x86.nx nx_pe_writer.nx nx_pe_dll_d3d11.nx

imports: nx_syscalls.nxnx_itoa_lib.nxnxasm_x86.nxnx_pe_writer.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main d11_puts sys_write sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_exit d11_assemble sys_mmap ↻ axc_pass axc_is_space axc_is_ident axc_apply_section axc_tok_is axc_cstr_len axc_is_space ↻ axc_is_ident ↻ axc_tok_is ↻ axc_emit_bytes axc_is_digit axc_parse_int axc_is_digit ↻ axc_parse_operand axc_is_space ↻ axc_is_ident ↻ axc_reg_num axc_tok_is ↻ axc_parse_int ↻ axc_is_digit ↻ axc_tok_is ↻ axc_emit axc_tok_is ↻ axc_alu x86_alu_imm x86_rex_w x86_modrm

structs

none

consts

14const N_SLOTS: i64 = 43

functions

16func d11_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
21func d11_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
22func d11_wstr(buf: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ buf[off+i]=s[i]; i=i+1 } buf[off+i]=0 as u8; return i+1 }
called by 1: d11_emit
24func d11_assemble(src: *u8, n: i64, out: *u8, out_cap: i64, names: *i64, offs: *i64, cnt: i64) -> i64
54func d11_thunk(buf: *u8, tco: i64, moff: i64) -> i64
called by 1: d11_emit calls 2: _w8_w32
68func d11_slot_method(slot: i64) -> i64
called by 1: d11_emit
76func d11_emit(buf: *u8, code: *u8, code_len: i64, offs: *i64) -> i64
183func main() -> i64