GXemul  >  Documentation (0.6.0.1)


    



  Introduction  

  Stable release (0.6.0.1)  
     Download  
     Documentation  

  Development  
     News  

  Links  

   

GXemul: Machines: testm88k

Back to the index.

Back to the machine index.


testm88k machine

  (unnamed machine)  [testm88k]
  \-- mainbus0
      |-- cpu0  (88100, 50 MHz)
      |-- ram0  (32 MB at offset 0)
      |-- fb_videoram0  (15 MB at offset 0x12000000)
      \-- rom0  (4 MB at offset 0xff800000)

The testm88k machine is a GXemul-specific machine used for simple tests. It is based around a Motorola 88100 CPU, and some simple devices.

To start the emulator with a binary built for the testm88k machine, type:

	gxemul -e testm88k filename

You may add -V to start in the paused mode, and enter the single-step debugger.

Example:

$ gxemul -V -e testm88k test/FileLoader_A.OUT_M88K
GXemul (unknown version)      Copyright (C) 2003-2010  Anders Gavare

  mainbus0
  |-- cpu0  (88100, 50 MHz)
  |-- ram0  (32 MB at offset 0)
  |-- fb_videoram0  (15 MB at offset 0x12000000)
  \-- rom0  (4 MB at offset 0xff800000)

cpu0: test/FileLoader_A.OUT_M88K loaded
      a.out: entry point 0x000012b8
      text + data = 4096 + 4096 bytes
      symbols: 1260 bytes at 0x2000
      strings: 1070 bytes at 0x24ec
      13 symbols read

GXemul> cpu0.unassemble
<_f>      
0x12b8 <- 67ff0020   subu    r31,r31,0x20 
0x12bc    27df0010   st      r30,r31,0x10 
0x12c0    63df0010   addu    r30,r31,0x10 
0x12c4    58400320   or      r2,r0,0x320  
0x12c8    58600258   or      r3,r0,0x258  
0x12cc    243f0014   st      r1,r31,0x14  
0x12d0    231f0008   st.d    r24,r31,0x8  
0x12d4    cfffffe7   bsr.n   0x1270          ; <_change_resolution>
0x12d8    f6c0201f   st.d    r22,r0,r31   
0x12dc    cbffff89   bsr     0x1100          ; <_my_random>        
0x12e0    f6c05802   or      r22,r0,r2    
0x12e4    69b60320   divu    r13,r22,0x320
0x12e8    6dad0320   mulu    r13,r13,0x320
0x12ec    cfffff85   bsr.n   0x1100          ; <_my_random>        
0x12f0    f6d6640d   subu    r22,r22,r13  
0x12f4    f6e05802   or      r23,r0,r2    
0x12f8    69b70258   divu    r13,r23,0x258
0x12fc    6dad0258   mulu    r13,r13,0x258
0x1300    cfffff80   bsr.n   0x1100          ; <_my_random>        
0x1304    f6f7640d   subu    r23,r23,r13  
GXemul> cpu0.registers
   pc = 0x000012b8  <_f>
   r0 = 0x00000000     r1 = 0x00000000     r2 = 0x00000000     r3 = 0x00000000
   r4 = 0x00000000     r5 = 0x00000000     r6 = 0x00000000     r7 = 0x00000000
   r8 = 0x00000000     r9 = 0x00000000    r10 = 0x00000000    r11 = 0x00000000
  r12 = 0x00000000    r13 = 0x00000000    r14 = 0x00000000    r15 = 0x00000000
  r16 = 0x00000000    r17 = 0x00000000    r18 = 0x00000000    r19 = 0x00000000
  r20 = 0x00000000    r21 = 0x00000000    r22 = 0x00000000    r23 = 0x00000000
  r24 = 0x00000000    r25 = 0x00000000    r26 = 0x00000000    r27 = 0x00000000
  r28 = 0x00000000    r29 = 0x00000000    r30 = 0x00000000    r31 = 0x00000ff0
