How can I compile asMSX in windows 10?

Page 1/3
| 2 | 3

By janghang

Master (129)

janghang's picture

04-01-2018, 00:48

https://github.com/Fubukimaru/asMSX

What is the easiest way to compile asMSX in windows 10? I spent a few hours to compile it with VS 2017 but I just gave up compiling it. It keeps causing some errors with flex and bison; it requires win_flex and win_bison but a downloaded win_flex makes some strange virus issue. I cannot trust it.

Anybody can send a windows binary file (asMSX 0.18.4)? neodasan_at_gmail.com

Login or register to post comments

By fubukimaru

Resident (46)

fubukimaru's picture

04-01-2018, 10:13

Hello Janghang,

On https://github.com/Fubukimaru/asMSX/releases you should be able to find the last release compiled for windows. Where did you download flex?

If you have any issue or question feel free to contact me :).

By janghang

Master (129)

janghang's picture

04-01-2018, 21:12

Thanks, Fubukimaru! I really appreciate your effort, too.

By Giangiacomo Zaffini 2

Champion (289)

Giangiacomo Zaffini 2's picture

12-04-2018, 20:24

Since it is the only cross-assembler that I know that can make use of .PHASE/.DEPHASE directives I need to get use to it in order to recompile some old sources from the far-east! I don't really want to use M80 if it is not necessary.

By syn

Prophet (2123)

syn's picture

13-04-2018, 10:59

Tniasm also supports phase/dephase.

By Giangiacomo Zaffini 2

Champion (289)

Giangiacomo Zaffini 2's picture

13-04-2018, 14:04

Thank You syn, I didn't knew it. I will look into it as well.

By dhau

Paragon (1570)

dhau's picture

15-03-2019, 02:01

Hello janghang, please accept my apologies. I didn't see this thread earlier. I'm not a frequent visitor on MRC.

Fubu is a full-time Linux user. I'm helping him out with asMSX where I can and I'm a Windows 10 and Visual Studio 2017 user.

The solution you tried to use is mine. It works very well for me as long as winflexbison executable files are somewhere in path.

About virus warning. I'm not sure why you are getting it. I'm using normal Windows 10 Pro x64 with whatever Microsoft anti-malware comes with it, and I never had any issues. Is it possible you tried a version that was just released, and the antivirus you are using collects statistics on how many users have this particular hash for it, and if below threshold, it complains. If this theory is right, just download an older version of winflexbison that is used by more people and so your antivirus hopefully won't get spooked by it.

Let me know if you would rather use WSL (Windows Susbsystem for Linux) version of flex/bison. Or may be you are comfortable installing MinGW or better yet msys2? Then you can adjust build rules for *.l and *.y files in Visual Studio solution.

In any case, thank you for trying asMSX. If you encounter more problems in the future, please open an issue: https://github.com/Fubukimaru/asMSX/issues. Fubu or contributors like myself will see it and address it promptly.

Another hint: if you don't like vs2017, you can use make, gcc, flex and bison from MinGW or msys2 to build a Windows executable using makefile.

By DarkSchneider

Paladin (1020)

DarkSchneider's picture

15-03-2019, 08:56

Or install Linux subsystem on Windows 10 is easy:
https://docs.microsoft.com/en-us/windows/wsl/install-win10

By Giangiacomo Zaffini 2

Champion (289)

Giangiacomo Zaffini 2's picture

16-03-2019, 02:13

OK, I just built from sources asMSX on Windows 10.

To do check list
NOTE - I cannot display angular parenthesis, I would like to do it, but I cannot do it, so just imagine they're here where they should be.

1a. build from sources dependency project winflexbison, starting with git clone winflexbison
PS C:\tempGZ> git clone https://github.com/lexxmark/winflexbison.git
Cloning into 'winflexbison'...
remote: Enumerating objects: 195, done.
remote: Counting objects: 100% (195/195), done.
remote: Compressing objects: 100% (163/163), done.
remote: Total 2259 (delta 61), reused 87 (delta 32), pack-reused 2064
Receiving objects: 100% (2259/2259), 7.65 MiB | 2.42 MiB/s, done.
Resolving deltas: 100% (1335/1335), done.
Checking connectivity... done.

1b. edit each one of three project files of winflexbison regarding WindowsTargetPlatformVersion and PlatformToolset,
for example I show one of them, i.e. common_lib, exactly the same for the three projects

