Bare metal programming

very yes

we'll see. I'm really not doing anything advanced here.

I thought TempleOS was bare metal 4 everyone on amd64?

I only now realized, that this board doesn't have IDs lol.

Just to add a bit more, I'm not using any BIOS functions except for loading from floppy and going into [email protected]/* */ graphics mode. Then I go into protected mode and all my code is 32bit. I'm using PIT to generate interrupt at ~1000Hz to have a timer and a keyboard interrupt. I don't see how could this break, those are all essentials. But we'll see, I wouldn't be surpriced if there would be some discrepancies... I also need to make it bootable from CD. I think that's the safeset way of booting on a modern PC. I don't want to use GRUB or any other loader lile that, because those load an ELF straight into the protected mode. This is just a stupid idea I've got few days ago. I'm collecting all my past projects, so I can show it on my resume. The best thing I've done (although i was lile 15-17 when I coded it, so it's not vety pretty) was a dynamic library for a certain mmo server side executable fixing a lot of bugs and adding new features. Said server was runnimg on BSD, so I had to learn some basics of *nix, that also helped me a lot with abandoning windows and going GNU/Linux

I think this is my first time I called it GNU/Linux

templeOS itself is a bare metal software, lile any other OS (or the kernel at least). If you code for the TempleOS I'd argue that it's not bare metal anymore, but still very close

so thats what wizards do after they completely give up on life?, sounds neat

I'm on a chan, whadda you expect ?

This sort of shit earned me my first house.

Well as I said, this is a small project to boost my resume. I need some actual working stuff, since I didn't finish any computer school. The library that I mentioned before... I don't know if I want to show that on my CV. The private servers for this MMO are illegal and people are making tons of money on them (including me couple of years ago) so idk if I want to admit to doing that. At the same time, it's quite big and it does a lot of cool stuff and I'm proud of it.

I also made several cheats for that game, do you think I should show it ? Here's a random snippet of one of them
extern "C" void __declspec( naked ) CreateInstanceHook_asm(){ __asm { pushad push esi call CreateInstanceHook_c add esp, 4 test eax, eax jz DontRenderLabel popad mov eax, [esi + 20] push edi push eax push 0x0042B32B ret // if the code jumps to this address // it will render the actor he found. // the jump below (0x0042B351 skips the rendering) // so the map will look empty, even though client // has received the packet about all the actors. // the function above (CreateInstanceHook_c) can // put these actors to some array if needed.DontRenderLabel: popad xor eax, eax push 0x0042B354 ret }}extern "C" void __declspec( naked ) OnSelectPhase(){ __asm { mov gSelectPhase, 1 push 0x5B71B0 push 0x420F68 ret }}extern "C" void __declspec( naked ) ONGamePhase(){ __asm { mov gGamePhase, 1 mov gSelectPhase, 0 push 0x5B6B38 push 0x0041D139 ret }}extern "C" void __declspec( naked ) ONLeaveGamePhase(){ __asm { mov gGamePhase, 0 mov first_vid, 0 mov byte ptr [esi + 0x7B3D],0 push 0x00418006 ret }}extern "C" void __declspec( naked ) SetPixelPosition(DWORD* pos){ /* SetPixelPosition will put your character (or any actor, but this funcion has a fixed pointer to main character) on a certain coordinants on the map. It's basically a teleporter funtion, the problem is, though, that the server checks if the character moves to fast, so you can only jump by 20k units before the server will send you back (and leave some log about the hack for sure). It can be countered very easely, all you have to do is loop the SetPixelPosition with 10/20k jump in a loop with 10-50 ms cooldown. That basically makes a "slow" teleporter (which is still faster than normal walking of course) */ __asm { push ebp mov ebp, esp push ebx push ecx // push ecx to preserve it sub esp, 20 mov ebx, [ebp + 8] push ebx mov ecx, dword ptr [0x619980] mov ecx, [ecx + 16] mov eax, 0x0040C680 call eax add esp, 20 pop ecx pop ebx pop ebp ret // now we should have our character's instance in ecx // and the call bellow takes it as an argument through ecx }}void Teleport(float x, float y){ //float poss[3] = {x,y,0}; //SetPixelPosition((DWORD)poss); DWORD PythonPlayerInstance = *(DWORD*)(0x61997C); ((void(__fastcall*)(DWORD,DWORD,bool,bool,bool,bool))0x0043DA40)(PythonPlayerInstance,0,0,0,0,0); DWORD Base = *(DWORD*)(*(DWORD*)(0x619980) +16) + 476; float pos[3] = {x,-y,0}; ((void(__fastcall*)(DWORD,DWORD,float*))0x4A3E10)(Base, 0,pos); ((void(__fastcall*)(DWORD,DWORD,bool,bool,bool,bool))0x0043DA40)(PythonPlayerInstance,0,1,0,0,0);}