A downloadable game for Windows, macOS, and Linux

A #cgajam MS-DOS game  (theme: history repeats itself) where you traverse a floating castle in Viana do Castelo to kill the demon Capiroto (again).

How to play:

z - Jump

x - Shoot arrow

c - Attack

Up - Shoot arrow up/climb stairs

Arrows - Move

Esc - Quit

Enter - Pause


Daniel Monteiro - Programming, audio and some art

Pedro Fernandes - Art

Update: experimental OPL2LPT support! To run with it, execute the main game with "viana opl2lpt"

As seen on 8-Bit Guy(18:59)

 The New Retro Show (12:50)

Toni Ortiz

And Jupy Plays Indie Games (3:58)

Install instructions

Tested on a real 486-SL 25Mhz running MS-DOS 7 and a Pentium 600Mhz running FreeDOS. 8 MB of RAM should be enough.

Runs cool on DOSBox.


CastleOfVianaV2.zip 367 kB


Log in with itch.io to leave a comment.

(1 edit) (+1)

You just got featured on The 8 Bit Guy latest video (Ad-Lib Sound Card for the Parallel Port). I couldn't be more shocked when i saw the "Viana" hearth. I never ever expected to see something from my district on 8 Bit Guy! Great work man.

Can't jump, game softlocked. Running Windows 7.

I assume "climb stais" (nice typo btw) means to jump.

What do I do?

It's because you "stai" there =P Thanks for picking that typo.

Regarding the jumping, I assume that Windows might be messing with the shift detection? If you type stuff while holding shift after quitting the game, does it make the letters uppercase?

Thanks for reporting. I will release a newer version (fixing bugs, supporting VGA and adding experimental OPL2LPT support) in the next few days. This version is still the original one, written from scratch during a mad sprint, over 2 weeks.

Shift? I was pressing space. The shift detection is working, let me try using shift.


Sorry for being   s t u p

Is there some way to play it on windows?

you will need DOSBox or a older, 32-bit Windows.

Tested it on Windows Me, but should run fine in Windows 7.

With DOSBox, you could run it anywhere you fancy! :)

There is also a Emscripten-DOSBox version, but emulation is far from accurate.


Awesome, glad to see another entry that's written for DOS :) Out of curiosity, is this running in proper Mode 4h? Or Mode 13h with the CGA colours?

Hello there!

Thanks! This game uses mode 4h and writes to the interleaved memory pages - considering it's a 32 bit protected mode program, it's far from well described on the literature; but I eventually managed it. Somehow, I feel like I should have done like you: a 16 bit application. Well - I'm happy with my results anyway.

Congrats on your game!


Thanks, it's just a shame I couldn't get the performance going well enough. But going to keep at it, and see if I can get it to run on a 286..


SERIOUSLY... This game JAM needs a technical winner and is THIS game. NOW, this is programming the real thing.


A game that you really could have played back in time, very well done. One of the games that was  more "true" to the idea of making a CGA retro style game. Good job !

Thanks! In 1988, we could have earned some serious cash =-P

On a more serious note, it's funny how we can't realize the progress we got with compilers. To have the performance I got while updating the whole screen would have required coding some sick assembler. Towards the end of the deadline, I was getting sloppy and throwing std::vectors all over the place. With some more time and research, this could be optimized to even run on a lower end 386 (being fair - my 486 is quite low end; possibly slower than a high-end 386).

The code is not C++14-ish as my other releases, but still quite far from juggling registers - I might need some ASM for a interrupt handler in order to improve the controls (admittedly, the weakest link in this game).


You and your friend who did the art did an amazing job making this game, one of the best works I have seen lately. Although I dont do this for more than 8 years, I have coded in C++ and even Cobol =p, and thank god technology is way better nowadays. Congrats man !


Having played it (great job!), this actually could be optimized all the way down to an 8088, as the playfield doesn't scroll.  A challenge for the next CGA JAM, perhaps.  :)

Thanks Jim!

This certainly could be worked to run on a 8088, but I only have a 486 at my disposal. Also, I'm still not sure if modern versions of DJGPP are still capable of generating real mode code (used GCC 7, cross compiling from Ubuntu).

Anyway, I'm certainly not done with DOS Game Development :)


You have a few options in 2017 for making 16-bit DOS games coming from a 32/64-bit GCC background:  An old 16-bit compiler like Borland C or Turbo C; OpenWatcom which can compile to a 16-bit output; or probably the best option, a newly-released toolchain based on GCC 6.2 available here: https://blogs.mentor.com/embed... (if the link didn't make it through, google for "Sourcery CodeBench Lite for IA16").

My DOS retrocoding is in a mix of Turbo Pascal and assembler, as the TP IDE allows coding/debugging on the old hardware itself.  But I'm old, and quite insane.

Took me a while, but I finally got GCC-IA16 to work well and even display some basic CGA graphics.

The lack of far pointers leads me believe I will have to rely on ASM for that, right?

Considering I already have to do it for keyboard anyway..


oooh, I like this