PS C:\tempGZ\winflexbison> git diff VS2017/common_lib/common_lib.vcxproj
diff --git a//VS2017/common_lib/common_lib.vcxproj b/VS2017/common_lib/common_lib.vcxproj
index 5dd3152..db3102d 100644
--- a/VS2017/common_lib/common_lib.vcxproj
+++ b/VS2017/common_lib/common_lib.vcxproj
@@ -14,19 +14,19 @@
      ProjectGuid {11561197-1120-428C-A43D-7BCDFBCF79B8} /ProjectGuid 
      Keyword Win32Proj /Keyword 
      RootNamespace common_lib /RootNamespace 
-     WindowsTargetPlatformVersion 7.0 /WindowsTargetPlatformVersion 
+     WindowsTargetPlatformVersion 10.0.17763.0 /WindowsTargetPlatformVersion 
    /PropertyGroup 
    Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" / 
    PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration" 
      ConfigurationType StaticLibrary /ConfigurationType 
      UseDebugLibraries true /UseDebugLibraries 
-     PlatformToolset v141_xp /PlatformToolset 
+     PlatformToolset v141 /PlatformToolset 
      CharacterSet MultiByte /CharacterSet 
    /PropertyGroup 
    PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration" 
      ConfigurationType StaticLibrary /ConfigurationType 
      UseDebugLibraries false /UseDebugLibraries 
-     PlatformToolset v141_xp /PlatformToolset 
+     PlatformToolset v141 /PlatformToolset 
      WholeProgramOptimization true /WholeProgramOptimization 
      CharacterSet MultiByte /CharacterSet 
    /PropertyGroup 
@@ -283,4 +283,4 @@
    Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" / 
    ImportGroup Label="ExtensionTargets" 
    /ImportGroup 
- /Project 
\ No newline at end of file
+ /Project 

1c. open winflexbison project solution in Visual Studio 2017 Community edition (on April 2019 Visual Studio 2019 will be launched) and build everything

2a. back to asMSX, git clone asMSX
PS C:\tempGZ> git clone https://github.com/Fubukimaru/asMSX.git
Cloning into 'asMSX'...
remote: Enumerating objects: 99, done.
remote: Counting objects: 100% (99/99), done.
remote: Compressing objects: 100% (66/66), done.
remote: Total 1555 (delta 64), reused 65 (delta 33), pack-reused 1456
Receiving objects: 100% (1555/1555), 1.40 MiB | 2.12 MiB/s, done.
Resolving deltas: 100% (1022/1022), done.
Checking connectivity... done.

2b. modify project file adding executable path search for winflexbison built as above, see diff below

PS C:\tempGZ\asMSX> git diff build/vs2017/asmsx.vcxproj
diff --git a/build/vs2017/asmsx.vcxproj b/build/vs2017/asmsx.vcxproj
index bcc276d..1d65d20 100644
--- a/build/vs2017/asmsx.vcxproj
+++ b/build/vs2017/asmsx.vcxproj
@@ -78,10 +78,12 @@
    PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" 
      LinkIncremental false /LinkIncremental 
      IncludePath $(VC_IncludePath);$(WindowsSDK_IncludePath);$(ProjectDir)..\..\src /IncludePath 
+     ExecutablePath C:\tempGZ\winflexbison\bin\Release;$(ExecutablePath) /ExecutablePath 
    /PropertyGroup 
    PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" 
      LinkIncremental false /LinkIncremental 
      IncludePath $(VC_IncludePath);$(WindowsSDK_IncludePath);$(ProjectDir)..\..\src /IncludePath 
+     ExecutablePath C:\tempGZ\winflexbison\bin\Release;$(ExecutablePath) /ExecutablePath 
    /PropertyGroup 
    ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" 
      ClCompile 
PS C:\tempGZ\asMSX>

2c. open asMSX vs2017 project solution in Visual Studio 2017 Community edition and build everything

done :P

By Metalion

Paragon (1625)

Metalion's picture

16-03-2019, 09:40

I have used asMSX for years, and I was a great defender of that cross-assembler. But at the end of last year, as I developed a new and bigger game, I finally gave up and switched to sjasm.

Too many time with the same annoying compiling error : the famous 'NOP' bug (even with the latest version) ... It's been years and years since this bug has existed, and still there is no solution to it ! ... I know it's not easy to solve, but at some point it becomes too much a obstacle in development.

That, and the lack of macro définitions.
I've made the move to sjasm, and I do not regret it one moment.

By gdx

Enlighted (6215)

gdx's picture

16-03-2019, 10:27

syn wrote:

Tniasm also supports phase/dephase.

Zasm too.

Page 1/3
| 2 | 3