Visual Studio

Using Visual Studio

If you want to edit 6502 source code using Visual Studio, you will have to hack a little bit, because it's not normaly posible to define new languages in Visual Studios. This hack will simply be to let Visual C++ believe that .S files are C++ files, and to add 6502 source code files to known C++ keywords.

In the following folder

	osdk\extra\VisualC++6\

you will find two files:

	language.reg
	usertype.dat

Simply execute the language.reg file to modify the registry settings (this will add the .S files to the list of C++ extensions), and copy the usertype.dat file in the following folder:

	Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\

Note: this works for Visual C++ 6, but is not guaranteed for other versions, use at your own risks.

In this folder, you will also find another folder called OsdkSampleProject. It contains a complete Visual C++ 6 project, pre-configurated to allow compilation for the IDE. You can use this project as a basic for your own project. Simply copy the folder somewhere else, rename it to the name of your project, rename the OsdkSampleProject.dsp file with the same name, and edit it with a standard text éditor (not Visual C++ !) and replace all the OsdkSampleProject occurences by the name of your project. Voila !

You now have a ready to use Oric project correctly integrated in the IDE. Compile with the F7 key, and use CTRL+F5 to run the program.

Creating projects

If the already made project is not good enough for you, here are the step by step explanations on how to do it yourself.

If the configuration is correctly done, launch Visual Studio, and go to the menu" "file/new". The following formular appear. Of course, you should replace "OsdkTest" by the name you want to give to your own project !

New project

Appwizard configuration

Now, you simply have to correctly fill (follow the example) the two dialog boxes of the app wizard.

Right now, there are no differences between the DEBUG and RELEASE versions. Anyway, in the future it's possible that it will be used.

AppWizard 1/2

AppWizard 2/2

Modify the configuration

If you later need to change the configuration (or if you do not make the right configuration during the project creation), you can go to hte "project/settings" menu, that will display the following dialog boxes.

Settings 1

Settings 2

Usage

The configuration is now terminated. You can launch the compilation by pressing the F7 key ("Build" icon), and run the program (using the emulator) by pressing the "Execute program" key (CONTROL+F5).

Have fun !