Jump to content
IGNORED

Tool to help planning the 76 cycles


SvOlli

Recommended Posts

[update: FridgeGrid now has it's own webpage]

 

During hacking up another idea for a demo, I figured I needed something helping me plan on how to use the 76 cpu cycles across the screen. Usually I take a whiteboard for a task like this, but since the planning involved moving around some objects, I came up with the idea for a piece of software that can be roughly described as: fridge magnets with a grid to put them in.

Here's what it looks like at the moment:
post-31204-0-59981800-1339782450_thumb.png
(This scene is fictional but rather common for creating an asymmetrical playfield, just to give you an idea.)

It's written in C++/Qt and will run on Linux, Windows and Mac OS X. I've already successfully created a version for every one of these platforms. When in a state that's worth releasing it will be as open source and binary for the three platforms.

This leaves me with two questions:
- Do you think it will be worth releasing?
- Do you have a name for it? My working title "FridgeGrid" is kind of dull.

Edited by SvOlli
  • Like 6
Link to comment
Share on other sites

This is pretty cool!

Thanks!

 

I usually do this on paper, and it's a pain in the ass.

I wanted to do some not straight forward demo calculation and needed asymmetrical playfield on the same scanline. And I figured, before going through the p.i.t.a. thing on paper or whiteboard, I'd rather like to hack up a simple tool for it. A very rough version of the tool got the job done.

 

I vote for "Kernel Fridge Grid"! =)

Since "Fridge Grid" seems to be popular, but I'm tending rather to either "76 Fridge Grid" or "Fridge Grid 76"... "Kernel" is too generic, even Linux has one. ;-) But I'll leave this open to discussion.

Link to comment
Share on other sites

A nice option to include is branching for planning multiple paths the game program can take

I was wondering how that would work... Right now you can just stack the different kernels vertically and it's not so hard to see the jumps from one to the other. You can even color-code the jumps so they're easier to spot.

 

and maybe a source anylizer with a database of DASM/6502 commands, and how many clock cycles they take.

It would be interesting if it was possible to store a sequence of commands in each block, even if the program itself doesn't count the cycles. It could be just text really, a field where you'd either explain something or write code and calculate how many cycles that code would take, and resize the block accordingly.

Link to comment
Share on other sites

something like this could be useful on other systems too. But then we'd want option for 63, 64, 65, 114 cycles per scanline to cover C64/A8/7800, plus option to "make unavailable" selected slots due to DMA.

Since this is really just the digital implementation of fridge magnets pulled into a grid, it already works for other systems. Maximum width is set to 76 right now, but nothing keeps you from putting two 57 cycle markers side by side. Something like planning badlines of the C64 is also already doable, since it's just moving some markers around.

 

The tool is really intended just as something like a mindmap tool: no import from source code, no export to source code. Just something that helps you to order your thoughts on how to solve a rather complex problem. But this idea of using this tool for kept me thinking.

 

Since the tool is rather generic I'd dropping the idea of including the "76" or anything else hinting to the 2600 like "VCS", "Stella", "Kernel". So at the end of the day, unless there no other cool idea for a name, I'll really stick with "Fridge Grid", since it describes best, what it is and what it does.

Link to comment
Share on other sites

  • 6 months later...

I had been using a simple Excel / Open Office spreadsheet to plan the timing and the jumps.

post-23660-0-60821300-1357064255_thumb.jpg

 

 

I was permitted to upload the .ods and .xls file with their original filenames, so you will have to replace the .txt extension with .xls / .ods

 

I'm sorry for the wrecked up formating of the file, nevertheless the content is still valid

2600timing_ods.txt

2600timing_xls.txt

Edited by Richi_S
  • Like 2
Link to comment
Share on other sites

  • 3 months later...

After watching the talk "Poems For Bugs" by lft on the Revision 3.0 Party, I decided to pick up work on this tool again, to get it somewhat completed.

 

One of the new things is a free text area where you can put in some quick notes, on what the sheet is about. But there's also one thing I need help: I want to include a set of templates. As an example I attached one I did for the asymmetrical playfield. It also shows the intention of using it.

 

If you think, you can provide me with one or more templates - regardless the system - drop me a pm or let me know otherwise, and I'll send you the current version for your system (Windows, MacOS X or Linux).

 

Thanks in advance for the help,

SvOlli

 

P.S.: This is the seminar that got me started again:

 

http://youtu.be/jfNU5QQBwi0

post-31204-0-03983900-1365105305_thumb.png

  • Like 1
