calamari
Members-
Content Count
369 -
Joined
-
Last visited
Content Type
Profiles
Member Map
Forums
Blogs
Gallery
Calendar
Store
Everything posted by calamari
-
OK good. Well have fun calamari
-
Check this thread: http://www.atariage.com/forums/viewtopic.p...?t=3274&start=0 There is a lot of info on these boards and the search feature is excellent. Did you read the documents that I suggested earlier? calamari
-
You can use Antic 4 to simplify making a custom character set and also a screen based on those characters (like a title screen), background, etc. I would recommend that you familiarize yourself with the Atari 400/800 line of computers. Get the Atari800 emulator and get comfortable with how it works (for example, the debugging monitor). Then, you'll want to learn about the 6502 processor. You'll need to know the limitations of your programming environment. There are some documents on the links page that can get you started with the 6502 and assembly language. After that, start reading about the Atari 5200 arcitecture in my Atari 5200 System Reference Manual. I haven't finished it yet, but the first few chapters are posted. BTW, if anyone finds ANY inaccuracy in this document please let me know. Have fun, calamari
-
Looking good! Will the ball be egg-shaped? And how about a game wrecking red hand or pterodactyl to avoid? calamari
-
I've released 5200BAS 1.94. Here are the new features: Version 1.94, 16Sep2002 * Changed DLIST to disable ANTIC rather than interrupts * Puts double backslashes for TASM style #INCLUDE's * Changed PALETTE to accept a number or variable for the color I forgot to post about 1.93 so here is that: Version 1.93, 16Aug2002 * Fixed IF...GOTO bug when IF isn't the first statement on the line * Fixed KEYPAD bugs * Fixed KEYPAD FIX bug I've also updated the online documentation and put more examples. calamari
-
I tried the code in QuickBasic and it didn't work either, so I messed with it a little until I got the triangle shape. LOCATE expects the row first, then the column (like QuickBasic), but is zero-based, so the upper left corner is LOCATE 0,0.. the lower right corner is LOCATE 23,39. Upon re-examining the code, I realized what was wrong with the inner loop. Here is what 5200BAS is doing with the code (you can verify this by looking at the ASM output). A=A-I ;SEC, SBC I J=I ;LDA I, STA J This overwrites A before it can be used in the loop, also LOCATE modifies A (see http://www.azstarnet.com/~jeffryj/cmdref.html#LOCATE to see where I'm getting all that). Try this: DEFINE I,$FF DEFINE J,$FE DEFINE K,$FD TITLE OFF I = 0: FOR I TO 19 A = 39: A = A - I: K = A J = I: FOR J TO K LOCATE I, J: PRINT "X" NEXT J NEXT I calamari
-
Yep, there is no expression parser in 5200BAS. I decided that having one would seperate the programmer too much from the generated code, and so it would make it too easy to accidentally write bad code. This way you have to think about most every step the 6502 has to do. Now, if I could write an expression parser like they have in C, or QuickBasic it might be okay, because they optimize and rearrange stuff, use register variables, etc. I am not sure how to write such a parser. I know how to do a recursive one where it takes the expression and converts it as-is. It wouldn't make use of pre-existing values and would forget even itself with each step. Not a good way to go for optimized code. I'm not sure how the C compilers do such a good job at it. If someone has some hints in this area they are very welcome. Anyways, it sounds like you found a good workaround, and it's probably optimal in this case. I'm sure you realize 6502 the limitations as well as anyone With 5200BAS you are one step above the 6502 code itself. For me, though, the BASIC-ized ASM is a lot friendlier and easier for my mind to deal with than raw ASM. Now if I could write a language to provide self-motivation and more hours in the day, I'd be set calamari
-
Yeah, but you can change colors for different lines by using a display list interrupt (DLI) routine. An example of this is the colorful Atari logo. But for multiple colors, you'll probably want to use Antic 4. Either way, or even a PM on AtariAge is fine. Happy coding, calamari
-
Your code looks fine, except for the PALETTE 2,Z line. You also shouldn't need the A=0, but it's not hurting anything. The problem is that 5200BAS's PALETTE command only accepts numbers right now. However, it should be trivial for me to have it accept variables for the second parameter. I will add this in there for ya! A workaround for the meantime is COLOR2=Z instead of PALETTE 2,Z Antic 2 is a character mode, and it is indeed 2 colors. The benefit is that the character size is 8x8, compared to Antic 4's double width 4x8 characters. With Antic 4 you get 4/5 colors as a tradeoff for the lower horizontal resolution. There are other Antic modes as well, but those are the only two I've preprogrammed into the SCREEN statement. Most game display lists will have several kinds of Antic lines on the same screen, and so will need to be hand made. I recommend getting the "Atari System Reference Manual", check out the Display List chapter. It is written for the 400/800 but mostly applies to the 5200 also (with the exceptions listed in the conversion document), get the docs here: http://www.azstarnet.com/~jeffryj/5200res.html "Link: Atari System Reference Manual" "File: Atari 800 -> 5200 conversion info" Hope this helps and thanks for the idea on improving PALETTE! calamari
-
Informations on TIP & Mode9++ used in Numen
calamari replied to Heaven/TQA's topic in Atari 5200 / 8-bit Programming
Okay I've been tinkering again. I was thinking about how to get more colors with the 320x192 resolution, and I think I'm getting closer.. My new routine mixes 320x96x2 with 80x96x256 to give 320x96x"512". I doubt that it really produces that many colors, but that's what the math shows. Here is the .zip file: http://www.azstarnet.com/~jeffryj/archway2.zip I am thinking about mixing the CIF 80x192x256 with a 320x192x2 screen for 320x192x512 but the flicker might be too bad, it's already possible to see a little flicker with this one. calamari -
Informations on TIP & Mode9++ used in Numen
calamari replied to Heaven/TQA's topic in Atari 5200 / 8-bit Programming
Okay, I figured out the problem with my programs on the real system. The answer is explained here: http://www.atariarchives.org/dere/chapt05.php#H5_2 When I added the STA WSYNC (or in 5200BAS, WSYNC=A) the weird artifacts cleared right up. There were a couple other problems I was concerned with too: In Atari800 the flickering is noticeable and there is a weird black interference line that seems to move around. I'm happy to report that on the real system the flickering is not noticeable at all, and there is no weird line that moves around. So the images look great! I've deleted lake.zip because the 80x192 screen looks better, so I made a new 80x192 version of the lake and put it in with archway.zip. Both remaining zips have been updated with the WSYNC fix and are available for download: http://www.azstarnet.com/~jeffryj/archway.zip http://www.azstarnet.com/~jeffryj/toystory.zip Have fun, calamari -
Informations on TIP & Mode9++ used in Numen
calamari replied to Heaven/TQA's topic in Atari 5200 / 8-bit Programming
Wow, good question, let's see what I can remember. I started off in GW-BASIC around 1987. I got Microsoft QuickBasic Extended 7.0 in 1989. Somewhere in this time I messed with C Robots a bit. In 1994 I started programming in assembly language using A86. I think my first HTML was in '95 or '96. Did some Pirch PIL scripting around here. In 1997 I started messing with 6502 and Atari 5200 programming. A coworker got me interested in esoteric languages in 1999, so I messed with BrainF***, and wrote Numberix in early 2000. I took a C class and also started working on a BF Basic compiler. Also took an ASM class so I became familiar with TASM. Wrote Hanoi Love and Spaghetti in 2001. As far as VB, I've written a few programs with it since 1999, enough to get kinda familar with it. Right now I'm working on 5200BAS and a couple games, and am taking a Data Structures course that is making me remember C again calamari -
Is there an editor you guys use for making Atari games?
calamari replied to Jet's topic in Programming
Textpad is great! Got my colors set up, tab puts in spaces, I can arrow all over the place, and down at the bottom are the cool file tabs. Thanks for mentioning it! calamari -
Informations on TIP & Mode9++ used in Numen
calamari replied to Heaven/TQA's topic in Atari 5200 / 8-bit Programming
Thanks! I just programmed the BMP convertor for it so I've implemented it . It turned out to look pretty close to the example. Here is the convertor, pics, ROM, and 5200bas program: http://www.azstarnet.com/~jeffryj/toystory.zip calamari -
Informations on TIP & Mode9++ used in Numen
calamari replied to Heaven/TQA's topic in Atari 5200 / 8-bit Programming
Okay here you go.. This is not from the emulator, but it is close to what you could expect. I tried converting the lake & archway but they were too ugly. You'd have to do something like that from hand. This image represents the 320x192x32 mode so there are no interlace lines but there would be a slight flicker. calamari -
Is there an editor you guys use for making Atari games?
calamari replied to Jet's topic in Programming
I also use MS-DOS Edit. I quicky become frustrated with Windows editors because I don't have the same freedom of movement as I've come to expect with MS-DOS Edit. I don't want it to second guess me. For example, if I push the up arrow, it will go up to the same column even if the last character on the line was way to the left. If I wanted the last word I'd push Ctrl-Left after pushing up Other things I like about it: has handy ways to insert control characters (when needed), doesn't use tabs (makes them spaces instead), file size isn't a problem, doesn't change my file extensions, lets me choose what colors I want for the editing window, and of course uses a fixed width font automatically. You can also have multiple files and split the view, but this could use improvement. Maybe someone should write a Windows editor.. make the editing interface just like MS-DOS Edit (all the keys, etc), but improve the multiple file ability by having tabs at the bottom for the different files that are open). Having it inside Windows would also make it better at copy/paste from other apps. It would also be cool to have color profiles where keywords / chars / elements would turn certain colors (the mode would be activated by keypress, NOT by file extension). This would be my dream Windows editor. calamari -
Informations on TIP & Mode9++ used in Numen
calamari replied to Heaven/TQA's topic in Atari 5200 / 8-bit Programming
Well, kinda If you want 320x96 resolution with 32 colors you can mix Graphics 11 (PRIOR=$C0) lines with Graphics 8 (PRIOR=$00). This gives the familiar blank line in between. There are 16 colors all of one brightness (since Graphics 11 is that way), and then if you don't draw a dot, that gives you a background color based on the main color (if you've used Graphics 8 you know what I mean here). Also, each color affects 4 horizontal pixels, so in reality you get 80x96 color resolution, and 320x96 drawing resolution. I tried converting some pictures to this format, and the results didn't look good, at least to me.. but it is possible to be useful with a clever artist, I suppose. You could also regain 320x192 resolution by drawing a second 320x96 screen and bumping it down a line, although this will flicker slightly like the archway demo. calamari -
Informations on TIP & Mode9++ used in Numen
calamari replied to Heaven/TQA's topic in Atari 5200 / 8-bit Programming
Okay, I got 80x192x256 CIP working. It uses two display lists to point to 2 screens of the picture: one for odd lines, the other for even lines. One display list only wastes 23 lines at the top instead of 24 so that mixes the two images. I also cleaned up the Basic program quite a bit (all the TIP stuff is gone from this version). http://www.azstarnet.com/~jeffryj/archway.zip -
Do a Google search for "Mapping the Atari".. this document goes through each memory address that is used. The 8-bit is a real mess with all the different OS stuff mixed in there. I can tell you the 5200 map, though: 5200 Memory and ROM layout Range Description $0000-$0018 Zero page $0019-$00FF Zero page (available) $0100-$01FF Stack $0200-$021B Interrupt vectors $021C-$3FFF RAM (available) $4000-$BFFC ROM (available) $BFFD-$BFFF Title info and start vector $C000-$C01F GTIA $D400-$D40F ANTIC $E800-$E80F POKEY $F800-$FBFF System character set $FC00-$FFFF System ROM calamari
-
5200: keyboard reading magic? (KBCODE $E809)
calamari replied to Clay Cowgill's topic in Atari 5200 / 8-bit Programming
Are you absolutely sure that you must do the Pause loop inside the VBI? You might instead set a flag, like: LDA $01 STA PAUSE Then in the non VBI code you can test to see if PAUSE is non-zero, and if it is then do your wait-for-PAUSE loop. Something like this: LDA PAUSE BEQ NOPAUSE; was Pause mode set in the VBI? PAUSE: ; Yes LDA KEY ;(this variable would be set by your keypad IRQ) CMP #$0D ;Was Pause pressed? BNE PAUSE ; If not, keep looking for it NOPAUSE: One thing I noticed when I first programmed for the 5200 (back in my early 5200 programming days when I was trying to do Moria) was that reading KBCODE in a loop never worked well at all. It would always miss keypresses, etc... so using the keypad interrupt is really the best way to go because you know you have a fresh keypress waiting. See if you can find a way to get around having to poll KBCODE directly, I suspect that is where the problem is. calamari -
Informations on TIP & Mode9++ used in Numen
calamari replied to Heaven/TQA's topic in Atari 5200 / 8-bit Programming
Thanks for the compliments and history behind this special screen mode! If it was used elsewhere that means it must be possible to fix whatever bug is messing up my screen on the real thing How much ROM space is needed? I'm not sure actually, let's calculate it and find out: 80 pixels per row * 96 pixels per column * 1/2 byte per pixel * 2 of each row = 80*96 = 7,680 bytes per screen. However, the image is really split in the middle of the screen to accomodate the whole page boundary $5000 and $6000 thing. The top half of the screen uses 80*48=3840 bytes. That means it wastes $1000-3840, or 4096-3840=256 bytes in the gap between the end of the $5000 page data and the beginning of the $6000 page. That means it takes up 7,936 bytes of ROM space per screen in a raw format. Those 256 bytes could still be put to use, though. This could make for some interesting graphical adventure games with proper compression and bankswitching. I enjoyed the old Sierra adventure games, until they went point & click anyways. calamari -
Informations on TIP & Mode9++ used in Numen
calamari replied to Heaven/TQA's topic in Atari 5200 / 8-bit Programming
I've been messing around with HIP/TIP, etc. I'm not all the way there yet, but here is what I've discovered so far (if any of this is incorrect, PLEASE tell me): These special modes work on an Antic F screen. Each line should have the DLI bit set, including the graphics memory setting lines (so they'll be $CF, and the regular mode lines will be $8F). An Antic F screen uses a lot of memory and crosses a page boundary, so it is important to split up the graphics into 2 or more parts to avoid screen artifacts. This is why my display list has another screen memory set in the middle. I am not sure that I've got TIP working, but I did find a few new screen modes that weren't discussed in the article. One was for 320x96x16 colors (each 4 pixels share the same color). My favorite of the new modes is 80x96x256 colors. This one is great because the colors are very easy to set up. Lay down a line (40 bytes) of colors, then a line (40 bytes) of brightnesses. These combine into 256 distinct colors due to a GTIA bug. There is a blank line between each line of graphics because ANTIC was expecting it to take 2 lines to display, but it only drew one. To get the CIP (calamari Interlaced Picture ) mode, alternate between Graphics 9 (PRIOR=$40) and Graphics 11 (PRIOR=$C0). There is no flicker with this mode. TIP uses a more complicated switching screen with 2 pages of graphics (so it flickers slightly). But you get the nice 160x96x256 resolution. If anyone has figured out the details of TIP please explain them to me. Here is a 5200BAS program example of the CIP 80x96x256 color mode. It works great on the emulator, but there is some kind of problem with it on the 5200, the left side looks great, but the colors go weird on the right. Probably a simple oversight on my part. The complete example with source, binary, etc is at http://www.azstarnet.com/~jeffryj/lake.zip 'Atari 5200 Lake Demo 80x48x256 'Programmed by Jeffry Johnston, 2002 'For 5200BAS Basic Compiler DEFINE MODE,$FF DEFINE DLIH,$0207 '--------------------------------------------------------------------- ' MAIN '--------------------------------------------------------------------- TITLE OFF SET VDSLST=$B400 DLI1:SET VVBLKD=$B600 VBI MEMCOPY $B000,$1000,210:DLIST $1000 PCOLR0=$00:PCOLR1=$02:PCOLR2=$04:PCOLR3=$06 COLOR0=$08:COLOR1=$0A:COLOR2=$0C:COLOR3=$0E COLOR4=$00 MODE=$B4:Y=0 DO:LOOP 'View the picture '--------------------------------------------------------------------- ' DLI 1 '--------------------------------------------------------------------- SUB DLI1 A=PEEK($B800+Y):PRIOR=A 'Set new GTIA mode A=Y:A=A+1:A=A AND $03:Y=A 'Prepare for next mode END SUB '--------------------------------------------------------------------- ' DLI 2 -- Only needed for TIP '--------------------------------------------------------------------- .ORG $B500 A=PEEK($B900+Y):PRIOR=A 'Set new GTIA mode A=Y:A=A+1:A=A AND $03:Y=A 'Prepare for next mode END SUB '--------------------------------------------------------------------- ' VBI -- Only needed for TIP '--------------------------------------------------------------------- SUB VBI 'A=MODE:A=A XOR $01:DLIH=A:MODE=A 'Switch between DLI's (TIP) POP ALL END SUB '--------------------------------------------------------------------- ' DLI TABLES '--------------------------------------------------------------------- .ORG $B800 .BYTE $40,$C0,$40,$C0; 80x96x256 CIP '.BYTE $C0,$80,$C0,$40; 160x96x256 TIP .ORG $B900 .BYTE $C0,$40,$C0,$40; 80x96x256 CIP '.BYTE $C0,$40,$C0,$80; 160x96x256 TIP '--------------------------------------------------------------------- ' DISPLAY LIST -- 192 Antic F DLI lines '--------------------------------------------------------------------- .ORG $B000 .BYTE $70,$70,$70 .BYTE $CF .WORD $5000;$1005 top half of screen memory is at $5000 .BYTE $8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F .BYTE $8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F .BYTE $8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F .BYTE $8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F .BYTE $8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F .BYTE $8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F .BYTE $CF .WORD $6000;$1067 bottom half of screen memory is at $5000 .BYTE $8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F .BYTE $8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F .BYTE $8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F .BYTE $8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F .BYTE $8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F .BYTE $8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F,$8F .BYTE $41 .WORD $1000 '--------------------------------------------------------------------- ' SCREEN DATA '--------------------------------------------------------------------- 'Format is 40 bytes (80 pixels, 1 line) of colors, followed by '40 bytes (80 pixels, 1 line) of brightnesses. This displays as 1 'line of 256 colors, followed by a blank line. Screen is 192 lines 'tall. Data is split between $5000 (lines 0-95) and $6000 (lines '96-191). .ORG $5000 #INCLUDE LAKE.INC Enjoy, calamari -
MAME
-
Informations on TIP & Mode9++ used in Numen
calamari replied to Heaven/TQA's topic in Atari 5200 / 8-bit Programming
I wasn't quite sure what numen was.. but I found it here: "NUMEN - atari 8bit demo by TAQUART group released at Lato Ludzików 2002 in Opalenica, POLAND. The WINNER at demo compo on this party." http://numen.scene.pl/?f=n0 To run it you need to enable rambo 320k ram and pal mode. Looks great with Atari800 DOS. calamari -
Informations on TIP & Mode9++ used in Numen
calamari replied to Heaven/TQA's topic in Atari 5200 / 8-bit Programming
Sounds cool. Do you have any pictures showing the best of HIP, RIP and TIP so we can see the differences? Thanks, calamari
