JEmu2 new driver: Commando

The classic shoot-em up Commando is now supported by JEmu2.

Click here:
http://jemu2.frandt.com/jemu2.jnlp

… could not be found.

Maybe your server is down for a moment?

I’m eager to try it! :smiley:

sometimes the server works, sometimes it doesn’t, sometimes within 1 minute. Just keep trying :slight_smile:

http://jemu2.frandt.com/img/commando.jpg

Neat! It works but it seems like sometimes key presses would get messed up. Like if I was hitting fire when I died, and let go of fire, when I respawned I would fire once and then stop. Also sometimes, seemingly randomly, I’d start running left, and the only way to fix it was to press left to reset the key I guess. I found I couldn’t hold down fire to fire continuously so I’d just spam ctrl over and over to never stop firing :slight_smile: Sometimes this would fail and it would stop firing continuously for some unknown reason. I couldn’t find a reason for it.

Strange, it works just fine here. What OS & java version?
Maybe it’s some old lwjgl issue (I still have to go to the latest lwjgl, JEmu2 is still using an older version)…

JEmu2 now uses the latest LWJGL, maybe you could give it another shot?

I used to be able to run this. Now when I try it, my system grinds to a complete halt, almost. I have to kill it to get my system back.

Tried it under 1.5.0_01 and 1.4.2_08.

My system specs:
Windows XP PRO
Athalon 1.0 GHz
512MB
ASUS Radeon 9600 PRO

This is since I upgraded the LWJGL version?

Yes. Just to make sure, I cleared the entire cache and tried again. Still does it.

[EDIT]
I also just updated my graphics drivers and it is still happening.

Hm, weird. It sounds like some LWJGL issue because I didn’t change anything except the LWJGL binary (and some init code to suit the new LWJGL), but I have no clue of what it could be. ???
Do you have some logging for me, maybe?

The log doesn’t say much. Here is the last entry:

There are no error messages. I let it run for a while to see what happened. From 20:52 to 21:06 all it got to was half way through displaying the warning no to export it from Japan. Do you want to try sending me a standalone verion to try?

If you could try it stand-alone, that would be great. :slight_smile:
http://jemu2.frandt.com/jemu2_commando.zip (remember that the server is very unreliable, so if you can’t connect, try again later)
Unzip, run the .bat file and it’ll run and write output to commando.log. Could you post the log, please?

Ok. Here is the log.


Trying to select driver 'commando'...Ok!
jar:file:/F:/Games/JEmu2/commando.jar!/commando.zip
Loading a10_vt16.bin(14178237)...Ok!
Loading e09_vt07.bin(ca88bdfd)...Ok!
Loading m08_cm03.bin(35486542)...Ok!
Loading a07_vt13.bin(5612dbd2)...Ok!
Loading 03d_vtb3.bin(4c14c3f6)...Ok!
Loading h08_vt09.bin(98703982)...Ok!
Loading d05_vt01.bin(505726e0)...Ok!
Loading 01d_vtb1.bin(3aba15a1)...Ok!
Loading a05_vt11.bin(7b2e1b48)...Ok!
Loading e08_vt06.bin(26fee521)...Ok!
Loading h07_vt08.bin(2019c883)...Ok!
Loading 02d_vtb2.bin(88865754)...Ok!
Loading h09_vt10.bin(f069d2f8)...Ok!
Loading e07_vt05.bin(79f16e3d)...Ok!
Loading a09_vt15.bin(de70babf)...Ok!
Loading m09_cm04.bin(8438b694)...Ok!
Loading a08_vt14.bin(2b2dee36)...Ok!
Loading a06_vt12.bin(81b417d3)...Ok!
Loading 06e_vtb6.bin(eaf5158)...Ok!
Loading 01h_vtb4.bin(b388c246)...Ok!
Loading 06l_vtb5.bin(712ac508)...Ok!
Starting...
Commando (World)
1987 - Capcom
Decrypting ROMs...OK!
Video initializing...
Generating palette...
palette_init1536
Starting video emulation...
Video initialized successfully.
Machine initializing...
Machine initialized successfully.
windows xp
256
256
Screen dimensions 224x256
Texture dimensions 256x256
Maybe selecting mode 800 x 600 x 16 @85Hz
Maybe selecting mode 800 x 600 x 16 @60Hz
VSync:true
Throttle:false
Setting display mode 800 x 600 x 16 @60Hz...
OK. Setting up keyboardr...
OK. Initialization seems to be ok.