Link to comment
Share on other sites

Fix your Makefiles. There are lots of hardcoded paths in there. I'm getting compilation problems like these:

 

make: *** No rule to make target `/opt/mxe/usr/i686-pc-mingw32/mkspecs/unsupported/win32-g++-4.6-cross/qmake.conf', needed by `Makefile'. Stop.

 

edit: For those more low-tech inclined, there's lft's raster paper: http://www.linusakesson.net/programming/rasterpaper/ - I'm working on a 76 cycle variant.

Edited by Tjoppen
Link to comment
Share on other sites

A generated Makefile was accidently checked in. Use "rm src/Makefile" as a workaround.

 

Fixed in the repository now, as well as some changes preparing different styles for the grid.

 

Edit: updated precompiled versions for Windows and Mac are available at: http://svolli.de/software/fridgegrid/

Edited by SvOlli
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Started using that tool these days. Nice though pretty raw still.

Should be simple enough to allow to 'read in' 6502-assembler code automatically?

I mean some dialog to feed in some asm snippet. Im close to writing a small wrapper in python 6502->xml.

Feels a bit tedious to duplicate, rename and move all 'magnets'. So some group-select would be nice (i.e. its nasty to shift all magnets a few cycles).

A (preset) row of cycles would also be cool. I know I could do that manually as well now. Even more so after bragging about python wrappers ;-)

Just comments :)

Also, even 'LDA ZP' is to wide a text to be visble within a 3-cycle-block. Maybe sizeable blocks or fonts?

Compiled out of the box now and can be used super-intuitive at the current state though. Very nice.

Just a bit too little gain over any vector-drawing-tool or spreadsheet even, yet.

Maybe even some 6502-opcode selection-window?

To just pick from all the opcodes with pre-set color for the different adress-modes?

 

Edit:

set parameters could include 'position' as well. That would help already. Also position could 'match' cycle, then there wouldbe need for < 0 positions though in the current 76-cycle preset.

Edited by enthusi
Link to comment
Share on other sites

Feels a bit tedious to duplicate, rename and move all 'magnets'. So some group-select would be nice (i.e. its nasty to shift all magnets a few cycles).

Yes, but that tedious work was what I needed to plan an effect. I did not create blocks for each assembly command, but for a function that would probably not be separated. Something like:

LDA ZP+0,X
STA PF0
LDA ZP+1,X
STA PF1
LDA ZP+2,X
STA PF2

Would always go in one block named "Copy PF" and be 21 blocks in size.

 

A (preset) row of cycles would also be cool.

That's a cool idea. Drag an item back to a special menu point, to add it as a new "new item".

 

I know I could do that manually as well now. Even more so after bragging about python wrappers icon_winking.gif

Wouldn't it be better to just have an additional (commandline) tool that just generates the xml for loading via fridgegrid?

 

Also, even 'LDA ZP' is to wide a text to be visble within a 3-cycle-block. Maybe sizeable blocks or fonts?

I could use "balloon help" that pops up, when the mouse is hovering an item.

 

set parameters could include 'position' as well. That would help already. Also position could 'match' cycle, then there wouldbe need for < 0 positions though in the current 76-cycle preset.

And what if someone wants to use it on a Z80 based machine? Or Motorola's 6809?

 

If you manage to write a converter 6502 -> xml in python, I'd be glad to add this in a "contributions" folder. The tool in itself is intended to be rather abstract. Hey, lft does the same on paper for the C64: http://www.linusakes...paper/index.php

 

Thanks for the feedback!

Link to comment
Share on other sites

  • 2 years later...
  • 2 years later...

The sourcecode of FridgeGrid got an upgrade to Version 1.1 with the following new features:

- ported from Qt4 to Qt5

- export to PNG

- new files can be created from templates, so far are included:

- Atari 2600

- C64 PAL

- VIC PAL and NTSC

 

No binaries available yet, as all my build environments besides Linux were dropped during migrating my main system.

 

I need to set up MXE again for static Qt5 applications. Anyone got an idea how to cross-build stuff for Mac OS X on Linux?

Link to comment
Share on other sites

  • 1 month later...

FridgeGrid now has it's own webpage

 

It also contains binary version for MacOS X (compiled on 10.6) and Windows. There also is a link to my self-compiled repositories for Debian/Ubuntu which contain versions of FridgeGrid for several different distributions and processor architectures.

 

There also is a detailed example on how I use it.

  • Like 3
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...