News:

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

Main Menu

4x4 avatar version

Started by zedd151, March 30, 2025, 01:22:35 AM

Previous topic - Next topic

sinsi

I couldn't resist changing some code. I have been wanting to try SIMD and your 16-byte grid piqued my interest.
No idea if it works properly but it doesn't crash (and if I fiddle the board set up I can win with 1 move :eusa_dance: )

zedd151

Quote from: sinsi on April 02, 2025, 12:00:05 AMI couldn't resist changing some code. I have been wanting to try SIMD and your 16-byte grid piqued my interest.
No idea if it works properly but it doesn't crash (and if I fiddle the board set up I can win with 1 move :eusa_dance: )

C:\Users\Administrator\Downloads\4x4_avatar_version\4x4_avatar_version.asm(21) : error A2006: undefined symbol : xmmword
C:\Users\Administrator\Downloads\4x4_avatar_version\4x4_avatar_version.asm(21) : error A2175: invalid qualified type
C:\Users\Administrator\Downloads\4x4_avatar_version\4x4_avatar_version.asm(26) : error A2006: undefined symbol : xmmword
C:\Users\Administrator\Downloads\4x4_avatar_version\4x4_avatar_version.asm(26) : error A2175: invalid qualified type
C:\Users\Administrator\Downloads\4x4_avatar_version\4x4_avatar_version.asm(122) : error A2008: syntax error : xmm
C:\Users\Administrator\Downloads\4x4_avatar_version\4x4_avatar_version.asm(164) : error A2008: syntax error : xmm
C:\Users\Administrator\Downloads\4x4_avatar_version\4x4_avatar_version.asm(166) : error A2008: syntax error : xmm
C:\Users\Administrator\Downloads\4x4_avatar_version\4x4_avatar_version.asm(288) : error A2008: syntax error : xmm
_
Assembly Error

Quote from: sinsi on April 02, 2025, 12:00:05 AMI can win with 1 move

Happy April Fools day.  :biggrin:
¯\_(ツ)_/¯   :azn:

'As we don't do "requests", show us your code first.'  -  hutch—

sinsi

C:\asm\forum\zedd151\4x4_avatar_version>\asm\build32.bat 4x4_avatar_version windows
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.13.5
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x86'
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
Copyright (C) Microsoft Corporation.  All rights reserved.

Using codepage 1252 as default
Creating 4x4_avatar_version.res

4x4_avatar_version.rc.
Writing DIALOG:100,     lang:0x409,     size 72
Microsoft (R) Windows Resource To Object Converter Version 14.43.34809.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Microsoft (R) Macro Assembler Version 14.43.34809.0
Copyright (C) Microsoft Corporation.  All rights reserved.

 Assembling: 4x4_avatar_version.asm

***********
ASCII build
***********

Microsoft (R) Incremental Linker Version 14.43.34809.0
Copyright (C) Microsoft Corporation.  All rights reserved.


C:\asm\forum\zedd151\4x4_avatar_version>

zedd151

Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997.  All rights reserved.

 Assembling: C:\Users\Administrator\Downloads\4x4_avatar_version\4x4_avatar_version.asm

***********
ASCII build
***********

C:\Users\Administrator\Downloads\4x4_avatar_version\4x4_avatar_version.asm(21) : error A2006: undefined symbol : xmmword
C:\Users\Administrator\Downloads\4x4_avatar_version\4x4_avatar_version.asm(21) : error A2175: invalid qualified type
C:\Users\Administrator\Downloads\4x4_avatar_version\4x4_avatar_version.asm(26) : error A2006: undefined symbol : xmmword
C:\Users\Administrator\Downloads\4x4_avatar_version\4x4_avatar_version.asm(26) : error A2175: invalid qualified type
C:\Users\Administrator\Downloads\4x4_avatar_version\4x4_avatar_version.asm(122) : error A2008: syntax error : xmm
C:\Users\Administrator\Downloads\4x4_avatar_version\4x4_avatar_version.asm(164) : error A2008: syntax error : xmm
C:\Users\Administrator\Downloads\4x4_avatar_version\4x4_avatar_version.asm(166) : error A2008: syntax error : xmm
C:\Users\Administrator\Downloads\4x4_avatar_version\4x4_avatar_version.asm(288) : error A2008: syntax error : xmm
_
Assembly Error
Press any key to continue . . .
:eusa_dance:
¯\_(ツ)_/¯   :azn:

'As we don't do "requests", show us your code first.'  -  hutch—

sinsi

you   Microsoft (R) Macro Assembler Version 6.14.8444
me    Microsoft (R) Macro Assembler Version 14.43.34809.0

Try living in the 21st century  :biggrin:

zedd151

Quote from: sinsi on April 02, 2025, 12:24:40 AMyou  Microsoft (R) Macro Assembler Version 6.14.8444
me    Microsoft (R) Macro Assembler Version 14.43.34809.0

Try living in the 21st century  :biggrin:
Yes I do.  :eusa_dance:

¯\_(ツ)_/¯   :azn:

'As we don't do "requests", show us your code first.'  -  hutch—

sinsi

Quote from: zedd151 on April 02, 2025, 12:04:18 AMHappy April Fools day. 
You really are in the past eh? 2nd April here  :biggrin:

zedd151

Quote from: sinsi on April 02, 2025, 12:34:33 AM
Quote from: zedd151 on April 02, 2025, 12:04:18 AMHappy April Fools day. 
You really are in the past eh? 2nd April here  :biggrin:

:biggrin:
You could have also attached the .exe. I'm too lazy to swap ml for another.
¯\_(ツ)_/¯   :azn:

'As we don't do "requests", show us your code first.'  -  hutch—

sinsi


zedd151

Quote from: sinsi on April 02, 2025, 12:41:26 AMYour wish is my command :biggrin:
I would download it, but I can't run it on this iPad. I have relocated to the back porch.
¯\_(ツ)_/¯   :azn:

'As we don't do "requests", show us your code first.'  -  hutch—

zedd151

Back inside...


 :thumbsup:

It Verks...  :biggrin:
¯\_(ツ)_/¯   :azn:

'As we don't do "requests", show us your code first.'  -  hutch—

sinsi

You beaut :thumbsup:

It must be so much faster too, with all that SIMD code /s

zedd151

#27
Quote from: sinsi on April 02, 2025, 12:50:50 AMIt must be so much faster too, with all that SIMD code /s
:joking:  :rofl:  :joking:  :rofl:

Nah, I am just a faster player.  :tongue:

That is, the speed of game play is limited mostly by how fast a player can manipulate the arrow keys on the keyboard - largely negating any possible speed improvements in any other area of the code.  :toothy:
¯\_(ツ)_/¯   :azn:

'As we don't do "requests", show us your code first.'  -  hutch—

zedd151

Quote from: FORTRANS on April 01, 2025, 11:05:10 PMAnd note that, for me to get working code, it took quite some time and effort.

Of course I probably did a lot of rewriting to get an acceptable
program to play with.

And I tried all sorts of excursions along the way.
That is all part of the fun when trying new things in assembly for the first time.    :thumbsup:
¯\_(ツ)_/¯   :azn:

'As we don't do "requests", show us your code first.'  -  hutch—

sinsi

Have you considered different ways of painting?

Make 16 bitmaps, store the handles in an array for easy access. You are basically creating them every WM_PAINT anyway.

Draw the background and grid either once as a bitmap or in WM_PAINT then all you need to do is draw the numbers each paint.