Sunday, August 25, 2019

Loading custom HTML to google markers

So, a lot of people suggest that you can't load markers with your custom content when using google maps. It's simply untrue. The markers are loaded client side, so you are able to do whatever.

Take the following code for your click event.

         var content;
        fetch('pages/checkin.html')
          .then(response => response.text())
          .then((data) => {
            content = data;
            var infowindow = new google.maps.InfoWindow({content:content});

            var  marker2 = new google.maps.Marker({
              map: map,
              position: place2.geometry.location
            })

            marker2.addListener('click', function() {
                console.log("Click");
                map.setCenter(marker2.position);
              infowindow.open(map, marker2);
            });

First we obtain the new html by fetching it from the server.




Then in the 'then' we then create the info window, and apply that.



Many other solutions require creating a custom class and inheritance. You don't need that at all.


    

Tuesday, April 9, 2019

The return.

Wow! It has been a while, I thought this was gone. I will now be using this space to talk my experiences with programming and maybe some other things. Cheers to the old readers!

Monday, March 11, 2013

gba4ds compiling

If you're having problems compiling GBA4DS, you'll need to edit the make file in bootstub to reflect the change to arm-none-eabi*

You will also need a copy of the R4 menu in the root dir of your source.

Sunday, March 3, 2013

Work

Hard at work working on something for y'all please stayed tuned!

Saturday, February 9, 2013

Decompilation example

Quick example of how well the plugin works



void RestoreHealth(){ //Original function
u16* curHealth=(u16*)0x3001310;
u16* maxHealth=(u16*)0x3001312;
unsigned short val=*maxHealth-*curHealth;
*curHealth+=val;

}


Here's the assembeled copy
            EXPORT RestoreHealth
RestoreHealth

var_8           = -8
var_4           = -4

                SUB     SP, SP, #0x10
                LDR     R3, =0x3001310
                STR     R3, [SP,#0x10+var_4]
                LDR     R3, =0x3001312
                STR     R3, [SP,#0x10+var_8]
                LDR     R3, [SP,#0x10+var_8]
                LDRH    R1, [R3]
                LDR     R3, [SP,#0x10+var_4]
                LDRH    R2, [R3]
                MOV     R3, SP
                ADDS    R3, #6
                SUBS    R2, R1, R2
                STRH    R2, [R3]
                LDR     R3, [SP,#0x10+var_4]
                LDRH    R2, [R3]
                MOV     R3, SP
                ADDS    R3, #6
                LDRH    R3, [R3]
                ADDS    R3, R2, R3
                LSLS    R3, R3, #0x10
                LSRS    R2, R3, #0x10
                LDR     R3, [SP,#0x10+var_4]
                STRH    R2, [R3]
                ADD     SP, SP, #0x10
                BX      LR
; End of function RestoreHealth

; ---------------------------------------------------------------------------
                ALIGN 0x10
dword_8000320   DCD 0x3001310           ; DATA XREF: RestoreHealth+2 r
dword_8000324   DCD 0x3001312           ; DATA XREF: RestoreHealth+6 r

And here's the decompiled version! 


; ---------------------------------------------------------------------------

                EXPORT RestoreHealth
RestoreHealth
                void RestoreHealth() { // framesize 0x10

                 (unsigned long)SP+0xC = 0x3001310;
                 (unsigned long)SP+8 = 0x3001312;
                 (unsigned short)SP+6 = word<(unsigned long)SP+8> - word<(unsigned long)SP+0xC>;
                 word<(unsigned long)SP+0xC> = word<(unsigned long)SP+0xC> + (unsigned short)SP+6 & 0xFFFF;
                 return void
                }
; ---------------------------------------------------------------------------

Decompiler update

Greetings!


There is now a repository for the decompiler!
http://code.google.com/p/arm-thumb-decompiler-plugin/
If you wish to be a committer please e-mail myself or normmatt.

Helpers are welcome! :)


Here's the current r11 binaries.

https://dl.dropbox.com/u/12510094/NEVERDELETE/decompilerr11.zip


Romhacking update soon, maybe today.

Best jump table detection!


Monday, February 4, 2013

Fixed a bug in the decompiler

Hello!

Last release of the decompiler could only detect switches in the following format.

80 00   LSL   R0, R0, #2

02 49   LDR   R1, =off_83C173C
40 18   ADD   R0, R0, R1
00 68   LDR   R0, [R0]
87 46   MOV   PC, R0

I successfully have it reading switches from r1, and will be advancing it to switches with any registers.

I also have to look into getting default case switches to work.

Expect a release soon!