|
First of all Thank you very much! Your idea is helpful.
I've decided to do 8085 CPU because it is relatively simple.
If possible I will try to make it fully functional.
The user must be able to execute step by step and see the registers and active memory contents.
Performance is greatly relevant, and the speed also has to be good.
Can you please tell me Something about how to test the code?
Can I find helpful books and sites for this project?
thank you
|
|
|
|
|
Hi,
Dagmawi alemayehu wrote: I will try to make it fully functional
- all instructions?
- instruction timing?
- cycle accurate?
- what input/output devices?
- how is code entered?
Dagmawi alemayehu wrote: how to test the code?
- good architectural design
- test with actual programs (e.g. C-code + cross-compiler)
Dagmawi alemayehu wrote: helpful books and sites?
- don't know, except for manufacturers documentation
- I did dozens of simulators, running my own operating systems and applications
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
How you doing?
thank you very much once again.
You wrote an excellent article for the lean-and-mean competition;
I'm comp Engg student,I'm trying to do my final year project, that simulator is going to be my project.
I hope I would get more knowledge on it.
If you have time,Can you please give me some more information.
I'm designing the interface on C# windows application.I want to start from the instruction execution part by allowing the user to write the code and run it just like emu8086.
Can you help?
hope to hear from you soon.
|
|
|
|
|
Thanks.
I don't know emu8086, and I don't think it handles 8085.
Why do you choose 8085, it is terribly old; why not choose a microprocessor that is still in use?
I would consider one of the Microchip PICs for instance; say a 16F84.
Whatever you choose, make sure you have the development tools for it.
FYI: I've done 6502, all kinds of 6800 and 68000, some PICs, 8048, x86, NIOS2 and more.
The NIOS2 one was done in pure C# and ran one million instructions per second; it executed my own operating system and some multithreaded test applications.
Dagmawi alemayehu wrote: Can you help?
I give advice and answer specific questions. Generally I don't provide code.
Make sure you have answers to the questions I asked you before you commit.
Good luck with your project.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
thanks.
Since you first tell me about 8085 or 8086 matter I read alot and come into a conclusion that to begin working on 8086.
Now I've divided the project into phases.
my first phase is dealing with Execution of instructions. for this I need The user to write codes on multiline textbox and try to execuit the code by pressing run.
the problem startes here,I can't access Individual lines of code perfectly. Does it works this way?
|
|
|
|
|
Dagmawi alemayehu wrote: The user to write codes
Assembly language?
|
|
|
|
|
yea, I mean the assembly code
|
|
|
|
|
Normally a simulator is not involved in creating code, it should get its code from a file, that is why I warned you you would need the development tools, so they help you in creating some kind of EXE file which your simulator then can load in simulated memory for execution.
If you expect your user to enter some code in a textbox, it won't be much of a program, only a few lines, and you will never be able to prove your simulator works correctly as you won't test all instructions by entering them by hand, will you?
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
thank u again.
Tell me about development tools,please.
1.what kind, where to get them and for example they include?
I don't know if I'm making u busy or not, but I really apreciate your help.
|
|
|
|
|
For microprocessor software development you need cross-development tools, they usually include a cross-compiler, optionally a cross-assembler, and a linker. There are free tools for a lot of them, typically from the chip manufacturer.
FYI: if you want to simulate all functionality of 8086, it will be very hard to do so. With all the protection modes, the memory management unit, etc. The only "advantage" it has is you could use standard tools to develop the EXE files, but then your simulator needs to load an EXE file according to the PEF format, which is a challenge as well.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
hey
how you doin?
I was just reading alot about cross-compilers.
For .NET Framework we have a tool called .NET CLR(Common language Runtime) using this we can create our own compiler,of course many other things are added.
up to this point I understand that I'm goin to create my own compiler for my custom assembly language, meaning the language that my user will type on my simulator interface, and integrate these with other functions of the simulator. (check me if this idea is right)
if the above idea is correct, I'm going to continue to the next step in the case study. I've planned to finish all the case study and project requirments,objective and scope before the actual work begins.
N.B
I have changed my username to Djtech01 (don't be confused)
|
|
|
|
|
Djtech01 wrote: I'm goin to create my own compiler
Not sure that is wise. Here is why.
You could define your own microprocessor, and create a "cross"-compiler, a linker, a simulator, a profiler, whatever tool you want, and focus them all on one and the same fictitious architecture. That would be fine; it probably would serve some academic purpose only.
Or you are aiming at a real-world microprocessor, and want to create software that works with it. In that case I recommend you take existing implementations, and then replace them one at a time with your own. Assume you create a compiler and a simulator, and you misunderstand some detail of the CPU, now both your compiler and your simulator would be wrong, but one would compensate for the other. So maybe it all would look fine, until you port yout code to the real CPU and it suddenly fails to work.
So my suggestion remains: choose a modern and popular CPU that comes with free PC-based development tools; at best also buy a little demo board so you can create, download and run some real code on the real chip. Then start your own software effort, probably a simulator first, then maybe a cross-assembler, and finally, if still necessary, your own cross-compiler.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
thank you
I'm aiming at real-world microprocessor and want to create software that work with it
So I wannt to work on my pc's cpu as a target machine (to simplify things)
I'm I right?
|
|
|
|
|
Djtech01 wrote: I'm I right?
No.
x86 isn't a simple processor; it has several operating modes, most of which you will not be able to reach when running under Windows.
You MUST make a fundamental choice:
1. target a fictitious CPU
2. target a small subset of a real CPU; that could be x86 in user mode only.
3. target a (simple but) real CPU in all its aspects
As I said I would go for 3, and start with an all-official solution: prototype board, available compiler, etc. And then create a simulator.
I will no longer repeat my point of view, this thread is now closed to me. Good luck.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
|
thank you very much.
can you help about which C# applications,namespaces and styles would be helpful?
|
|
|
|
|
My only experience with such things was waaay back in college. We had an assignment to emulate a very primitive computer. The assignment wasn't based on a real computer; the text book describes a computer with only twenty operations. Programs are entered as ten-digit decimal numbers, as if from punch cards.
I'm fairly sure I was the only student in the class who had a working program (written in VAX Pascal as I recall). I also have a version in C that I wrote in 2003. I may yet write it in C# because it's kinda fun.
What you need to do will probably be much more complex (although you could simplify it if you choose).
What exactly do you want to achieve? Do you really want to simulate the CPU or simply execute the assembly code?
I suggest that the simpler the processor, the easier it is to simulate (4004 or 8008?). Your choice may depend on what your instructor thinks is a worthy level of expertise to demonstrate for the degree you're seeking.
As I recall, the instruction sets for 4004, 8008, 8080, 8088, etc. build upon the previous generation, so I would begin by implementing the 4004 instructions and then progress from there.
I can't tell you how to accomplish your task; that will depend on your own creativity.
|
|
|
|
|
hi i am serialising the uint data of a textures used in my maps, the trouble is this creates a huge file, i have already tried serialising it as a bitmap(as i have my own conversion method setup) but it seems to have a huge problem serialising and deserialing bitmaps, is there a better way of storing my map textures other than referencing the file name and src area of each image i am using??
|
|
|
|
|
It sounds to me like XML is a terrible candidate for what you want to do. I'd use a lossless image format to create them in a compressed format.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
the thing is it does not just store information on the images, imagine a map class which can hold several tiles, each tile has its own position and size and image, now i need all this information storing one way or another originally i had it storing via binary serialisation but as you know binary serialisation is slow, so i thought about using xml as the users of my program would also be able to edit them and change the values easily
Anyway it does not matter i think referencing the file and the image area(via preset indexes) will do just fine, as i have seen another example which uses this method.
modified on Monday, September 14, 2009 3:11 AM
|
|
|
|
|
Hy,
I'm developing small app in C# 3.5 for winXP that will automatically download images and video from camera to pc, on camera plug-in via usb. I have canon ixus 50 camera and i figure out how to get images from that camera to pc via WIA, but I just can't figure it out how to get/download avi format videos, can someone help me pls.
Regards
|
|
|
|
|
|
did you know some information about spd's ram
and C# implemention?
|
|
|
|
|
moein.serpico wrote: did you know some information about spd's ram
and C# implemention?
No!
I don't even know what spd is. I certainly did not know that it had a C# implementation.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
AFAIK SPD is part of BIOS, so use WMI.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|