码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • ubuntu install dosbox and wolf3d


    https://fabiensanglard.net/Compile_Like_Its_1992/index.php

    Setup filesystem
       cd ~
       mkdir system
       cd system
       mkdir c
       mkdir a
       cd ~
    Download
        cd system/a
        curl -O http://fabiensanglard.net/Compile_Like_Its_1992/tools/BCPP31.zip
        http://fabiensanglard.net/Compile_Like_Its_1992/tools/BCPP31.zip
        

        cd ../c
        curl -O http://fabiensanglard.net/Compile_Like_Its_1992/tools/wolfsrc.zip
        curl -O http://fabiensanglard.net/Compile_Like_Its_1992/tools/vgafiles.zip
        http://fabiensanglard.net/Compile_Like_Its_1992/tools/wolfsrc.zip
        http://fabiensanglard.net/Compile_Like_Its_1992/tools/vgafiles.zip
       cd ..
       find ~/system

    Decompress everything
        cd ~/system/a
        unzip BCPP31.zip
        jar xvf BCPP31.zip
        sudo apt install openjdk-17-jdk-headless

        cd ~/system/c
        unzip vgafiles.zip
        unzip wolfsrc.zip
    Download and start DosBox:
    https://www.dosbox.com/
    sudo apt-get install dosbox
    https://blog.csdn.net/weixin_42361495/article/details/116691919

    Mount the filesystem, one folder for each drive :
       Z:/> mount c ~/system/c 
       Z:/> mount a ~/system/a
    Install the compiler
    Now is time to install Borland C++ 3.1 :
        Z:\> a:
        A:\> cd BCPP31
        A:\> install

    Install Wolfenstein 3D source code
    We have a system running and a compiler on it: Time to decompress (again) the source code.    

      A:\> c:
      C:\> cd\
      C:\> install
      Type 'C'
      Keep the default path: \WOLFSRC
      Y to create the directory.
      Installing !
    Compiling
    Start Borland C++ 3.1:
         C:\> cd\
         C:\> cd borlandc
         C:\> cd bin
         C:\> bc.exe
    After pressing OK, use the mouse or the shortcuts to Project -> Open Project ..\..\WOLFSRC\WOLF3D.PRJ:
    Select Options -> Directories and change the value as follow :
        Include Directories: C:\BORLANDC\INCLUDE
        Library Directories: C:\BORLANDC\LIB
        Ouptput Directories: OBJ
        Source Directories:  C:\WOLFSRC
    Let's try to compile: Compile -> Build All
    We get an error: "Cannot find executable TASM"

    Exit Borland C++, we need to set the PATH:

         
         C:\> CD ..
         C:\> PATH=C:\BORLANDC\BIN
         C:\> BC.EXE
    Try to compile again (Compile -> Build All):

    Compiling did work but the linking failed: "Unable to find OBJ file" because the path of SIGNON.OBJ and GAMEPAL.OBJ in wrong in the project: They are marked in C:\SOURCE\WOLF\ :


    Delete them from the project (Select and the Projext -> Delete item). Add them again via PROJECT -> Add Item... . Add WOLFSRC\OBJ\SIGNON.OBJ and WOLFSRC\OBJ\GAMEPAL.OBJ

    Try to compile again via (Compile -> Build All)
    IT WORKED ! But will it run ?

    Getting the assets
    Download the shareware version or even better: Purchase as full version on Wolfenstein 3D.
        cd ~/system/c
        curl -O http://fabiensanglard.net/Compile_Like_Its_1992/tools/1wolf14.zip
        unzip 1wolf14.zip
    Go back to DosBox and install the game to C:\WOLF3D.

      C:\> c:
      C:\> cd \
      C:\> cd 1wolf14
      C:\1WOLF14> install

    After installation of the game, copy the .EXE we just compiled to the game folder,

        C:\> c:
        C:\> cd wolf3d
        C:\WOLF3D> copy WOLF3D.EXE WOLF3D.OLD
        C:\WOLF3D> copy ..\WOLFSRC\WOLF.EXE .

    Running the game
    Try to run it:

        C:\> cd wolf3d
        C:\WOLF3D> copy WOLF3D.EXE WOLF3D.OLD
        C:\WOLF3D> copy ../WOLRSRC/OBJ/WOLF3D.EXE .
        C:\WOLF3D> WOLF3D.EXE

    解决显示错误问题:
      C:\> copy C:\vgafiles\VGADICT.WL6 C:\WOLF3D\VGADICT.WL1
      C:\> copy C:\vgafiles\VGAGRAPH.WL6 C:\WOLF3D\VGAGRAPH.WL1
      C:\> copy C:\vgafiles\VGAHEAD.WL6 C:\WOLF3D\VGAHEAD.WL1
    not work

    vi ~/Library/Preferences/DOSBox\ 0.74\ Preferences
    (Linux) ~/.dosbox/dosbox-0.74.conf
    (MAC OS X) ~/Library/Preferences/"DOSBox 0.74 Preferences"

    vi ~/.dosbox/dosbox-0.74.conf
    [render]
        # frameskip: How many frames DOSBox skips before drawing one.
        # aspect: Do aspect correction, if your output method doesn't support scaling this can slow things down!.
        # scaler: Scaler used to enlarge/enhance low resolution modes.
          # If 'forced' is appended, then the scaler will be used even if the result might not be desired.
          # Possible values: none, normal2x, normal3x, advmame2x, advmame3x, advinterp2x, advinterp3x, ...

        frameskip=0
        aspect=false
        scaler=normal2x
    Change that aspect to true:
    Try again :

      C:\WOLF3D> WOLF3D.EXE
    Finally, IT WORKS !

    安装好环境,可以继续学习黑皮书

    GitHub - jagregory/abrash-black-book: Markdown source for Michael Abrash's Graphics Programming Black Book

    Game Engine Black Book

  • 相关阅读:
    TensorFlow实现股票预测(RNN,网络过拟合优化)
    单片机ADC常见的几种滤波方法
    35的程序员被辞了可以自己接外包啊?为什么都那么悲观呢?
    换种方式看后端参数接收、建议躺着看!!!
    Java也能做OCR!SpringBoot 整合 Tess4J 实现图片文字识别
    代码随想录算法训练营day39
    【C语法学习】19 -关闭和刷新文件
    [C++随想录] 模版进阶
    es笔记七之聚合操作之桶聚合和矩阵聚合
    基于Kylin Server V10制作Kylin 4.0.2 server sp2虚拟机镜像
  • 原文地址:https://blog.csdn.net/hb_zxl/article/details/126823164
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号