Flat profile of 6.56 secs (592 total ticks): AWT-EventQueue-0

  Thread-local ticks:
 19.8%   117             Blocked (of total)
  4.0%    19             Class loader
 96.0%   456             Compilation

Exiting

Flat profile of 41.36 secs (4062 total ticks): main

  Interpreted + native   Method                        
 75.0%     0  +  3011    org.lwjgl.opengl.GL11.nglEnd
  2.1%     0  +    86    org.lwjgl.opengl.Win32ContextImplementation.nCreate
  2.0%     0  +    79    org.lwjgl.opengl.Win32Display.destroyWindow
  1.5%     0  +    61    org.lwjgl.opengl.GL11.nglClear
  1.5%     8  +    51    jef.cpu.Z80.<clinit>
  1.2%     0  +    47    org.lwjgl.opengl.Win32Display.switchDisplayMode
  0.9%     0  +    35    sun.awt.windows.Win32SurfaceData.initDDraw
  0.9%     0  +    35    org.lwjgl.opengl.Win32ContextImplementation.nDestroy
  0.8%     0  +    32    org.lwjgl.opengl.Win32PeerInfo.nChoosePixelFormat
  0.7%     0  +    30    java.lang.ClassLoader$NativeLibrary.load
  0.7%     0  +    27    org.lwjgl.opengl.Win32Display.getAvailableDisplayModes
  0.6%     0  +    26    sun.awt.Win32GraphicsEnvironment.registerFontWithPlatform
  0.3%     0  +    14    org.lwjgl.opengl.Win32Display.nCreateWindow
  0.3%     0  +    14    org.lwjgl.opengl.GL11.nglTexImage2D
  0.3%     0  +    12    java.lang.ClassLoader.defineClass0
  0.2%     0  +     9    sun.awt.font.NativeFontWrapper.registerFonts
  0.2%     0  +     9    sun.awt.font.NativeFontWrapper.getFontMetrics
  0.2%     0  +     7    java.util.zip.ZipFile.open
  0.1%     0  +     6    org.lwjgl.opengl.Win32Display.createMouse
  0.1%     0  +     6    org.lwjgl.opengl.GLContext.getFunctionAddress
  0.1%     0  +     5    java.io.WinNTFileSystem.getBooleanAttributes
  0.1%     0  +     5    cottage.drivers.Commando.<init>
  0.1%     0  +     4    sun.awt.windows.WFramePeer.createAwtFrame
  0.1%     0  +     4    sun.awt.windows.WComponentPeer.pShow
  0.1%     0  +     4    java.io.FileInputStream.readBytes
 93.0%    43  +  3690    Total interpreted (including elided)

     Compiled + native   Method                        
  0.4%    15  +     0    jef.video.BitMapImpl.setPixel
  0.3%    14  +     0    jef.video.BitMapImpl.toBitMap
  0.1%     4  +     0    net.movegaga.jemu2.FrameWork.updateTexture
  0.1%     4  +     0    sun.security.provider.SHA.computeBlock
  0.1%     3  +     0    java.math.BigInteger.mulAdd
  0.1%     2  +     1    jef.cpu.Z80.exec
  0.0%     2  +     0    sun.security.provider.SHA.engineUpdate
  0.0%     2  +     0    jef.cpu.Z80.<clinit>
  0.0%     2  +     0    jef.video.BitMapImpl.toBitMap
  0.0%     2  +     0    java.math.BigInteger.addOne
  0.0%     2  +     0    java.math.BigInteger.multiplyToLen
  0.0%     1  +     0    java.lang.StringBuffer.append
  0.0%     1  +     0    java.lang.StringBuffer.expandCapacity
  0.0%     1  +     0    java.lang.String.startsWith
  0.0%     1  +     0    java.lang.String.equals
  0.0%     1  +     0    java.math.BigInteger.montReduce
  0.0%     1  +     0    java.math.BigInteger.squareToLen
  0.0%     1  +     0    java.util.jar.Manifest$FastInputStream.readLine
  0.0%     1  +     0    jef.util.RomLoader.storeMemory
  0.0%     1  +     0    native signature handlers
  1.5%    61  +     1    Total compiled

  Thread-local ticks:
  1.2%    47             Blocked (of total)
  5.1%   203             Class loader
  0.0%     1             Interpreter
  0.4%    16             Compilation


Flat profile of 1.63 secs (163 total ticks): AWT-EventQueue-0

  Thread-local ticks:
100.0%   163             Blocked (of total)


Flat profile of 1.15 secs (115 total ticks): DestroyJavaVM

  Thread-local ticks:
100.0%   115             Blocked (of total)


