Jump to content
IGNORED

7800basic beta, the release thread


RevEng

Recommended Posts

MESS, just as with real hardware, provides a plethora of display tweak options. Just like the old saying of NTSC - is never the same color twice, so will often be people's adjustments and preferences. MESS allows you to tweak practically every aspect of the picture. The base palette is accurate, as far as YIQ/YUV --> RGB values are concerned with a system phase shift set to ~25.7 degrees, the factory/new setting.

 

Additionally, the "default" setting in MESS has no bias respecting Contast, Brightness, Color/Saturation, Hue/Tint, and is as baseline as can possibly be achieved. It's up to the end user to tweak accordingly :) :

 

post-18-0-07989600-1428845149_thumb.pngpost-18-0-54858500-1428845151_thumb.pngpost-18-0-54270500-1428845154_thumb.png

 

Regardless, there are overall guidelines, and if ProSystem must be used, realize the default palette the comes with it is a manually hand-selected one, and sort of a hybrid between NTSC and PAL, with a phase shift of ~27-28 degrees.

 

Nonetheless, these palette options would serve much better. ;)

 

 

  • Like 2
Link to comment
Share on other sites

Thanks for the explanation, Trebor!

Nothing to do with your points and not directed at you, but there's one more elaboration I'd like to make on the impossibility of converting certain RGB colors to the Atari NTSC or PAL palettes.

The Atari 8-bits, the 2600, and the 7800 all use a constant saturation value to generate the paletted colors, and only vary the chroma and luma. Less saturated (aka less vibrant) colors in the mid to low luminance levels just don't exist in the Atari palette, and neither do highly saturated (aka more vibrant) bright colors.

 

So even with tweaks, the 7800basic converter will only get slightly more accurate with regard to hue. Ie. Making your green grass color imports as green rather than green-blue or green-yellow. It will never be able to import medium-bright dirt-brown as anything but yellow or orange, since medium-bright dirt-brown is a less saturated version of those colors, and doesn't existing in the Atari palette.

 

So hand tweaking of at least some imported color values is likely always going to be required.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

There's an updated 7800basic in the first post.

The changes...

  • fixed memory protection for images that weren't on a byte boundaries for their imported mode.
  • plugged some memory leaks.
  • extended the long line warning to 150 characters, since 7800basic should handle 200 characters.
  • added vertical recenter to the high score table if the screen height is changed.
  • Like 5
Link to comment
Share on other sites

I feel crappy that I never went very far with Bear Arms. Hey, does anyone know if there's a better way to make sprites and graphics than The GIMP? I dunno, it's just a really kludgy way of doing business. It's a shame there's not a graphics editor especially for this compiler. (or is there...?)

Link to comment
Share on other sites

I feel crappy that I never went very far with Bear Arms. Hey, does anyone know if there's a better way to make sprites and graphics than The GIMP? I dunno, it's just a really kludgy way of doing business. It's a shame there's not a graphics editor especially for this compiler. (or is there...?)

I say wait until something like vb basic comes out for 7800 basic,until then use gimp or photoshop

Link to comment
Share on other sites

I feel crappy that I never went very far with Bear Arms. Hey, does anyone know if there's a better way to make sprites and graphics than The GIMP? I dunno, it's just a really kludgy way of doing business. It's a shame there's not a graphics editor especially for this compiler. (or is there...?)

 

I tend to use Paint Shop Pro myself. I have an older version, Paint Shop Pro 8, that I've had for years so not sure what the current version is like.

 

http://www.paintshoppro.com/en/

Link to comment
Share on other sites

  • 2 weeks later...

Whichever banks you call them in is entirely up to the flow of the game logic. Those commands are bank neutral - they have nothing to do with ROM - so you should execute them only when you want to actually save or load memory from the hsc/savekey/atarivox device.

Link to comment
Share on other sites

  • 1 month later...

There's an updated 7800basic in the first post.

 

Its mostly fixes and foundation, though zone locking and the ability to dynamically disable the pause button are new features. The change log follows.

  • added foundation code to allow some 7800basic assembly modules to be relocated in ROM
  • added code to throw an error if "return" is used as a label
  • added "lockzone #" and "unlockzone #" commands
  • added the "pausedisable" variable
  • revamped interrupt code to add routines that cannot be interrupted by DMA and/or must happen every frame
  • rewrote non-visible DLL generation routine, added more DLLs after the visible screen
  • Like 6
Link to comment
Share on other sites

Online version updated:

 

randomterrain.com/7800basic.html

 

If anyone finds any mistakes, please let me know.

 

