Have I done this right?

Disassembly, Reassembly, Tools and devleopment. Going deep with Hardware and Software.
Post Reply
planethax
Posts: 41
Joined: Fri Jan 01, 2010 12:45 pm

Have I done this right?

Post by planethax »

Using a 2001 Impala file I found, trying to disassemble,
used motorola 68330 processor
created ram FFFF0000 size(?) FFFFFFFE
went to 0440 and hit C

In that area I see this

Code: Select all

ROM:00000440 ; ---------------------------------------------------------------------------
ROM:00000440                 suba.l  a6,a6
ROM:00000442                 move.l  #$FFFFA800,d0
ROM:00000448                 asr.l   #8,d0
ROM:0000044A                 move.w  d0,($FFFFFB04).w
ROM:0000044E                 move.l  #$FFFF8000,d0
ROM:00000454                 move.l  d0,($FFFFFB44).w
ROM:00000458                 move.l  #$FFFF9000,d0
ROM:0000045E                 move.l  d0,($FFFFFB84).w
ROM:00000462                 move.l  #$FFFFA000,d0
ROM:00000468                 move.l  d0,($FFFFFA84).w
ROM:0000046C                 move.l  #$FFFFB000,d0
ROM:00000472                 move.l  d0,($FFFFFAC4).w
ROM:00000476                 move.l  #$200,d0
ROM:0000047C                 move.w  d0,($FFFFFB40).w
ROM:00000480                 move.w  d0,($FFFFFB80).w
ROM:00000484                 move.w  d0,($FFFFFA80).w
ROM:00000488                 move.w  d0,($FFFFFAC0).w
ROM:0000048C                 movea.l #0,a0
ROM:00000492                 movec   a0,vbr
ROM:00000496                 movea.l #$FFFFB800,sp
ROM:0000049C                 jsr     (sub_E52).l
ROM:000004A2                 move.b  ($FFFFFA07).w,d0
ROM:000004A6                 btst    #6,d0
ROM:000004AA                 beq.s   loc_4BA
ROM:000004AC                 clr.w   ($FFFF8DE0).w
ROM:000004B0                 clr.l   ($FFFF8DE2).w
ROM:000004B4                 clr.w   ($FFFF8DE6).w
ROM:000004B8                 bra.s   loc_4D2
ROM:000004BA ; ---------------------------------------------------------------------------
ROM:000004BA
ROM:000004BA loc_4BA:                                ; CODE XREF: ROM:000004AAj
ROM:000004BA                 addq.w  #1,($FFFF8DE6).w
ROM:000004BE                 btst    #5,d0
ROM:000004C2                 beq.s   loc_4CA
ROM:000004C4                 tst.b   ($FFFF8DE0).w
ROM:000004C8                 bne.s   loc_4D2
ROM:000004CA
ROM:000004CA loc_4CA:                                ; CODE XREF: ROM:000004C2j
ROM:000004CA                 andi.w  #$FF,d0
ROM:000004CE                 move.w  d0,($FFFF8DE0).w
ROM:000004D2
ROM:000004D2 loc_4D2:                                ; CODE XREF: ROM:000004B8j
ROM:000004D2                                         ; ROM:000004C8j
ROM:000004D2                 movea.l #$FFB800,sp
ROM:000004D8                 jsr     (sub_1774).l
ROM:000004DE                 jsr     sub_1A23C
ROM:000004E4                 tst.w   (word_1834).l
ROM:000004EA                 beq.s   loc_4F2
ROM:000004EC                 jsr     loc_69870
ROM:000004F2
ROM:000004F2 loc_4F2:                                ; CODE XREF: ROM:000004EAj
ROM:000004F2                 movea.l (off_1830).l,a2
ROM:000004F8                 jsr     (a2)
ROM:000004FA                 stop    #$2700
ROM:000004FE
ROM:000004FE ; =============== S U B R O U T I N E =======================================
ROM:000004FE
ROM:000004FE
ROM:000004FE sub_4FE:                                ; CODE XREF: sub_7BC+11Ep
ROM:000004FE                                         ; sub_8F8+18Cp ...
ROM:000004FE                 move.w  #$FFFF,($FFFF8DE0).w
ROM:00000504                 move.l  (sp),d0
ROM:00000506                 move.l  d0,($FFFF8DE2).w
ROM:0000050A                 stop    #$2700
ROM:0000050A ; End of function sub_4FE
ROM:0000050A
ROM:0000050E
ROM:0000050E ; =============== S U B R O U T I N E =======================================
ROM:0000050E
ROM:0000050E
ROM:0000050E sub_50E:                                ; DATA XREF: ROM:off_28o
ROM:0000050E                                         ; ROM:off_44o ...
ROM:0000050E
ROM:0000050E arg_2           =  6
ROM:0000050E
ROM:0000050E                 move.w  arg_2(sp),d0
ROM:00000512                 andi.w  #$FFF,d0
ROM:00000516                 asl.w   #6,d0
ROM:00000518                 move.w  d0,($FFFF8DE0).w
ROM:0000051C                 move.l  2(sp),d0
ROM:00000520                 move.l  d0,($FFFF8DE2).w
ROM:00000524                 stop    #$2700
ROM:00000524 ; End of function sub_50E
ROM:00000524
ROM:00000524 ; ---------------------------------------------------------------------------
Going off a post I found that said
- the processor type is 6833x
- create a RAM segment from FFFF0000 to FFFFFFFE (it's not really there but IDA cannot handle 24bit relative addys.)
- the RESET vector is at 0x04 (generally it is 0x0440)
- go to 0x0440 and start disassembly
- you'll see a number of CPU setup and PCM interity checking routines
- then you'll se an indexed jumpt to the main routines.
I attach the file
Attachments
2001_Impala_12221682hacked.bin
(512 KiB) Downloaded 368 times
User avatar
antus
Site Admin
Posts: 8250
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: Have I done this right?

Post by antus »

Yep, thats right. I just tried it and it worked perfectly! :thumbup:
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
Post Reply