GXemul> step 6 
step 0: cpu0: <_f>      
              0x12b8    67ff0020   subu   r31,r31,0x20
        => cpu0.pc: 0x12b8 -> 0x12bc
        => cpu0.r31: 0xff0 -> 0xfd0

step 1: cpu0: 0x12bc    27df0010   st   r30,r31,0x10
        => cpu0.pc: 0x12bc -> 0x12c0

step 2: cpu0: 0x12c0    63df0010   addu   r30,r31,0x10
        => cpu0.pc: 0x12c0 -> 0x12c4
        => cpu0.r30: 0 -> 0xfe0

step 3: cpu0: 0x12c4    58400320   or   r2,r0,0x320
        => cpu0.pc: 0x12c4 -> 0x12c8
        => cpu0.r2: 0 -> 0x320

step 4: cpu0: 0x12c8    58600258   or   r3,r0,0x258
        => cpu0.pc: 0x12c8 -> 0x12cc
        => cpu0.r3: 0 -> 0x258

step 5: cpu0: 0x12cc    243f0014   st   r1,r31,0x14
        => cpu0.pc: 0x12cc -> 0x12d0
GXemul> cpu0.showFunctionTraceCall = true
=> cpu0.showFunctionTraceCall: false -> true
GXemul> continue
[ cpu0: _change_resolution(800,600,0,0,0,0,0,0,...) ]
[ cpu0:   _fbctrl_set_x1(800,600,0,0,0,0,0,0,...) ]
[ cpu0:     _fbctrl_write_port(1,600,0,0,0,0,0,0,...) ]
[ cpu0:     _fbctrl_write_data(800,600,0,0,0,0,0,0x12f00000,...) ]
[ cpu0:   _fbctrl_set_y1(600,600,0,0,0,0,0,0x12f00010,...) ]
[ cpu0:     _fbctrl_write_port(2,600,0,0,0,0,0,0x12f00010,...) ]
[ cpu0:     _fbctrl_write_data(600,600,0,0,0,0,0,0x12f00000,...) ]
[ cpu0:   _fbctrl_command(1,600,0,0,0,0,0,0x12f00010,...) ]
[ cpu0:     _fbctrl_write_port(0,600,0,0,0,0,0,0x12f00010,...) ]
[ cpu0:     _fbctrl_write_data(1,600,0,0,0,0,0,0x12f00000,...) ]
[ cpu0: _my_random(1,600,0,0,0,0,0,0x12f00010,...) ]
[ cpu0: _my_random(0x8eb1badd,258,0,0,0,0,0x96219136,0xe3abd777,...) ]
[ cpu0: _my_random(0x6c3eea31,258,0,0,0,0,0x96219136,0x9a0bfc0b,...) ]
[ cpu0: _my_random(0x159ec14d,258,0,0,0,0,0x96219136,0xd96944e7,...) ]
[ cpu0: _my_random(0x56fc79a1,258,0,0,0,0,0x96219136,0x30a2827b,...) ]
[ cpu0: _draw_rectangle(381,513,109,185,0xbf37bf3d,0,0x96219136,0x1c9221d7,...) ]
[ cpu0: _my_random(381,513,109,185,0xbf37bf3d,0,0x96219136,0x1c9221d7,...) ]
[ cpu0: _my_random(0x93071c91,201,6d,b9,0xbf37bf3d,0,0x96219136,0x2d57546b,...) ]
[ cpu0: _my_random(0xa2c2692d,201,6d,b9,0xbf37bf3d,0,0x96219136,0x38c76ac7,...) ]
[ cpu0: _my_random(0xb7525781,201,6d,b9,0xbf37bf3d,0,0x96219136,0x96563e5b,...) ]
[ cpu0: _my_random(0x19c3031d,201,6d,b9,0xbf37bf3d,0,0x96219136,0x1fd1a3b7,...) ]
[ cpu0: _draw_rectangle(17,101,481,117,0x90449ef1,0,0x96219136,0xfe6cfccb,...) ]
[ cpu0:   _my_memset(0x1203b313,0x90449ef1,0x573,75,0x90449ef1,0,0x96219136,0xfe6cfccb,...) ]
[ cpu0:   _my_memset(0x1203bc73,0x90449ef1,0x573,75,0x90449ef1,0,0x96219136,0,...) ]
[ cpu0:   _my_memset(0x1203c5d3,0x90449ef1,0x573,75,0x90449ef1,0,0x96219136,0,...) ]
[ cpu0:   _my_memset(0x1203cf33,0x90449ef1,0x573,75,0x90449ef1,0,0x96219136,0,...) ]
[ cpu0:   _my_memset(0x1203d893,0x90449ef1,0x573,75,0x90449ef1,0,0x96219136,0,...) ]
[ cpu0:   _my_memset(0x1203e1f3,0x90449ef1,0x573,75,0x90449ef1,0,0x96219136,0,...) ]
[ cpu0:   _my_memset(0x1203eb53,0x90449ef1,0x573,75,0x90449ef1,0,0x96219136,0,...) ]
[ cpu0:   _my_memset(0x1203f4b3,0x90449ef1,0x573,75,0x90449ef1,0,0x96219136,0,...) ]
^C
[ cpu0:   _my_memset(0x1203fe13,0x90449ef1,0x573,75,0x90449ef1,0,0x96219136,0,...) ]
[ cpu0:   _my_memset(0x12040773,0x90449ef1,0x573,75,0x90449ef1,0,0x96219136,0,...) ]
[ cpu0:   _my_memset(0x120410d3,0x90449ef1,0x573,75,0x90449ef1,0,0x96219136,0,...) ]
[ cpu0:   _my_memset(0x12041a33,0x90449ef1,0x573,75,0x90449ef1,0,0x96219136,0,...) ]
[ cpu0:   _my_memset(0x12042393,0x90449ef1,0x573,75,0x90449ef1,0,0x96219136,0,...) ]
[ cpu0:   _my_memset(0x12042cf3,0x90449ef1,0x573,75,0x90449ef1,0,0x96219136,0,...) ]
[ cpu0:   _my_memset(0x12043653,0x90449ef1,0x573,75,0x90449ef1,0,0x96219136,0,...) ]
[ 100006 steps (1104 steps/second) ]
GXemul> fb_videoram0.dump 0x3b300
TODO: parse address expression
(for now, only hex immediate values are supported!)
0003b300  00000000 00000000 00000000 00000000  ................
0003b310  000000f1 f1f1f1f1 f1f1f1f1 f1f1f1f1  ................
0003b320  f1f1f1f1 f1f1f1f1 f1f1f1f1 f1f1f1f1  ................
0003b330  f1f1f1f1 f1f1f1f1 f1f1f1f1 f1f1f1f1  ................
0003b340  f1f1f1f1 f1f1f1f1 f1f1f1f1 f1f1f1f1  ................
0003b350  f1f1f1f1 f1f1f1f1 f1f1f1f1 f1f1f1f1  ................
0003b360  f1f1f1f1 f1f1f1f1 f1f1f1f1 f1f1f1f1  ................
0003b370  f1f1f1f1 f1f1f1f1 f1f1f1f1 f1f1f1f1  ................
0003b380  f1f1f1f1 f1f1f1f1 f1f1f1f1 f1f1f1f1  ................
0003b390  f1f1f1f1 f1f1f1f1 f1f1f1f1 f1f1f1f1  ................
0003b3a0  f1f1f1f1 f1f1f1f1 f1f1f1f1 f1f1f1f1  ................
0003b3b0  f1f1f1f1 f1f1f1f1 f1f1f1f1 f1f1f1f1  ................
0003b3c0  f1f1f1f1 f1f1f1f1 f1f1f1f1 f1f1f1f1  ................
0003b3d0  f1f1f1f1 f1f1f1f1 f1f1f1f1 f1f1f1f1  ................
0003b3e0  f1f1f1f1 f1f1f1f1 f1f1f1f1 f1f1f1f1  ................
0003b3f0  f1f1f1f1 f1f1f1f1 f1f1f1f1 f1f1f1f1  ................
GXemul> quit

Source code for this component can be found here.