VOGONS


First post, by n1mr0d

User metadata
Rank Newbie
Rank
Newbie

In the past i used to collect computer viruses, and recently i found my virus archive disk. On it were 2 boot sector files of disks infected with the infamous Ping Pong virus, which i caught in the wild. If you boot from an infected disk, a lozenge appears that bounces off the walls of the screen.

One curiosity of the virus is that it only runs on 808x machines, because of the MOV CS,AX instruction, which is illegal on later processors (crashes). I tried to boot the sector (and a floppy image with the sector) with the BOOT command, but unfortunately dosbox crashed immediately.

I thought that correctly emulating this would prove that dosbox is coming close to the real thing. For those who want to dabble around with/analyse it, i attached the virus and (dis)assembly file.

Attachments

  • Filename
    pingpong.txt
    File size
    7.87 KiB
    Downloads
    530 downloads
    File comment
    Ping-pong virus disassembly
    File license
    Fair use/fair dealing exception

Reply 1 of 6, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I thought that correctly emulating this would prove that dosbox is coming close to the real thing.

dosbox aims at 386+ emulation, so this is out of scope. But should be no
problem to hack the mov cs,ax into the normal core if you can compile
dosbox from sources and have some use this.

Reply 3 of 6, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

prefix_none.h for the normal core, case 0x8e: MOV Sw,Ew
where the which (==seg reg ID) is 1.
See CPU_JMP (the stuff in the first if() block, which deals with
real mode far jumps) for how to change the cs segment,
ie. use SegSet16().

I've removed the archive btw.

Reply 6 of 6, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Otherwise why would it have machine=cga.

Um graphics are a tad what unrelated to processor emulation.
Of course most 8086-style games work fine on a 386+ processor
if the speed is low enough (cycles setting) and the graphics
emulation fits its needs (cga).