VDP Reg Calculator

For anything related to VDP (plane, color, sprite, tiles)

Moderators: BigEvilCorporation, Mask of Destiny

Post Reply
ElBarto
Very interested
Posts: 160
Joined: Wed Dec 13, 2006 10:29 am
Contact:

VDP Reg Calculator

Post by ElBarto »

Hello,

I was bored so I made this thing.
Feel free to report me any bugs or suggestion for the design (cause yes it's ugly for now :P)

Cheers.
Pascal
Very interested
Posts: 200
Joined: Wed Nov 29, 2006 11:29 am
Location: Belgium
Contact:

Post by Pascal »

hèhèhè great :)

i did the same long time ago in wxwindows
http://www.pascalorama.com/article.php?news=28&cat=21
KanedaFr
Administrateur
Posts: 1154
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr »

it seems everyone made one ;)
(yep, me too... in Flash so on or offline)
TmEE co.(TM)
Very interested
Posts: 2452
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) »

I made one for doing VDP command words, so I give it an address and it gives me command words I can use to get things happen ^^
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
LocalH
Very interested
Posts: 152
Joined: Tue Dec 19, 2006 5:04 pm

Post by LocalH »

Gimme gimme gimme, I hate manually bitshifting to get the command word to write to a given place in V/C/VS RAM...could really use it now too =P
TmEE co.(TM)
Very interested
Posts: 2452
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) »

Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
LocalH
Very interested
Posts: 152
Joined: Tue Dec 19, 2006 5:04 pm

Post by LocalH »

Ugh, DOS. Someone needs to make a third-party NTVDM for 64-bit Windows...
Flygon
Very interested
Posts: 60
Joined: Mon Sep 28, 2009 11:26 am
Contact:

Post by Flygon »

You could always use DOSBox. Not perfect, but, hey.
Chilly Willy
Very interested
Posts: 2993
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy »

Flygon wrote:You could always use DOSBox. Not perfect, but, hey.
I was about to suggest the same thing. The linux version is really nice - just CD to where the DOS program is and run "dosbox dosapp.exe" and it'll automatically mount the current dir as c: and run the app. That's enough for most DOS programs to work correctly. If you need more, you might have to change the config file, but I've managed to avoid that so far. I only need to set the config file to run Windows in dosbox. I don't know if the Windows version is as nice about handling DOS apps like that, but it's worth trying.
HardWareMan
Very interested
Posts: 753
Joined: Sat Dec 15, 2007 7:49 am

Post by HardWareMan »

LocalH wrote:Ugh, DOS. Someone needs to make a third-party NTVDM for 64-bit Windows...
Not to be confused DOS and console. For example, FAR is console programm but not DOS. It's WIN32 application. And yes, console programms are small, fast and simple. And they do not stink mice. :3
TmEE co.(TM)
Very interested
Posts: 2452
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) »

I tried making a win32 version with FreeBASIC but seems QB an FB understand some things differently so I got to do some rewriting.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
LocalH
Very interested
Posts: 152
Joined: Tue Dec 19, 2006 5:04 pm

Post by LocalH »

HardWareMan wrote:
LocalH wrote:Ugh, DOS. Someone needs to make a third-party NTVDM for 64-bit Windows...
Not to be confused DOS and console. For example, FAR is console programm but not DOS. It's WIN32 application. And yes, console programms are small, fast and simple. And they do not stink mice. :3
Oh, I agree, I love a good console application. This is straight up 16-bit DOS code though, as Tiido mentions in the previous post he made it with QuickBASIC?

To get off on a tangent, I'm really surprised noone has made a replacement NTVDM that uses emulation as necessary to support running 16-bit code. Non-x86 NTVDM implementations already did this anyway for all code.

I'd use DOSBox, but it seems a bit heavy to use for only a console program (that will probably execute faster, even within DOSBox, than it takes the host to actually load the DOSBox executable). Source, Tiido? If you don't wanna screw around with it, I'll try to make a FB version of it =P
TmEE co.(TM)
Very interested
Posts: 2452
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) »

The problem basically was that Read fields had some numbers missing for some reason. Looking at it I cannot really see why it would happen, I do some working around to get past signed Longs issue in QB, sometimes its such a pain not having support for unsigned data types. FB fixes that part though, so with some variable declarations and adjustments things should get fixed up nicely.

The source code is here :

Code: Select all

'Tiido's ultimate MD VDP command word calculator !!! version 0.1a

PRINT
PRINT "TmEE's MD VDP command word generator, v0.1"
PRINT "Copyright 2009 Tiido Priim„gi"
PRINT

