News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Recent posts

#1
Game Development / Re: Thick Anti-Aliased Lines o...
Last post by HSE - Today at 04:42:59 AM
Hi Biterider!

Quote from: Biterider on September 08, 2024, 08:47:09 PMI noticed that the line endpoints are always cut vertically.

:biggrin:  :biggrin:  Not really. "steep" lines ends horizontally (magenta line in the test)

Quote from: Biterider on September 08, 2024, 08:47:09 PMPerhaps a more flexible approach...
Maybe we can save some cycles ...

Line ends are a problem. Connections can look with "bites" when ends change between vertical and horizontal  :biggrin:

In the program from 2018, a trick (or "balls"  :biggrin: ) was enough:
 


Now I have to solve "bites" without "balls". This Thick Xiaolin-Wu will not solve connections, then I'm thinking in a different approach, probably very slow.

HSE
#2
Game Development / Re: Thick Anti-Aliased Lines o...
Last post by Biterider - September 08, 2024, 08:47:09 PM
Hi HSE
I noticed that the line endpoints are always cut vertically.
Perhaps a more flexible approach would be to make both ends configurable: vertical, horizontal or perpendicular to the line direction, so that we can better adjust the line connections.

I had another thought about performance. Maybe we can save some cycles on really thick lines by treating the boundaries and the interior separately. What do you think?

Biterider
#3
Game Development / Re: Thick Anti-Aliased Lines o...
Last post by NoCforMe - September 08, 2024, 03:59:47 AM
Quote from: HSE on September 07, 2024, 11:39:22 PMTo build an application that show results in DebugCenter are used a couple of includes and a library, like for any debug system.

My own debugger, LogBuddy, uses a couple of includes and a DLL; no need to link in anything special. Except for a little stub in the debugee, all the code is in the DLL. Is that how DebugCenter works too?
#4
Game Development / Re: Thick Anti-Aliased Lines o...
Last post by HSE - September 07, 2024, 11:48:01 PM
Hi Biterider!

Quote from: Biterider on September 07, 2024, 03:57:16 PMIt comes in very handy

:thumbsup: At least an additional graphic option.

HSE
#5
Game Development / Re: Thick Anti-Aliased Lines o...
Last post by HSE - September 07, 2024, 11:39:22 PM
Quote from: NoCforMe on September 07, 2024, 12:39:51 PMI don't use ObjAsm.

To build an application that show results in DebugCenter are used a couple of includes and a library, like for any debug system.

But to see results from that applications only DebugCenter.exe is needed.

This is not the case. I just was checking some internal values.
#6
The Campus / Re: How would yall write this ...
Last post by lemonjumps - September 07, 2024, 10:12:44 PM
OK, so I'm working on optimizing my code, and I realized two things.

1. the list of variables is basically the same format as stack, so just treating it as one shouldn't be a problem
2. since volatile registers don't matter, only when there's a parameter for a function, I can just write values into both XMM and normal registers, and the called function will just pick whichever it wants.

The code is still lengthy since I have versions for 1,2,3,4+ parameters as that looks to be the simplest and fastest solution :D
Also I wonder if it's faster to call both pop and movsd or to have cmp with pointer math.

here's what my code looks like now OwO
pinADcallWIN:
    push rbp
    push r11
    push r12
    push r13
    push r14
    push r15
    mov rbp, rsp

    cmp r9, 1
    je _winCall1
    cmp r9, 2
    je _winCall2
    cmp r9, 3
    je _winCall3
   
    jmp _winCall4p

_winCall1:
    mov rsp, rdx

    movsd xmm0, qword ptr [rsp]
    pop r11

    mov rsp, rbp
    jmp __winCall

_winCall2:
    mov rsp, rdx

    movsd xmm0, qword ptr [rsp]
    pop r11
    movsd xmm1, qword ptr [rsp]
    pop r12

    mov rsp, rbp
    jmp __winCall

_winCall3:
    mov rsp, rdx

    movsd xmm0, qword ptr [rsp]
    pop r11
    movsd xmm1, qword ptr [rsp]
    pop r12
    movsd xmm2, qword ptr [rsp]
    pop r13

    mov rsp, rbp
    jmp __winCall

_winCall4p:
    mov rsp, rdx

    movsd xmm0, qword ptr [rsp]
    pop r11
    movsd xmm1, qword ptr [rsp]
    pop r12
    movsd xmm2, qword ptr [rsp]
    pop r13
    movsd xmm3, qword ptr [rsp]
    pop r14

    mov rsp, rbp

    sub r9d, 4
    jz __winCall

    add rdx, 24
    imul r9, 8
    mov r15, r9

__winCallLoop:
    push qword ptr [rdx + r9]
    sub r9d, 8
    jnz __winCallLoop

__winCall:
    mov rax, rcx
    mov rcx, r11
    mov rdx, r12
    mov r8, r13
    mov r9, r14

    sub rsp, 32

    call rax

    add rsp, r15
    add rsp, 32

    pop r15
    pop r14
    pop r13
    pop r12
    pop r11
    pop rbp
    ret
#7
UASM Assembler Development / Re: Use the MOV instruction to...
Last post by six_L - September 07, 2024, 05:30:58 PM
you are digging the bugs of compiler, not learning the assembler language.
Come on!
the TAIWAN's frog is sitting on well and talking the vastness of sky.
#8
Game Development / Re: Thick Anti-Aliased Lines o...
Last post by Biterider - September 07, 2024, 04:06:50 PM
Hi NoCforMe
DebugCenter is a harmless debugging tool written using ObjAsm, but can be used in any other programming environment.
It is open source so you can check it out.
You do not need the framework it was written with, nor any knowledge of it.

I added a separate link in the ObjAsm section some time ago for quick access if anyone wants to try it out.
https://masm32.com/board/index.php?topic=10610.0

Biterider



#9
Game Development / Re: Thick Anti-Aliased Lines o...
Last post by Biterider - September 07, 2024, 03:57:16 PM
Hi HSE
It works absolutely fine.
It comes in very handy. It is one of the features I have been looking for for some time.  :thumbsup:

Regards, Biterider
#10
Game Development / Re: Thick Anti-Aliased Lines o...
Last post by NoCforMe - September 07, 2024, 12:39:51 PM
Says ObjAsm. I don't use ObjAsm.