Recent Posts

Pages: [1] 2 3 ... 10
The Orphanage / Re: I'll be buying a new computer...
« Last post by zedd151 on Today at 08:43:13 AM »
I'm remembering that I was running windows xp sp3 and that consume only 48mb after initialization...

sounds a lot like mini xp, or similar bootable portable xp (bartpe for example)

Good old windows xp. Got a lot of flack in those days, but it was the most customizable and user friendly operating system.
It didn't complain too much if the user removed a lot of the bulk. (Except for operation 'critical' components)

While I never got xp as small as 48 mb, I did get it down to just under 400 MB. It booted fast in comparison to the default installation.
And restoring backups took hardly any time at all.

But now everyone has to deal with Windows 10 bloatware. But little by little, I'm working on that problem on my end with some success.
The Orphanage / Re: I'll be buying a new computer...
« Last post by mineiro on Today at 07:47:56 AM »
I generally try to kill some programs on memory to see what is need or not and feel the consequences. Try to kill scrcs.exe on windows xp and you will see that is not possible (even being admin). Well, it's possible (debug priviledges), but ... (blue screen). Because only I use the computer I don't need a lot of gifts to multiuser, disabled a lot of things.
When I started I was doing a 'dir /s ...'  to list all files on whole hard disk and redirecting output to a text file. After instaled a program and rebooted I was doing the same to another file. The difference between both text files are files inserted by the program. This is not good because instalation programs can delete some files, but I have started this way.
When I tried the same, exporting from registry to text files and comparing to see what was inserted I get in trouble. Regedit was not exporting all keys, have ones that are priviledged, this is how I look to monitors. I carry with me until today old 'windiff' program, so I only need look for colours, red and yellow, this program show difference by lateral bar colors.
This way that I'm talking here is valid to any O.S., but as you can see have faults because are not monitors.
I'm remembering that I was running windows xp sp3 and that consume only 48mb after initialization; well, I stay more than one week erasing, disabling things.
The Campus / Re: converting 32 bit code to 64 bit
« Last post by zedd151 on Today at 07:28:27 AM »

Code: [Select]

    include \masm32\include64\


    entry_point proc
    invoke MessageBox,0,"Hello World","Title",MB_OK
    invoke ExitProcess, 0
    entry_point endp

disassembles to this: (x64dbg.exe)

Code: [Select]

00007FF60F181000 | enter 80,0                                |
00007FF60F181004 | sub rsp,60                                |
00007FF60F181008 | mov rcx,0                                 |
00007FF60F18100F | mov rdx,qword ptr ds:[7FF60F18306C]       | rdx:EntryPoint, 00007FF60F18306C:&"Hello World"
00007FF60F181016 | mov r8,qword ptr ds:[7FF60F183086]        | 00007FF60F183086:&"Title"
00007FF60F18101D | mov r9,0                                  | r9:EntryPoint
00007FF60F181024 | call qword ptr ds:[<&MessageBoxA>]        |
00007FF60F18102A | mov rcx,0                                 |
00007FF60F181031 | call qword ptr ds:[<&ExitProcess>]        |

