Skip to content

Commit

Permalink
Updated 7800basic to v0.18
Browse files Browse the repository at this point in the history
  • Loading branch information
chunkypixel committed Mar 14, 2021
1 parent 83f2fe2 commit 3b7334b
Show file tree
Hide file tree
Showing 41 changed files with 142 additions and 59 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

The following enhancements and changes have been made to Atari Dev Studio:

## 0.7.0

* Updated 7800basic to v0.18 (Windows, Linux, macOS)

## 0.6.9

* Updated Stella to v6.5.2 (Windows, Linux [Deb], macOS). Note: Linux 32-bit is currently v6.2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ batari Basic created by Fred 'batari' Quimby is a BASIC-like language used in th

batari Basic is an external project and can be downloaded separately [here](https://github.com/batari-Basic/batari-Basic). Further information is about this release is available here at [AtariAge](https://atariage.com/forums/topic/300856-official-home-for-batari-basic).

### 7800basic (release 0.17 - 20210215)
### 7800basic (release 0.18 - 20210314)
7800basic is a BASIC-like language for creating Atari 7800 games. It is a compiled language that runs on a computer, and it creates a binary file that can be run with an Atari 7800 emulator, or the binary file may be used to make a cartridge that will operate on a real Atari 7800. 7800basic is derived from batari basic, a BASIC-like language for creating Atari 2600 games. Special thanks to the bB creator, Fred Quimby, and all of the the bB contributors!

7800basic is included as part of this extension with many thanks to Mike Saarna (RevEng). 7800basic is an external project and can be downloaded separately [here](https://github.com/7800-devtools/7800basic). Further information about this release is available here at [AtariAge](http://atariage.com/forums/topic/222638-7800basic-beta-the-release-thread).
Expand Down
2 changes: 1 addition & 1 deletion out/bin/compilers/7800basic/7800bas.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ FILE *stdoutfilepointer;

extern int currentdmahole;

#define BASIC_VERSION_INFO "7800basic v0.17"
#define BASIC_VERSION_INFO "7800basic v0.18"

int main(int argc, char *argv[])
{
Expand Down
Binary file modified out/bin/compilers/7800basic/7800basic Guide.pdf
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800basic.Darwin.x64
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800basic.Darwin.x86
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800basic.Linux.x64
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800basic.Linux.x86
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800basic.Windows.x64.exe
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800basic.exe
Binary file not shown.
2 changes: 2 additions & 0 deletions out/bin/compilers/7800basic/7800basic_variable_redefs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
; This file contains variable mapping and other information for the current project.

Binary file modified out/bin/compilers/7800basic/7800filter.Darwin.x64
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800filter.Darwin.x86
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800filter.Linux.x64
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800filter.Linux.x86
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800filter.Windows.x64.exe
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800filter.exe
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800header.Darwin.x64
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800header.Darwin.x86
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800header.Linux.x64
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800header.Linux.x86
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800header.Windows.x64.exe
Binary file not shown.
100 changes: 76 additions & 24 deletions out/bin/compilers/7800basic/7800header.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// 7800header - a simple app to generate/interrogate a a78 header.
// Michael Saarna (aka RevEng@AtariAge)

#define HEADER_VERSION_INFO "7800header 0.10"
#define HEADER_VERSION_INFO "7800header 0.13"

void usage(char *binaryname);
uint32_t phtole32(uint32_t value);
Expand Down Expand Up @@ -143,9 +143,11 @@ int main(int argc, char **argv)
myheader.controller1 = 1;
if (myheader.controller2 > 9)
myheader.controller2 = 1;
myheader.tvformat &= 1;
if(myheader.version<3)
myheader.tvformat &= 1;
myheader.saveperipheral &= 3;
myheader.xm &= 1;
myheader.version = 3;
}


Expand All @@ -169,10 +171,11 @@ int main(int argc, char **argv)
printf(" \"name game name\" Set the game name in the header.\n");
printf(" \"exit\" Exit the utility. Unsaved changes will be lost.\n");
printf("\n");
printf("Options: rom@4000 ram@4000 bank6@4000 pokey@450 pokey@4000 mram@4000\n");
printf(" supergame supergameram supergamebankram absolute activision\n");
printf(" tvpal tvntsc savekey hsc xm 7800joy1 7800joy2 lightgun1 lightgun2\n");
printf(" paddle1 paddle2 tball1 tball2 2600joy1 2600joy2 driving1 driving2\n");
printf("Options: rom@4000 ram@4000 bank6@4000 pokey@450 pokey@4000 mram@4000 \n");
printf(" pokey@440 ym2151@460 supergame supergameram supergamebankram\n");
printf(" absolute activision souper tvpal tvntsc composite savekey\n");
printf(" hsc xm 7800joy1 7800joy2 lightgun1 lightgun2 paddle1 paddle2\n");
printf(" tball1 tball2 2600joy1 2600joy2 driving1 driving2\n");
printf(" keypad1 keypad2 stmouse1 stmouse2 amouse1 amouse2\n");
printf("> ");

Expand Down Expand Up @@ -321,7 +324,7 @@ void setupheaderdefaults()
headergamesize = phtole32(gamesize);

// a78 header format version...
myheader.version = 1;
myheader.version = 3;

strncpy(myheader.console, "ATARI7800 ", 16);
strncpy(myheader.gamename, "My Game ", 32);
Expand All @@ -331,15 +334,20 @@ void setupheaderdefaults()
myheader.romsize3 = (headergamesize >> 8) & 0xff;
myheader.romsize4 = (headergamesize >> 0) & 0xff;

// bit 0 = pokey at $4000
// bit 1 = supergame bank switched
// bit 2 = supergame ram at $4000
// bit 3 = rom at $4000
// bit 4 = bank 6 at $4000
// bit 5 = supergame banked ram
// bit 6 = pokey at $450
// bit 7 = mirror ram at $4000
// bit 8-15 = special
// bit 0 = pokey at $4000
// bit 1 = supergame bank switched
// bit 2 = supergame ram at $4000
// bit 3 = rom at $4000
// bit 4 = bank 6 at $4000
// bit 5 = supergame banked ram
// bit 6 = pokey at $450
// bit 7 = mirror ram at $4000
// bit 8 = activision banking
// bit 9 = absolute banking
// bit 10 = pokey at $440
// bit 11 = ym2151 at $440/$441
// bit 12 = souper
// bit 12-15 = special
myheader.carttype1 = 0;
myheader.carttype2 = 0;

Expand Down Expand Up @@ -422,6 +430,7 @@ void setunset(char *command)
myheader.carttype2 = myheader.carttype2 | 2;
setunset("unset activision");
setunset("unset absolute");
setunset("unset souper");
}
else
{
Expand Down Expand Up @@ -517,6 +526,7 @@ void setunset(char *command)
myheader.carttype1 = myheader.carttype1 | 1;
setunset("unset absolute");
setunset("unset supergame");
setunset("unset souper");
}
else
myheader.carttype1 = myheader.carttype1 & (1 ^ 0xff);
Expand All @@ -528,23 +538,58 @@ void setunset(char *command)
myheader.carttype1 = myheader.carttype1 | 2;
setunset("unset activision");
setunset("unset supergame");
setunset("unset souper");
}
else
myheader.carttype1 = myheader.carttype1 & (2 ^ 0xff);
}
else if (strcmp(noun, "souper") == 0)
{
if (set)
{
myheader.carttype1 = myheader.carttype1 | 16;
setunset("unset activision");
setunset("unset absolute");
setunset("unset supergame");
}
else
myheader.carttype1 = myheader.carttype1 & (16 ^ 0xff);
}

