News for hackers. Stuff that matters.
Re:Visual x86 emulator by pjc50 on Monday June 08, 2015 @05:43PM (#9682668)
Not quite as cool as the visual 6502: http://www.visual6502.org/JSSim/index.html
Re:Visual x86 emulator by thlorenz on Monday June 08, 2015 @08:14PM (#9683339)
That's nice, thanks for the link!

Seems to serve a different purpose tough. visulator is supposed to help you learn how a CPU processes opcodes (at an abstract level) instead of looking at actual hardware wiring.

I'll link to it from the visulator readme though.

Re:Visual x86 emulator by strommen on Monday June 08, 2015 @04:05PM (#9681993)
Nice work, this is really cool!

But I'm kinda missing the point. I think it would be very helpful to put some corresponding C (or pseudo-C) code. I understand assembly, but it would take me forever to parse out what this program does.

Also, a few design issues (on Windows 8, Chrome):

- The bold font in the registers is difficult to read.

- The dark colors (blue and maroon) in the register names are difficult to read.

- The columns of the register table don't quite line up with their headers.

Re:Visual x86 emulator by thlorenz on Monday June 08, 2015 @04:09PM (#9682024)
> I think it would be very helpful to put some corresponding C (or pseudo-C) code

That's not the point. All this is trying to show is how assembly and a CPU works. Understanding the program is secondary.

Additionally there is no C code for this as the assembly was written directly.

Re:Visual x86 emulator by pmalynin on Tuesday June 09, 2015 @01:43AM (#9684241)
Code is really not doing anything, it would be equivalent (in output that is) to he following code with some sort of optimization.

unsigned short data[8] = {0, 0, 0, 0, 0, 0, 0, 0};

for(int i=0;i<8;i++) {

   data[i] += 0xff1;
}

for(int i=0;i<8;i++) {

   data[i] += 1;
}

data[0] = 0x7fff;

data[0] += 1;

data[0] += 1;

And so on.

So yea, nothing special.

Re:Visual x86 emulator by thlorenz on Tuesday June 09, 2015 @11:17AM (#9686409)
More interesting snippets are coming once I can emulate more instructions. These are the ones it currently can do: https://github.com/thlorenz/visulator/tree/master/test/fixtu...

I agree though that a more interesting example would be nice and I'll try to come up with one even with what it can do now.

Re:Visual x86 emulator by thlorenz on Monday June 08, 2015 @04:08PM (#9682011)
Please file an issue on github, so I can track these problems and fix them. As I mentioned I'm color blind and could use some styling help via a pull request :)
Re:Visual x86 emulator by thlorenz on Monday June 08, 2015 @04:40PM (#9682221)
I addressed the styling issues you pointed out @strommen. If you still have problems reading things please supply a fix via a pull request.
Re:Visual x86 emulator by andrewstuart2 on Monday June 08, 2015 @05:43PM (#9682670)
I mean, you could always compile some yourself. Separation of concerns and what not.
Re:Visual x86 emulator by eterps on Monday June 08, 2015 @02:44PM (#9681270)
It shows the register state animated. It would be much more useful if you could see the previous register state permanently.
Re:Visual x86 emulator by thlorenz on Monday June 08, 2015 @03:03PM (#9681427)
That's not a bad idea. Please file an issue on github. Ideally with a sketch of how this would be laid out. This project is still in its infancy and I'm very open to suggestions.
Re:Visual x86 emulator by squidbot on Monday June 08, 2015 @02:41PM (#9681243)
This is a nifty visualizer, I'm going to show it to my daughter who I've been teaching programming. We haven't broached registers and general CPU design yet, but this has inspired me to do so!

It's interesting that the example shows overflow, but doesn't show the flags register. I'm not a web dev generally, but I think I may fork this one to show it as it exists in the emulator, it's just not rendered.

Re:Visual x86 emulator by thlorenz on Monday June 08, 2015 @03:07PM (#9681462)
> but doesn't show the flags register

This is the next feature I've planned. Hopefully I can get this done tonight - check back soon :)

It'll be visualized with LEDs that light up when a flag is set.

Re:Visual x86 emulator by thlorenz on Tuesday June 09, 2015 @11:44PM (#9689937)
As promised flags are now visualized.
Re:Visual x86 emulator by gshrikant on Monday June 08, 2015 @02:50PM (#9681325)
This is pretty neat! It is still a work-in-progress though as the Github issue [1] notes. I'd love to be able to edit the disassembly and play with the visualization when its done.

[1] https://github.com/thlorenz/visulator/issues/1

Re:Visual x86 emulator by thlorenz on Monday June 08, 2015 @03:05PM (#9681452)
> It is still a work-in-progress though

Exactly this is just a start and I'm actively working on it. Editing the assembly could be an option, but I also plan to allow users to load simple binaries into it. This way you could edit the assembly, assemble it and load.

However please file an issue with feature suggestions on github so we can track what people want.

Re:Visual x86 emulator by timonoko on Monday June 08, 2015 @09:07PM (#9683507)
Re:Visual x86 emulator by nsajko on Monday June 08, 2015 @06:51PM (#9683027)
Anybody knows something like this for AVR or ARM?
Re:Visual x86 emulator by zyxley on Monday June 08, 2015 @03:55PM (#9681900)
This is neat, but the registers on the right are painfully unreadable on my screen, with tiny text and contrasts either too dark or too bright in a way that makes my eyes glaze over them.
Re:Visual x86 emulator by thlorenz on Monday June 08, 2015 @04:03PM (#9681976)
Could you file an issue on github please? This is meant to be used on a Desktop only. You may try to enlarge your fonts via Cmd-+ or Ctrl-+.

Also I do accept pull requests that fix some styling issues (I myself am color blind). Just update the CSS [here](https://github.com/thlorenz/visulator/blob/bad27bc164c1ba173...)

Re:Visual x86 emulator by thlorenz on Monday June 08, 2015 @03:15PM (#9681519)
All who commented or whoever is interested in updates please follow #visulator and/or @thlorenz on twitter for updates.
Re:Visual x86 emulator by whitten on Tuesday June 09, 2015 @05:20PM (#9688623)
I wonder how hard it would be to modify this to a different assembly language?
Re:Visual x86 emulator by p1esk on Monday June 08, 2015 @07:07PM (#9683084)
How do I change the code?
Re:Visual x86 emulator by userbinator on Monday June 08, 2015 @08:06PM (#9683314)
That was my first thought too - "here are some example instructions, moving the cursor around changes some registers... but I want to assemble a little program to try it out."

I think an "emulator" that doesn't let you run your own code in it is not an emulator. It's only an interesting visualisation.

Re:Visual x86 emulator by thlorenz on Monday June 08, 2015 @10:40PM (#9683784)
As I pointed out this project is in it's infancy. I merely tweeted about progress and it ended up here ;)

See [status](https://github.com/thlorenz/visulator#status) -- indicating in experimental stage.

I'm planning to allow loading binaries and also editing assembly (assembling it in the browser so the CPU emulator can run the opcodes).

Re:Visual x86 emulator by Hydraulix989 on Monday June 08, 2015 @03:39PM (#9681739)
Is this a full emulation? MMU?
Re:Visual x86 emulator by thlorenz on Monday June 08, 2015 @03:44PM (#9681799)
It will emulate as much of x86 as makes sense for it's purpose , to visualize assembly execution and how a CPU works.

It currently already contains a memory unit and supports push/pop instructions. More memory related instructions will be added.

Re:Visual x86 emulator by breakingcups on Tuesday June 09, 2015 @08:08AM (#9685371)
The site seems down?
Re:Visual x86 emulator by thlorenz on Tuesday June 09, 2015 @11:18AM (#9686419)
It's back up, it is a github page and it seemed github had problems recently.