00007FF60F183000  0D 0A 00 00 30 18 0F F6 7F 00 00 0D 0A 00 0B 30  ....0..ö.......0 
00007FF60F183010  18 0F F6 7F 00 00 09 00 16 30 18 0F F6 7F 00 00  ..ö......0..ö... 
00007FF60F183020  22 00 20 30 18 0F F6 7F 00 00 3C 00 2A 30 18 0F  ". 0..ö...<.*0.. 
00007FF60F183030  F6 7F 00 00 3E 00 34 30 18 0F F6 7F 00 00 21 00  ö...>.40..ö...!. 
00007FF60F183040  3E 30 18 0F F6 7F 00 00 28 00 48 30 18 0F F6 7F  >0..ö...(.H0..ö. 
00007FF60F183050  00 00 29 00 52 30 18 0F F6 7F 00 00 00 00 00 00  ..).R0..ö....... 
00007FF60F183060  48 65 6C 6C 6F 20 57 6F 72 6C 64 00 60 30 18 0F  Hello World.`0.. 
00007FF60F183070  F6 7F 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ö............... 
00007FF60F183080  54 69 74 6C 65 00 80 30 18 0F F6 7F 00 00 00 00  Title..0..ö..... 

So, the converting of the arguments to registers is automatically done by the ?? preprocessor?
And what about the text strings, how and when are they put into the data section. I don't
fully understand.

Ooops, I see that I didn't put a "ret"
The Workshop / Re: My third 64 bit console app...
« Last post by mineiro on Today at 07:07:53 AM »
When program is loaded on memory rsp have a value ???????8h, we need subtract 1*8 bytes to align to a multiple of 16, so rsp == ???????0, now we can 'call' an external function (non leaf).
Next is necessary reserve space to shadow space (rcx,rdx,r8,r9), 4*8.
Next is to a function that use more parameters inside your procedure (ReadConsole) that need 1 argument on stack == 1*8.
Sub rsp, 1*8+4*8, so 1(parameter)+4(shadow) == 5, stack aligned (odd + odd rsp == even), it's ok. If even, you can do your own way or just add 8 to that value.
Again, at start of your procedure after you alloc memory to shadow space you can store rcx,rdx,... into that memory variables, not sure if this helps a diagnosis when program have a fault but we ignore that (Exception handler?).

When you push that value you're going from even (???????0) to odd (???????8), any values are ok to a leaf function, but function that call other functions gets in trouble.

edited --- odd and even :)
The Workshop / Re: My third 64 bit console app...
« Last post by felipe on Today at 06:58:49 AM »
Thanks again.  :icon14:
MASM64 SDK / copy to bin64 batch file
« Last post by zedd151 on Today at 06:26:27 AM »
batch file to simplify moving MS binaries to bin64 folder

Code: [Select]
rem modify paths for your system/folders
rem example: set inpath="D:\x64\bin64"
rem example: set outpath="C:\masm32\bin64"

set inpath="..."
set outpath="..."

set inpath1033="..."
set outpath1033="..."

xcopy %inpath%\cvtres.exe %outpath% /hrky
xcopy %inpath%\dumpbin.exe %outpath% /hrky
xcopy %inpath%\editbin.exe %outpath% /hrky
xcopy %inpath%\lib.exe %outpath% /hrky
xcopy %inpath%\link.exe %outpath% /hrky
xcopy %inpath%\link.exe.config %outpath% /hrky
xcopy %inpath%\ml64.exe %outpath% /hrky
xcopy %inpath%\msobj140.dll %outpath% /hrky
xcopy %inpath%\mspdb140.dll %outpath% /hrky
xcopy %inpath%\mspdbcmf.exe %outpath% /hrky
xcopy %inpath%\mspdbcore.dll %outpath% /hrky
xcopy %inpath%\mspdbsrv.exe %outpath% /hrky
xcopy %inpath%\mspdbst.dll %outpath% /hrky
xcopy %inpath%\mspft140.dll %outpath% /hrky
xcopy %inpath%\msvcdis140.dll %outpath% /hrky
xcopy %inpath%\msvcp140.dll %outpath% /hrky

xcopy %inpath1033%\bscmakeui.dll %outpath1033% /hrky
xcopy %inpath1033%\clui.dll %outpath1033% /hrky
xcopy %inpath1033%\cvtresui.dll %outpath1033% /hrky
xcopy %inpath1033%\linkui.dll %outpath1033% /hrky
xcopy %inpath1033%\LocalESPCui.dll %outpath1033% /hrky
xcopy %inpath1033%\mspdbcmfui.dll %outpath1033% /hrky
xcopy %inpath1033%\mspft140ui.dll %outpath1033% /hrky
xcopy %inpath1033%\pgort140ui.dll %outpath1033% /hrky
xcopy %inpath1033%\pgoui.dll %outpath1033% /hrky

Filenames taken directly from hutch's list of files needed (Microsoft_File_List.txt)
Will need to change paths as necessary for your system/masm64 path...

The Orphanage / Re: I'll be buying a new computer...
« Last post by zedd151 on Today at 05:11:35 AM »
For those who would like more details for what I have done already...

 The changes I have made to the clean installation of Windows 10 Home:

To enable the hidden "Administrator" account in Windows 10 Home, from an elevated command prompt (run as administrator):

Code: [Select]

Net user administrator /active:yes

To set a password for "Administrator", from an elevated Command Prompt:

Code: [Select]

Net Users Administrator *

and hit Enter. Now you will see new line to type a new password for administrator - and your new Administrator account is all set and ready on the next reboot.

Enabling "Group Policy Editor" in the Home version create a .bat file with the following:

Code: [Select]

@echo off
pushd "%~dp0"
dir /b C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >Files.txt
dir /b C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum >>Files.txt
echo Installing Group Policy Editor...
for /f %%i in ('findstr /i . Files.txt 2^>nul') do dism /online /norestart /add-package:"C:\Windows\servicing\Packages\%%i"
echo Installation complete.

Run from an elevated command prompt. (run as administrator)

Using the above, you enable the Group Policy Editor in Windows 10 Home Edition (8 & 7 too, I believe), which is not enabled by default in the Home version.


The other good thing to use is Easy Context Menu <-- direct download link.
With this program, you can add to the right click context menu "Copy to Folder...", "Move to Folder...",
 and my favorite "Take Ownership", which allows you to delete/change files or folders blocked by "SYSTEM" or "TRUSTEDINSTALLER", plus many
other tweaks.

As a cautionary note: DO NOT MAKE THESE CHANGES unless you have a backup of your system,
and secondly don't do it unless you know what you are doing.

The "Administrator" account enabling is well documented in many places on the internet.

The enabling of "Group Policy Editor" is also well documented...


The other changes I have made to MY SYSTEM will not be posted here. Any changes you make
to  Your System are solely your responsibility.


Game Development / Re: dinofun (more gdi testing)
« Last post by daydreamer on Today at 04:59:59 AM »
hi, yep. It starts with an ascII file for each map. It’s then parsed and compressed by code. When loaded, we have this big array of 0/1. 0 for vaild spaces, 1 for forbiden terrain.

it’s in fact an array of pointers under the hood.

The collision detection is simple, once we convert the xy screen coordinates and compare with what there is in the array for that spot.

It’s slightly harder for my plane’s bullets, since they travel upwards, while the map scrolls downwards. But it’s just simple maths and comparing areas for intersection.

jumping is rather easy too. I usually do as Daydreamer already said.
Thanks for sharing
The Laboratory / Re: VMOVQ vs VMOVAPS
« Last post by johnsa on Today at 04:28:15 AM »
Found the problem.. FYI, it's not the vmovaps so much that was causing the issue but rather the subsequent two vmovq writes to the same memory location. This must have caused some sort of partial stall on the vmovaps read waiting for both writes to complete, now that it's replaced with a vmovaps to store as well the write and read complete as expected and the performance is where it should be.
The Orphanage / Re: I'll be buying a new computer...
« Last post by zedd151 on Today at 04:24:28 AM »
Hello zedd;
..... Other way is that you can create an image of your hard disk as a backup......

That is the method I use. Drive Snapshot Works well, so if I change anything either inadvertently or not, I can always revert to the way it was before.

I don't keep personal files and/or folders on my C: drive anymore, so the way I keep the backup copy now is perfect for me.

Thanks for the other tips. And yes, I have tamed the Windows 10 beast and killed all sorts of reporting back to Micros**t.   :biggrin: And the system is running well.

One thing that I want to try is creating an image using Dism.exe offline, using this method according to the documentation I have read, I should be able to remove "packages" to create a custom OS install. More on that later when I get up the b***s to try it.  :P  If that works out well, it should help in reducing the overall size of the OS. But research must be done first to avoid removing "System Critical" packages. I will post a detailed (somewhat) accounting of those proceedings if/when I decide to try it.
Pages: [1] 2 3 ... 10