else if (strcmp(noun, "pokey@440") == 0)
{
if (set)
myheader.carttype1 = myheader.carttype1 | 4;
else
myheader.carttype1 = myheader.carttype1 & (4 ^ 0xff);
}
else if (strcmp(noun, "ym2151@460") == 0)
{
if (set)
myheader.carttype1 = myheader.carttype1 | 8;
else
myheader.carttype1 = myheader.carttype1 & (8 ^ 0xff);
}
else if (strcmp(noun, "tvpal") == 0)
{
if (set)
myheader.tvformat = 1;
myheader.tvformat = myheader.tvformat | 1;
else
myheader.tvformat = 0;
myheader.tvformat = myheader.tvformat & 0xfe;
}
else if (strcmp(noun, "tvntsc") == 0)
{
if (set)
myheader.tvformat = 0;
myheader.tvformat = myheader.tvformat & 0xfe;
else
myheader.tvformat = 1;
myheader.tvformat = myheader.tvformat | 1;
}
else if (strcmp(noun, "composite") == 0)
{
if (set)
myheader.tvformat = myheader.tvformat | 2;
else
myheader.tvformat = myheader.tvformat & 0xfd;
}
else if (strcmp(noun, "savekey") == 0)
{
Expand Down Expand Up @@ -787,6 +832,12 @@ void report(void)
printf("Activision ");
if ((myheader.carttype1 & 2) > 0)
printf("Absolute ");
if ((myheader.carttype1 & 4) > 0)
printf("pokey@440 ");
if ((myheader.carttype1 & 8) > 0)
printf("ym2151@460 ");
if ((myheader.carttype1 & 16) > 0)
printf("souper ");
printf("\n");

printf(" controllers : ");
Expand Down Expand Up @@ -850,12 +901,13 @@ void report(void)
printf("\n");

printf(" tv format : ");
if (myheader.tvformat == 0)
if ((myheader.tvformat & 1) == 0)
printf("NTSC");
else if (myheader.tvformat == 1)
else if ((myheader.tvformat & 1) == 1)
printf("PAL");
else
printf("unknown");
if (myheader.tvformat & 2)
printf(" composite");

printf("\n\n");
}