ADDR$ = COMMAND$: B% = 0
IF ADDR$ = "" THEN INPUT "4 HEX digit address  : $", ADDR$: B% = 1
IF LEN(ADDR$) > 4 THEN PRINT "Input too long, 4 HEX digits only": END
IF LEN(ADDR$) < 4 THEN PRINT "Input too short, 4 HEX digits only": END
ADDR$ = UCASE$(ADDR$)
ADDR& = 0
FOR i% = 1 TO 4
A$ = MID$(ADDR$, i%, 1)
SELECT CASE A$             'dirty :P
CASE "0": A% = 0
CASE "1": A% = 1
CASE "2": A% = 2
CASE "3": A% = 3
CASE "4": A% = 4
CASE "5": A% = 5
CASE "6": A% = 6
CASE "7": A% = 7
CASE "8": A% = 8
CASE "9": A% = 9
CASE "A": A% = 10
CASE "B": A% = 11
CASE "C": A% = 12
CASE "D": A% = 13
CASE "E": A% = 14
CASE "F": A% = 15
CASE ELSE: A% = 0
END SELECT
ADDR& = ADDR& + ((16 ^ (4 - i%)) * A%)
NEXT i%
IF B% <> 1 THEN PRINT "Input address        : $" + HEX$(ADDR& AND 65535)
PRINT
COMMADDR& = ((ADDR& AND &H3FFF) * 65536) OR ((ADDR& AND 49152) \ 16384&)
COMMWORD& = &H40000000: DMACOMM& = &H0
COMMWORD& = COMMWORD& OR (DMACOMM& AND 65535)
COMMWORD& = COMMWORD& OR COMMADDR&
PRINT "VRAM Write, No DMA   : $"; HEX$(COMMWORD&)
COMMWORD& = &H40000000: DMACOMM& = &H80
COMMWORD& = COMMWORD& OR (DMACOMM& AND 65535)
COMMWORD& = COMMWORD& OR COMMADDR&
PRINT "VRAM Write, DMA/Fill : $"; HEX$(COMMWORD&)
COMMWORD& = &H40000000: DMACOMM& = &HC0
COMMWORD& = COMMWORD& OR (DMACOMM& AND 65535)
COMMWORD& = COMMWORD& OR COMMADDR&
PRINT "VRAM Write, DMA/Copy : $"; HEX$(COMMWORD&)
COMMWORD& = &H0: DMACOMM& = &H0
COMMWORD& = COMMWORD& OR (DMACOMM& AND 65535)
COMMWORD& = COMMWORD& OR COMMADDR&
PRINT "VRAM Read            : $"; HEX$(COMMWORD&)
PRINT
COMMWORD& = &H40000010: DMACOMM& = &H0
COMMWORD& = COMMWORD& OR (DMACOMM& AND 65535)
COMMWORD& = COMMWORD& OR COMMADDR&
PRINT "VSCR Write, No DMA   : $"; HEX$(COMMWORD&)
COMMWORD& = &H40000010: DMACOMM& = &H80
COMMWORD& = COMMWORD& OR (DMACOMM& AND 65535)
COMMWORD& = COMMWORD& OR COMMADDR&
PRINT "VSCR Write, DMA      : $"; HEX$(COMMWORD&)
COMMWORD& = &H10: DMACOMM& = &H0
COMMWORD& = COMMWORD& OR (DMACOMM& AND 65535)
COMMWORD& = COMMWORD& OR COMMADDR&
PRINT "VSCR Read            : $"; HEX$(COMMWORD&)
PRINT
COMMWORD& = &HC0000000: DMACOMM& = &H0
COMMWORD& = COMMWORD& OR (DMACOMM& AND 65535)
COMMWORD& = COMMWORD& OR COMMADDR&
PRINT "CRAM Write, No DMA   : $"; HEX$(COMMWORD&)
COMMWORD& = &HC0000000: DMACOMM& = &H80
COMMWORD& = COMMWORD& OR (DMACOMM& AND 65535)
COMMWORD& = COMMWORD& OR COMMADDR&
PRINT "CRAM Write, DMA      : $"; HEX$(COMMWORD&)
COMMWORD& = &H20: DMACOMM& = &H0
COMMWORD& = COMMWORD& OR (DMACOMM& AND 65535)
COMMWORD& = COMMWORD& OR COMMADDR&
PRINT "CRAM Read            : $"; HEX$(COMMWORD&)
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
ElBarto
Very interested
Posts: 160
Joined: Wed Dec 13, 2006 10:29 am
Contact:

Post by ElBarto »

I've updated mine with an address calculator.
TmEE co.(TM)
Very interested
Posts: 2452
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) »

...and my FB attempt was not broken, my mind was and I thought the results I got were bad, comes out everything is fine, and here's the FB version :
http://www.fileden.com/files/2008/4/21/ ... _WIN32.rar
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
Post Reply