-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ea49e62
Showing
8 changed files
with
401 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Ray tracer in a boot sector. | ||
Copyright (c) 2024 Oscar Toledo G. https://nanochess.org/ | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Makefile contributed by jtsiomb | ||
|
||
src = ray.asm | ||
|
||
.PHONY: all | ||
all: ray.img ray.com | ||
|
||
ray.img: $(src) | ||
nasm -f bin -o $@ $(src) | ||
|
||
ray.com: $(src) | ||
nasm -f bin -o $@ -Dcom_file=1 $(src) | ||
|
||
.PHONY: clean | ||
clean: | ||
$(RM) ray.img ray.com | ||
|
||
.PHONY: rundosbox | ||
rundosbox: ray.com | ||
dosbox $< | ||
|
||
.PHONY: runqemu | ||
runqemu: ray.img | ||
qemu-system-i386 -fda ray.img |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Ray Tracer in a boot sector | ||
|
||
*by Oscar Toledo G. Apr/12/2024* | ||
|
||
https://nanochess.org | ||
|
||
https://github.com/nanochess | ||
|
||
### What is this? | ||
|
||
This is a port of the amazing Ray Tracer in Atari 8-bit BASIC by D. Scott Williamson. You can see it at [https://bunsen.itch.io/raytrace-movie-atari-8bit-by-d-scott-williamson](https://bunsen.itch.io/raytrace-movie-atari-8bit-by-d-scott-williamson) | ||
|
||
I asked him for permission to make a port to a boot sector, and here it is. | ||
|
||
If you are going to run it in real hardware it requires a minimum of a Pentium Pro, otherwise most modern emulators will be able to run it. | ||
|
||
### How to use it. | ||
|
||
If you want to assemble it, you must download the Netwide Assembler (NASM) from www.nasm.us | ||
|
||
Use this command line: | ||
|
||
nasm -f bin ray.asm -Dcom_file=1 -o ray.com | ||
nasm -f bin ray.asm -Dcom_file=0 -o ray.img | ||
|
||
Tested with VirtualBox for macOS running Windows XP running this interpreter, it also works with DOSBox and probably with QEMU: | ||
|
||
qemu-system-x86_64 -fda ray.img | ||
|
||
![Ray tracer in a boot sector](RayTracer.png) | ||
|
||
|
||
Do you want to learn 8086/8088 assembler? Get my books Programming Boot Sector Games containing an 8086/8088 crash course! Also available More Boot Sector Games. Now available from Lulu and Amazon! |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
nasm -f bin ray.asm -o ray.img | ||
nasm -f bin ray.asm -Dcom_file=1 -o ray.com | ||
|
Oops, something went wrong.