Expand Down
Binary file modified out/bin/compilers/7800basic/7800header.exe
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800makecc2.Windows.x64.exe
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800makecc2.exe
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800optimize.Windows.x64.exe
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800optimize.exe
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800postprocess.Windows.x64.exe
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800postprocess.exe
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800preprocess.Windows.x64.exe
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800preprocess.exe
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800sign.Windows.x64.exe
Binary file not shown.
Binary file modified out/bin/compilers/7800basic/7800sign.exe
Binary file not shown.
7 changes: 7 additions & 0 deletions out/bin/compilers/7800basic/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ char *filterterm[] = {
"^0.topscreenroutine",
"^0.bottomscreenroutine",
"^0.altgamestart",
"_main2 ",
"_main3 ",
"_main4 ",
"^ATOMICSPRITEUPDATE",
"^FINESCROLLENABLED",
"^AVOXVOICE",
Expand Down Expand Up @@ -128,6 +131,10 @@ char *filterterm[] = {
"^ALWAYSTERMINATE",
"^NODRAWWAIT",
"^NOLIMITCHECKING",
"^INFO: Label",
"^CRASHDUMP",
"^BREAKPROTECT",
"^dumpbankswitch",
""
};

Expand Down
18 changes: 17 additions & 1 deletion out/bin/compilers/7800basic/includes/7800basic.h
Original file line number Diff line number Diff line change
Expand Up @@ -534,10 +534,26 @@ pokey4priority DS 1 ; $1EB
pokey4offset DS 1 ; $1EC
endif

; see if we need an interrupthold byte...
INTERRUPTNEEDED SET 0
ifconst .topscreenroutine
INTERRUPTNEEDED SET 1
endif
ifconst .bottomscreenroutine
INTERRUPTNEEDED SET 1
endif
ifconst .userinterrupt
INTERRUPTNEEDED SET 1
endif
if INTERRUPTNEEDED = 1
interrupthold DS 1 ; $1ED
endif

ifnconst CANARYOFF
canary DS 1 ; $1ED
canary DS 1 ; $1EF
endif


ifnconst bankswitchmode
echo " stack allowance:",[($1FF - .)/2]d,"nested subroutines."
else
Expand Down
3 changes: 0 additions & 3 deletions out/bin/compilers/7800basic/includes/7800basicheader.asm
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ BD48K = %00000010
BD1800 = %00000101
BD4000 = %00000110

ifconst ROM16K
;BEADHEADER = 1
endif
ifconst ROM32K
BEADHEADER = 1
endif
Expand Down
Loading

0 comments on commit 3b7334b

Please sign in to comment.