Global summary of 42.52 seconds:
100.0%  4246             Received ticks
  1.6%    68             Received GC ticks
  0.8%    34             Compilation
  5.2%   222             Class loader
  0.0%     1             Interpreter

I ran it for a longer amount of time to give you a comparison.


Trying to select driver 'commando'...Ok!
jar:file:/F:/Games/JEmu2/commando.jar!/commando.zip
Loading a10_vt16.bin(14178237)...Ok!
Loading e09_vt07.bin(ca88bdfd)...Ok!
Loading m08_cm03.bin(35486542)...Ok!
Loading a07_vt13.bin(5612dbd2)...Ok!
Loading 03d_vtb3.bin(4c14c3f6)...Ok!
Loading h08_vt09.bin(98703982)...Ok!
Loading d05_vt01.bin(505726e0)...Ok!
Loading 01d_vtb1.bin(3aba15a1)...Ok!
Loading a05_vt11.bin(7b2e1b48)...Ok!
Loading e08_vt06.bin(26fee521)...Ok!
Loading h07_vt08.bin(2019c883)...Ok!
Loading 02d_vtb2.bin(88865754)...Ok!
Loading h09_vt10.bin(f069d2f8)...Ok!
Loading e07_vt05.bin(79f16e3d)...Ok!
Loading a09_vt15.bin(de70babf)...Ok!
Loading m09_cm04.bin(8438b694)...Ok!
Loading a08_vt14.bin(2b2dee36)...Ok!
Loading a06_vt12.bin(81b417d3)...Ok!
Loading 06e_vtb6.bin(eaf5158)...Ok!
Loading 01h_vtb4.bin(b388c246)...Ok!
Loading 06l_vtb5.bin(712ac508)...Ok!
Starting...
Commando (World)
1987 - Capcom
Decrypting ROMs...OK!
Video initializing...
Generating palette...
palette_init1536
Starting video emulation...
Video initialized successfully.
Machine initializing...
Machine initialized successfully.
windows xp
256
256
Screen dimensions 224x256
Texture dimensions 256x256
Maybe selecting mode 800 x 600 x 16 @85Hz
Maybe selecting mode 800 x 600 x 16 @60Hz
VSync:true
Throttle:false
Setting display mode 800 x 600 x 16 @60Hz...
OK. Setting up keyboardr...
OK. Initialization seems to be ok.

Flat profile of 4.49 secs (385 total ticks): AWT-EventQueue-0

  Thread-local ticks:
 35.8%   138             Blocked (of total)
100.0%   247             Compilation

Exiting