I'm in the middle of converting my pages so they will shrink all the way down to phone size. I went ahead and converted the 7800basic page while I was updating it. Any large images, charts, or text boxes get a scroll bar at the bottom when the page becomes small enough.

  • Like 5
Link to comment
Share on other sites

Currently if you try to add a constant into a bitwise-variable (ie: Player{ACTIVE}) the compile will fail because it apparently assumes it's a variable. Could it be changed so that if it's a declared constant, and has a value of 0-7, then it could be allowed? Would help with code readability. :)

Link to comment
Share on other sites

I'll take a look next time I'm in around that code. Its actually a bigger change than it might sound. There are 6502 optimizations used to pull values for certain bit positions, and presently constant values aren't remembered by the compiler, but are instead just passed onto DASM.

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...

I'm not sure if this is a bug, or if I'm still getting the hang of things (and it might be, since I'm giving myself a crash course on bankswitching, after I figured out that my game won't fit into 48KB), but I wanted to bring this to RevEng's attention, just in case.

Recently, I switched the ROM size for my game, from 48KB to 128KB, and turned on POKEY support (even though I haven't programmed in anything besides set pokeysupport on, yet). After a bit of trial-and-error, and playing around with code, just to test things, I started to rebuild the game to how I had it, before I switched to 128KB ("set romsize 128k"), and started putting code into the DMA hole in bank 1 (it's half sprites, and half code).

Here's where things get interesting:

After I started using bank 1's DMA hole, the compiler started telling me I had negative free space available in bank 1, but everything compiled just fine, and the game still runs, without any graphical glitches whatsoever.

