jbs30000 Posted October 18, 2019 Share Posted October 18, 2019 (edited) Edit, finally have an update. See post 6. So I've created a playfield editor based on common image editors. There's some unfinished features and I regret how I implemented the text tool. I will complete and improve the program, but I need to re-code a bunch of it first, because what started out as neat and orderly coding got sloppy pretty quick. Anyway, you can draw pixels on it, draw shapes, type text, import an image, flip or rotate, etc... It saves the playfield the same way that the FSB tool in the Andrew Davie tutorial does, but before each strip it ads a SEG and then an ORG <segment>. You can also load a saved playfield back into an image and edit it some more if you want. I'll call this my beta version; What the heck. So if you're interested, give it a try. Feedback is always appreciated. I hope you like it. 2600_Playfield_Editor.exe Quick manual.pdf Edited December 8, 2020 by jbs30000 2 Quote Link to comment Share on other sites More sharing options...
TXmarsh Posted October 23, 2019 Share Posted October 23, 2019 This has a lot of potential. Very cool work. Quote Link to comment Share on other sites More sharing options...
jbs30000 Posted October 23, 2019 Author Share Posted October 23, 2019 Thank you. Quote Link to comment Share on other sites More sharing options...
KevKelley Posted October 30, 2019 Share Posted October 30, 2019 Sounds really neat. I am looking forward to playing around with iy for various ideas, including for things like Titlescreens. I am always looking for utility programs that can aid in my learning and programming. Quote Link to comment Share on other sites More sharing options...
jbs30000 Posted October 31, 2019 Author Share Posted October 31, 2019 Glad to hear it. ? Quote Link to comment Share on other sites More sharing options...
jbs30000 Posted December 8, 2020 Author Share Posted December 8, 2020 (edited) So long story short, I stepped away from this for a while, and when I came back, I saw how messy everything was, from the form itself to the coding. So I've started over and have a much better editor. It's not complete, but very close. It can't open or save files yet, and the sprite editors don't do anything. Enabling the sprite editors will be easy. For the loading and saving, I'll probably have to code from scratch because when I look at the code from the old program I can hardly make heads or tails of it. Also, I have a button that I don't know what function to assign it, if any. Suggestions would be appreciated, thank you. Edit: I'm also going to try and improve the rotate function. Edit 2: Sorry, the text also doesn't work on this demo. Edit 3: Boy do I feel stupid. Select, select all, cut, copy, and paste also don't work ?. But that's all, I swear. ? Edit: Post 14 has the newest version. Simplified_Editor.exe Edited December 22, 2020 by jbs30000 1 Quote Link to comment Share on other sites More sharing options...
jbs30000 Posted December 14, 2020 Author Share Posted December 14, 2020 (edited) Well, I have the sprite editors complete, except for problems with undo and redo, which I don't have for the undo and redo for the playfield editor. Edit: Turns out there's a problem with undo and redo regardless of which editor, so I'm re-writing that before moving on to load and save functions. Edited December 14, 2020 by jbs30000 Quote Link to comment Share on other sites More sharing options...
BladeJunker Posted December 15, 2020 Share Posted December 15, 2020 I tried it out and thought the stuff that worked was pretty good. Me I've been looking for tools lately and haven't found a PF editor that lets me work on the Background layer in conjunction for compositions. Also haven't found many with an easy way to add raster interrupts, like between banks or maybe at 4 bit wide intervals. Quote Link to comment Share on other sites More sharing options...
jbs30000 Posted December 16, 2020 Author Share Posted December 16, 2020 22 hours ago, BladeJunker said: haven't found a PF editor that lets me work on the Background layer in conjunction for compositions. I'm not sure what that means. Also haven't found many with an easy way to add raster interrupts, like between banks or maybe at 4 bit wide intervals. Sounds like you're looking for a programming IDE and image editor combo. Quote Link to comment Share on other sites More sharing options...
BladeJunker Posted December 16, 2020 Share Posted December 16, 2020 20 minutes ago, jbs30000 said: I'm not sure what that means. Sounds like you're looking for a programming IDE and image editor combo. I tried looking at the manual PDF but I can't figure out how to input or paint the vertical gradient of the Background layer. On the other matter, so that function can't be incorporated into a PF editor? Quote Link to comment Share on other sites More sharing options...
jbs30000 Posted December 19, 2020 Author Share Posted December 19, 2020 BladJunker. First, the left mouse button is for drawing the foreground, and the right button for the background. Second, please explain in more detail what you are looking for. Everybody else. I fixed two problems that I only just noticed. First, When you pick a new foreground color the playfield should refresh but it didn't. Also, a tiny spelling error kept the background color from being able to be changed. I completed the sprite editors and I'm almost done with load functions. After testing them out I'll post the updated sample program. 1 Quote Link to comment Share on other sites More sharing options...
+MarcoJ Posted December 19, 2020 Share Posted December 19, 2020 wow awesome jbs30000. This will be very useful for a game I'm working which uses full screen asymmetric playfields. Have been scratching around with playerpal with limited efficiency, it's really meant for sprites. Keep up the good work. Quote Link to comment Share on other sites More sharing options...
BladeJunker Posted December 20, 2020 Share Posted December 20, 2020 23 hours ago, jbs30000 said: BladJunker. First, the left mouse button is for drawing the foreground, and the right button for the background. Second, please explain in more detail what you are looking for. Oh, thank you that helps a lot. Ah the color selection process confused me, the whole Ro/BG/FG. I can't seem to change the Playfield color away from black no matter what I select but I did color two Background lines differently. Getting closer heh. Was thinking a good Background tool would be a gradient fill, like a purely vertical plotter where you adjust height and position of a box and fill with a gradient of selected colors Ie. # of colors divided by # of scanlines. Well I have been looking for something that can plot interrupts in scanline rendering of the Playfield. Iirc BMX Airmaster, Robot Tank, and Strat-O-Gems have examples of three color wide Playfields. https://atariage.com/store/index.php?l=product_detail&p=337 https://www.atariage.com/screenshot_page.php?SoftwareLabelID=415 https://www.atariage.com/screenshot_page.php?SoftwareLabelID=37 As it was explained to me it can occur at 3 color clock increments. It's costly to performance but I think one or two interrupts plus the center SCORE bit used wouldn't be unreasonable(Application wise but perhaps not platform performance wise.) for an editor environment. Yeah I know it's not very "standard" 2600 graphical behavior. Is there anyway to flicker a couple Playfield layers, again not great 2600 performance but good for an editor to try different things? I know there's kind of gap between editing and having a 2600 software engine that actually does that, guess anything works in an editor though. Just spit-balling tools to application ideas. Great tool so far, the closer the PF gets to something like a paint program the more user friendly it gets and the more people can learn to craft Playfield graphics. Circle tool is sweet. Quote Link to comment Share on other sites More sharing options...
jbs30000 Posted December 21, 2020 Author Share Posted December 21, 2020 (edited) OK, here's an update. The changes are as follows. 1. You can now change the background colors. 2. You can draw and color sprites. 3. You can load playfields, foreground, and background colors. You cannot save them yet. Turns out the color grids I have should be tall instead of wide. When loading colors I have to swap the bytes around (I.E. $A4 is read as $4A). The program is made to ignore most errors regarding numbers. For example, invalid numbers (l0 instead of 10) and missing numbers will be replaced with zeros. The program will tell you this, although it won't tell you where the errors are. Included is a sample project file, playfield file, and foreground and background colors files. Place everything in the same directory. In case you can't tell, the playfield is a sun, tree, and some grass (I just did a quick, basic image. Screw quality ?.) Edit: I haven't tested loading symmetrical playfields yet. If you want to load one it will load it as a repeat, unless, on the very first line you include the word reflect. Simplified_Editor.exe Test.prj Scenic.asm BGColors.asm PFColors.asm Edited December 21, 2020 by jbs30000 Quote Link to comment Share on other sites More sharing options...
BladeJunker Posted December 22, 2020 Share Posted December 22, 2020 Looking good, appreciate the sample, helps me understand the UI better. Quote Link to comment Share on other sites More sharing options...
+MarcoJ Posted January 2, 2021 Share Posted January 2, 2021 Hi jbs30000, Really nifty little program. Was able to export from the software in the assymetric non-mirrored format in DASM .byte format and successfully display the output on a test kernel. Have included pictures below. Thanks again. Cheers Marco J Quote Link to comment Share on other sites More sharing options...
jbs30000 Posted January 3, 2021 Author Share Posted January 3, 2021 Thanks, but that's the old program. Have you tried the new one from post #14? Quote Link to comment Share on other sites More sharing options...
+MarcoJ Posted January 5, 2021 Share Posted January 5, 2021 On 1/3/2021 at 11:39 PM, jbs30000 said: Thanks, but that's the old program. Have you tried the new one from post #14? Hi Jbs, I have tried the new program too. It looks slicker, and simplified. When it's able to save to ASM, i'll jump ship. I have a few ideas at this point. 1. For saving. If it could save in binary .byte #%0010010 format instead of decimal .byte 224, it would be easier to touch up, or analyse by hand in the code. 2. For editing. For screen heights of non-192, (eg 40 like me) it would be cool if the editing area could scale to fill the whole canvas. At the moment I need to scale in my mind for the pattern that would stretch over 160 lines with 4 scanlines per playfield gap. Cheers Mark Quote Link to comment Share on other sites More sharing options...
jbs30000 Posted January 12, 2021 Author Share Posted January 12, 2021 The option to save in binary, hex, or dec is no problem. I'll add that right away. Vertically scaled "pixels" is a great idea. I'll probably have to implement them a little bit later, but I will do that. 1 Quote Link to comment Share on other sites More sharing options...
jbs30000 Posted January 21, 2021 Author Share Posted January 21, 2021 Not ready to post an updated program yet, but I've been redoing large portions of the program by scratch and thought I'd mention some improvements I made and am making. One, I've sped up the drawing and display routines. Freestyle drawing with the pencil and moving your mouse to change the size of filled in shapes will be noticeably faster. Two, extremely minor, but, wherever you enter numbers, such as the text-boxes at the bottom, you can enter them either in decimal, I.E. 192, hex, I.E. $F23F, or binary, I.E %10000. Three, based on MarcoJ's suggestion, when saving an image and colors there will be the option of doing so in decimal, hex, and binary. Four, I'm in the middle of working on rotating the image. I'll spare the boring details, but this detail is important. The 2600 "pixels"* are roughly over 7 times wider than they are tall, rotating an image will make it look very different. That can't be helped. And five, right now the playfield and sprite editor sizes are based on what Stella displays in NTSC mode. I'm going to see what size the playfield and sprites are for PAL and SECAM so that when the button that changes between the display standards is pressed not only will the palette change, but the playfield and sprites will become the appropriate sizes as well. * I know that the 2600 is analog which is why I put pixels in quotes. 1 Quote Link to comment Share on other sites More sharing options...
lerugray Posted February 21, 2021 Share Posted February 21, 2021 Hi, I've noticed I will get an error in this program whenever I try to build a filled rectangle and accidentally drag the mouse a little past the window itself. Also, as a bonus question, could anyone explain an efficient way to load the ASM generated from this into a ROM? I figure you have to iterate through it somehow. Quote Link to comment Share on other sites More sharing options...
jbs30000 Posted February 26, 2021 Author Share Posted February 26, 2021 Sorry, just saw this. Yeah, for the error I corrected that. Then, while making a lot of improvements to the program I hit a snag. I'm using the dreaded* Visual Basic 2017 with an add-on that allows you to write IL routines (without using the IL Generator class). Anyway, usually things are fine, but sometimes it stops a program from being able to be built. So, long story short I'm working on fixing that so I can get back to work on the editor. As for your second question you can just include the playfield file in the main program, usually after all of the code. * A survey of programmers shows that most hate Visual Basic. Quote Link to comment Share on other sites More sharing options...
jbs30000 Posted March 17, 2021 Author Share Posted March 17, 2021 (edited) OK, an update. Sorry that it's been a while, but I ran into some big problems. Now that those are over, it should be much smoother sailing from here. I've revamped part of the program for the better. The sprite 1 editor has 4 sprites you can draw, and then animate them (to animate them in your own program you need to use your own code.) There's no sprite 2 editor, but obviously it will be the same. There's an option to change the sprite height, but it's not functional yet. I wrote an improved rotate function which also kept everything on the screen by removing spaces and/or shrinking the image, then accidentally deleted it. However; since the image gets messed up either by most or all of the image disappearing, or by keeping the image by shrinking I'm thinking of just not implementing rotate. So the buttons don't work. Also the select, cut, copy, and paste still don't work. For me, those are the four hardest functions, so I'm saving them for last. I did add a new button though. The "I" button after the paint bucket inverts the screen. Foreground and background colors are swapped with each other. Oh, I did away with the extra undo buttons. The single undo and redo will handle the sprites as well as the playfield (right now it's just the playfield.) I used to extra space where the other undo/redo buttons were to make a list of what's been undone and redone. Right now it's just for viewing, but I'll change it so that you can pick a specific undo or redo that you want. Also, it seems to be running a little slower. Not sure why. Finally, you'll probably need place a custom library dll I made in the same folder as the editor. Edit:. Forgot to mention that you need to check the check box above each sprite that you want included in the animation. Simplified_Editor.exe JBS_BMP_Lib.dll Edited March 17, 2021 by jbs30000 3 Quote Link to comment Share on other sites More sharing options...
JohnGri Posted March 16, 2022 Share Posted March 16, 2022 Hi, I'm just getting started with Atari assembly coding. I definitely could benefit from this tool. Your tool generates tables. Can you give me a tip on how to use these tables to draw the playfield? A tutorial I watched set the playfield using this approach which of course will not work with tables. I assume a pointer with an offset will be required lda #$F0 sta PF0 ; setting PF0 bit pattern lda #$FC sta PF1 ; setting PF1 bit pattern Thanks, John Quote Link to comment Share on other sites More sharing options...
jbs30000 Posted March 22, 2022 Author Share Posted March 22, 2022 (edited) If I understand what you're asking.... Outside of the code you include the playfield file, foreground colors file, and background colors file. For example, in one of my test programs, ;SEG Playfield ;ORG $F23F include ".\include\Playfield.asm" ;SEG Playfield_Colors ;ORG $F83F include ".\include\Foreground.asm" ;SEG Background_Colors ;ORG $F93F include ".\include\Background.asm" The SEG and ORG are commented out because they're set up in the .asm files. Inside the Playfield.asm file are PF_Strip_0 to PF_Strip_5. Each PF_Strip has 191 bytes, one for each scanline. PF_Strip_0, PF_Strip_1, and PF_Strip_2 are for the left side PF0, PF1, PF2. PF_Strip_3 to PF_Strip_5 are for the right side PF0, PF1, PF2. (The playfield is set to repeat). Finally, the image is stored upside down, so you set the X register to 191, draw the five bytes across the top of the screen (PF0 is only 4 bits), then decx, draw the next five bytes one scanline down, repeat until X is down to 1, then when it reaches 0 reset it and draw the screen all over again. Edited March 22, 2022 by jbs30000 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.