Some BIOSs initialize the VGA card by default into a mode where the high bit of background nybble signals that the cell should blink. The simple way to avoid this is by restricting the background colours to the range 0…7. However, since our mouse cursor is implemented by swapping the foreground and the background colours, we also need to restrict the foreground colours to the range 0…7.
		
			
				
	
	
		
			47 lines
		
	
	
	
		
			981 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
	
		
			981 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
| NASM = nasm
 | |
| PYTHON = python3
 | |
| QEMU = qemu-system-i386
 | |
| 
 | |
| BUILDOPTS =
 | |
| 
 | |
| .SUFFIXES:
 | |
| .SUFFIXES: .bin .asm .ans .wall
 | |
| 
 | |
| all: ponydos.img
 | |
| 
 | |
| FS_FILES = shell.bin ponydos.wall passion.wall viewer.bin hello.bin memory.bin ponydos.asm
 | |
| 
 | |
| ponydos.img: ponydos.bin $(FS_FILES)
 | |
| 	$(PYTHON) assemble_floppy.py $@ ponydos.bin $(FS_FILES)
 | |
| 
 | |
| ponydos.inc: ponydos.asm ponydos_static.inc
 | |
| 	$(NASM) -fbin -d SYMBOLS -o /dev/null ponydos.asm | $(PYTHON) extract_symbols.py $@ ponydos_static.inc
 | |
| 
 | |
| ponydos.bin: ponydos_static.inc
 | |
| 
 | |
| shell.bin: ponydos.inc
 | |
| 
 | |
| hello.bin: ponydos.inc
 | |
| 
 | |
| viewer.bin: ponydos.inc
 | |
| 
 | |
| memory.bin: ponydos.inc
 | |
| 
 | |
| .asm.bin:
 | |
| 	$(NASM) -fbin $(BUILDOPTS) -o $@ $<
 | |
| 
 | |
| .ans.wall:
 | |
| 	env BUILDOPTS='$(BUILDOPTS)' $(PYTHON) process_wallpaper.py $@ $< 7 0 0 0
 | |
| 
 | |
| run: ponydos.img
 | |
| 	$(QEMU) -drive file=$<,index=0,if=floppy,format=raw
 | |
| 
 | |
| clean:
 | |
| 	rm -f *.bin *.img *.wall ponydos.inc
 | |
| 
 | |
| distclean: clean
 | |
| 
 | |
| size: ponydos.asm
 | |
| 	@$(NASM) -fbin -d SIZE -o /dev/stdout ponydos.asm | wc -c
 | |
| 
 | |
| .PHONY: all run clean distclean size
 |