This is the output from my most recent compilation (I was adding the fourth round's code back in; before switching to 128KB, I had five rounds programmed in, and started to run low on space):

piccolo@piccolo:~/7800projects/bubblebobble$ 7800basic.sh bb-prealpha_sep11-2015.bas
Using dasm version: DASM 2.20.11 20140304
Starting build of bb-prealpha_sep11-2015.bas
7800basic 0.3 Jul 15 2015 19:45:55

*** (): INFO, bank #1, GFX Block #0 starts @ $A000
        digittop alphatop digitbot alphabot rounddigits round001
        round001large round002 round002large round003 round003large
        round004 round004large round005 round005large
*** (): INFO, bank #1, GFX block #0 has 432 bytes left (27 x 16 bytes)


*** (): INFO, bank #1, DMA hole #0 starts @ $B000
        DMA hole code found and imported


*** (): INFO, bank #2, GFX Block #0 starts @ $A000
        digittop alphatop digitbot alphabot rounddigits
*** (): INFO, bank #2, GFX block #0 has 1568 bytes left (98 x 16 bytes)


*** (): INFO, bank #2, DMA hole #0 starts @ $B000
        no code defined for DMA hole


*** (): INFO, bank #8, GFX Block #0 starts @ $C000
        bubblunleft01 bubblunleft02 bubblunleft03 bubblunleft04
        bubblunleft05 bubblunleft06 bubblunleft07 bubblunright01
        bubblunright02 bubblunright03 bubblunright04 bubblunright05
        bubblunright06 bubblunright07 bubblunleft11 bubblunleft12
        bubblunright11 bubblunright12 bubblunleft21 bubblunleft22
        bubblunright21 bubblunright22 bubblunleft31 bubblunleft32
        bubblunleft33 bubblunleft34 bubblunright31 bubblunright32
        bubblunright33 bubblunright34 bubblunleft35 bubblunleft36
        bubblunleft37 bubblunleft38 bubblunright35 bubblunright36
        bubblunright37 bubblunright38 bubblunleft41 bubblunleft42
        bubblunleft43 bubblunleft44 bubblunright41 bubblunright42
        bubblunright43 bubblunright44
*** (): INFO, bank #8, GFX block #0 has 1152 bytes left (72 x 16 bytes)


*** (): INFO, bank #8, DMA hole #0 starts @ $D000
        no code defined for DMA hole

*** (): INFO, bank #8, GFX Block #1 starts @ $E000
        bubblegrn0 bubblegrn1 bubblegrn2 bubblegrn3 bubblegrn6 bubblegrn7
        bubblegrn8 bubblegrn9 bubblegrn0a bubblegrn1a bubblegrn2a
        bubblegrn3a zenchanleft1 zenchanleft2 zenchanleft3 zenchanleft4
        zenchanright1 zenchanright2 zenchanright3 zenchanright4
*** (): INFO, bank #8, GFX block #1 has 2816 bytes left (176 x 16 bytes)


7800basic compilation complete.
User-defined 7800.asm found in current directory
-> -7808 bytes of ROM space left in the main area of bank 1. <-
             384 bytes of ROM space left in DMA hole 0.
   8192 bytes of ROM space left in the main area of bank 2.
             4096 bytes of ROM space left in DMA hole 0.
   12186 bytes of ROM space left in the main area of bank 7.
   0 bytes of ROM space left in the main area of bank 8.
             4096 bytes of ROM space left in DMA hole 0.
   pokeysound assembly:  282  bytes

Complete.
Read $C000 bytes of cartridge data.
Cartridge hash area is from $F000 to $FFFF.
Cartridge signature for 'bb-prealpha_sep11-2015.bas.bin' appears to be empty.
Encrypting... 00 01 02 03 04 05 06 07 08 success!

A valid cartridge signature is:
03 3c 09 f5 18 35 1e 70  8c a1 bd b6 82 b5 d5 3f
8a 5e 29 e1 49 38 a4 3c  5b 06 eb 8b ad ac 7e 6c
4e 46 e5 ef 5f a4 2e 74  e4 70 ba c0 03 8e be 71
25 1d 0d 6f 34 bc 56 9d  f4 b1 37 7a 1d 59 e5 d7
7c 0a 1e 34 f7 0e 62 17  a3 ce b9 0b ad e0 10 e9
08 06 f6 d6 4d 57 4e 17  86 61 07 9a b2 a2 ef 11
7a 24 3c 1d aa 26 52 0a  f3 b1 2d 0a d3 7f fd 27
bb c7 ee 2a 39 53 89 c5

Wrote back 120 bytes to 'bb-prealpha_sep11-2015.bas.bin'.

7800header 0.2 Jul 15 2015 19:45:57
  opened parameter file a78info.cfg
  set rom size: 128k
  set cart option: supergame
  set cart option: pokey@4000
piccolo@piccolo:~/7800projects/bubblebobble$ 

Here's how the banks are set up, as well, if this helps:

 

Bank 1: 8KB code, 8KB graphics.

Bank 2 through bank 7: 16KB code. Banks 3 through 6 are currently unused.

Bank 8: 16KB graphics.

 

I've only noticed it do this, when I put dmahole 0 somewhere in bank 1's code. If I take it back out, it stops showing the remaining bytes as a negative number. But since it compiles and runs (in MESS 0.164 64-bit) fine either way, I was wondering if it was some sort of bug, something I did, or just what you thought about it, RevEng.

 

The source code is attached, and I can also send you/attach the graphics, as well, if you wanna do a test compile of your own.

 

Thanks in advance.

bb-prealpha_sep11-2015.bas

Link to comment
Share on other sites

After digging into the issue, it appears the ROM layout is as-intended, but there's a bug for the free-space message when the game is using bank-switching and sticking code in dmaholes.

 

I'll need to rethink that free space reporting code, and update for the next release.

 

Big thanks to MobiusAqua for assistance in tracking it down. :thumbsup:

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Welcome to the official 7800basic release thread!

 

At the bottom of this post I've attached the 7800basic zip file, which contains Windows, Linux, and OS X 32-bit binaries (these work on 64-bit systems) as well as source code. There are also some example programs in the /samples directory.

 

Random Terrain has provided an online version of the 7800basic guide.

 

Please report any issues, errors, etc., in this thread. If this language is going to be useful, bug-free, and a pleasure to use, it's going to be through shared collaboration.

 

And most of all, lets use this language to make some new kick-ass games for our all too often overlooked platform. :)

 

attachicon.gif7800basic.0.3beta20150715.zip

 

Does anyone one have screen shots or detailed information on how to install 7800Basic? After a week or so I was able to get Batari Basic working by reading/downloading in the forums. I am new to programming let alone CMD prompts etc. Any information will be helpful. I can at least say that taking apart others Batari Basic programs I was able to make my 1st game. I would like to take a shot at the 7800 as we all know it allows for better graphics and possibilities. Thanks in advance for any help you can provide.

Link to comment
Share on other sites

Does anyone one have screen shots or detailed information on how to install 7800Basic? After a week or so I was able to get Batari Basic working by reading/downloading in the forums. I am new to programming let alone CMD prompts etc. Any information will be helpful. I can at least say that taking apart others Batari Basic programs I was able to make my 1st game. I would like to take a shot at the 7800 as we all know it allows for better graphics and possibilities. Thanks in advance for any help you can provide.

 

Speaking of batari Basic, did you read these sections:

 

randomterrain.com/atari-2600-memories-batari-basic-commands.html#gettingstarted

 

randomterrain.com/atari-2600-memories-batari-basic-vbb.html#install_vbb

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...