Flat profile of 332.74 secs (33155 total ticks): main

  Interpreted + native   Method                        
 95.7%     0  + 31718    org.lwjgl.opengl.GL11.nglEnd
  1.8%     0  +   598    org.lwjgl.opengl.GL11.nglClear
  0.3%     0  +   102    org.lwjgl.opengl.Win32Display.destroyWindow
  0.2%     5  +    57    jef.cpu.Z80.<clinit>
  0.1%     0  +    41    org.lwjgl.opengl.Win32Display.switchDisplayMode
  0.1%     0  +    28    org.lwjgl.opengl.Win32Display.getAvailableDisplayModes
  0.1%     0  +    17    sun.awt.windows.Win32SurfaceData.initDDraw
  0.0%     0  +    16    org.lwjgl.opengl.Win32Display.nCreateWindow
  0.0%     0  +    16    org.lwjgl.opengl.GL11.nglTexImage2D
  0.0%     0  +     8    org.lwjgl.opengl.Win32ContextImplementation.nSwapBuffers
  0.0%     0  +     6    org.lwjgl.opengl.Win32DisplayPeerInfo.nInitDC
  0.0%     0  +     6    jef.cpu.Z80.prefix_BC
  0.0%     0  +     4    org.lwjgl.opengl.GLContext.getFunctionAddress
  0.0%     0  +     4    jef.cpu.Z80.exec
  0.0%     0  +     4    cottage.drivers.Commando.<init>
  0.0%     0  +     4    java.util.zip.Inflater.inflateBytes
  0.0%     0  +     4    org.lwjgl.opengl.Win32PeerInfo.nChoosePixelFormat
  0.0%     0  +     3    org.lwjgl.opengl.Win32ContextImplementation.nMakeCurrent
  0.0%     0  +     3    java.lang.ClassLoader.defineClass0
  0.0%     0  +     3    sun.nio.cs.UTF_8$Decoder.decodeArrayLoop
  0.0%     0  +     3    jef.cpu.Z80.prefix_ED
  0.0%     2  +     0    cottage.vidhrdw.Commando.video_update
  0.0%     0  +     2    sun.awt.windows.WComponentPeer.pShow
  0.0%     1  +     1    java.util.jar.JarFile.hasClassPathAttribute
  0.0%     2  +     0    sun.security.provider.SHA.engineUpdate
 98.8%    41  + 32700    Total interpreted (including elided)

     Compiled + native   Method                        
  0.4%   147  +     0    jef.video.BitMapImpl.setPixel
  0.3%   109  +     0    jef.video.BitMapImpl.toBitMap
  0.1%    39  +     0    jef.video.BitMapImpl.toBitMap
  0.1%    38  +     0    net.movegaga.jemu2.FrameWork.updateTexture
  0.0%     9  +     0    jef.cpu.Z80.exec
  0.0%     5  +     0    sun.security.provider.SHA.computeBlock
  0.0%     4  +     0    java.math.BigInteger.mulAdd
  0.0%     3  +     0    jef.video.GfxManager.getTile
  0.0%     2  +     0    jef.cpu.Z80.ld_HL_ni
  0.0%     2  +     0    jef.cpu.Z80.<clinit>
  0.0%     2  +     0    java.math.BigInteger.multiplyToLen
  0.0%     2  +     0    sun.security.provider.SHA.engineUpdate
  0.0%     2  +     0    cottage.mame.MAMEVideo.drawgfx
  0.0%     2  +     0    jef.map.MemoryReadAddress$MEMread.read
  0.0%     2  +     0    jef.cpuboard.BasicDecryptingCpuBoard.read8opc
  0.0%     2  +     0    cottage.vidhrdw.Commando.video_update
  0.0%     1  +     0    jef.cpuboard.BasicDecryptingCpuBoard.write8
  0.0%     1  +     0    jef.cpuboard.BasicDecryptingCpuBoard.read16arg
  0.0%     1  +     0    java.lang.StringBuffer.append
  0.0%     1  +     0    java.math.BigInteger.montReduce
  0.0%     1  +     0    java.lang.StringCoding$CharsetSD.decode
  0.0%     1  +     0    jef.video.GfxManager.drawTile
  0.0%     1  +     0    java.util.HashMap.indexFor
  0.0%     1  +     0    java.lang.StringBuffer.<init>
  0.0%     1  +     0    sun.nio.cs.SingleByteEncoder.encodeArrayLoop
  1.1%   380  +     1    Total compiled (including elided)

  Thread-local ticks:
  0.0%    13             Class loader
  0.0%     4             Interpreter
  0.0%    15             Compilation
  0.0%     1             Unknown: no last frame


Flat profile of 1.67 secs (168 total ticks): AWT-Shutdown

  Thread-local ticks:
 99.4%   167             Blocked (of total)
100.0%     1             Unknown: no last frame


Flat profile of 1.20 secs (120 total ticks): DestroyJavaVM

  Thread-local ticks:
100.0%   120             Blocked (of total)


Global summary of 333.94 seconds:
100.0% 33343             Received ticks
  0.2%    64             Received GC ticks
  0.1%    45             Compilation
  0.0%     2             Other VM operations
  0.0%    13             Class loader
  0.0%     4             Interpreter
  0.0%     2             Unknown code

Thanks a lot for that :slight_smile:

The thing that worries me is this:
95.7% 0 + 31718 org.lwjgl.opengl.GL11.nglEnd

But I’ve got no clue of why that one would take so much (org.lwjgl.opengl.GL11.nglEnd doesn’t show up at all in the profile from my PC).
Maybe some LWJGL guru has an idea? :slight_smile:

bump :slight_smile:

odd, looks like a driver issue!

public static void glEnd() {
  long function_pointer = GLContext.getCapabilities().GL11_glEnd_pointer;
  BufferChecks.checkFunctionAddress(function_pointer);
  nglEnd(function_pointer);
}
	
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEnd(JNIEnv *env, jclass clazz, jlong function_pointer) {
  glEndPROC glEnd = (glEndPROC)((intptr_t)function_pointer);
  glEnd();
}

I updated to the latest driver for my card before running it with the log. I have an ASUS ATI Radeon 9600/PRO. Any known issues with this card?

Don’t let the actual call (glEnd) confuse you. A similar “hotspot” could appear in Display.update() since that’s where all the unfinished drawing is taking place. You mentioned that you only have end glEnd per frame? If you have many primitives, try chopping them up in smaller Begin/End batches. If you only have a few primitives, then maybe texture changes (or another expensive operation) are deferred to glEnd()? Do you use VBO or PBO?

  • elias