Jump to content

Photo

New Atari BBS software.

bbs software cc65 github

390 replies to this topic

#26 Kyle22 OFFLINE  

Kyle22

    River Patroller

  • 3,149 posts
  • Location:McKees Rocks (Pittsburgh), PA

Posted Wed Jul 30, 2014 6:52 PM

This seems like a great project, I am looking forward to the final product.

 

-K



#27 tschak909 ONLINE  

tschak909

    Stargunner

  • Topic Starter
  • 1,956 posts
  • Location:USA

Posted Wed Jul 30, 2014 9:42 PM

I have updated the github page, adding content to the readme, and opening up the wiki and issues pages.

Started work on waiting for calls, ring detection and connect.

-thom

#28 Android8675 OFFLINE  

Android8675

    Moonsweeper

  • 426 posts
  • Incognito'N
  • Location:Prunedale, CA, USA

Posted Thu Jul 31, 2014 9:22 AM

A video showing the first breaths of this thing:

That is sexy. Nice work.

 

What's taking the modem commands? an actual physical modem or APE or something else? Sorry for my noobishness. Very excited to see this.



#29 tschak909 ONLINE  

tschak909

    Stargunner

  • Topic Starter
  • 1,956 posts
  • Location:USA

Posted Thu Jul 31, 2014 9:24 AM

That is sexy. Nice work.
 
What's taking the modem commands? an actual physical modem or APE or something else? Sorry for my noobishness. Very excited to see this.


Altirra has R: support, that can either go to a physical serial port, to an actual modem, OR in my case, to its built in TCP/IP virtual modem. Altirra emulates a subset of Hayes modem commands and can either make or accept connections from the outside world from port 9000 by default. I am using that to develop this.

-Thom

#30 kogden OFFLINE  

kogden

    Dragonstomper

  • 636 posts

Posted Thu Jul 31, 2014 12:44 PM

Are you planning on slapping together an API for external modules like games?



#31 Android8675 OFFLINE  

Android8675

    Moonsweeper

  • 426 posts
  • Incognito'N
  • Location:Prunedale, CA, USA

Posted Thu Jul 31, 2014 3:00 PM


Requirements:

  • Big disk of some sort, either a large 65535 sector ATR, a hard disk, whatever. (If you're trying to get this to work on a single density 810, come here so I can thwap you.)

/rofl

 

Gonna try to get cc65 running to see if I can make the binaries, want to fallow this project... closely. ;) Maybe I can help with testing later.



#32 tschak909 ONLINE  

tschak909

    Stargunner

  • Topic Starter
  • 1,956 posts
  • Location:USA

Posted Thu Jul 31, 2014 3:01 PM

I'm hoping it can be a hell of a lot more generic, than that.

Since the serial driver is resident, I want to try and literally do a "LEGO" approach to BBS construction, where you could swap out different modules and how they're called,

So a game would just be another consequence of loading a module.

e.g.

* a FRONT-END module, that is the first thing a user sees.. (the most basic would simply be, Press <CR> to determine line endings.)
* a text file display module, "Spit this file out, e.g. WELCOME, NEWS, BULLETIN"
* a user module, (e.g. you may choose to use a user id#, or a first, last name, or a handle, whatever.), which would return a user ID for the system.
* a menu module (ask for a choice, go do something.)
* a forum module (read, write public messages)
* an email module (read, write private messages)

I'm not going to even bother with a file transfer module, why? There's no point. If somebody wants it, they can write it.

These can be assembled into a very generic BBS, or into for example a Citadel like structure, whatever.

As for how the API will work, I'm not sure, I'm making this all up as I go along, and could really use some code collaboration on this front (if not, no big deal, i'll figure it out eventually.)

As for what's happening now, I am making the BBS detect rings, and answer. This works. Now I am adding a small stub to spit out a message, and then 'hang up' by flapping DTR for a few moments. I'll then commit, push, and make a youtube status video.

We can talk about all the fun stuff, once all the menial tasks are working. :)

-Thom

#33 Android8675 OFFLINE  

Android8675

    Moonsweeper

  • 426 posts
  • Incognito'N
  • Location:Prunedale, CA, USA

Posted Thu Jul 31, 2014 4:09 PM

I agree, file transfers, waste of time. Right now I'm gonna see if there are any Roguelikes made with cc65... http://www.roguebasi...hp?title=SRogue

 

I should just write my own.

 

Figured out how to build using cc65 for windows, actually really easy. There's a daily cc65 snapshot for windows, extract to c:\cc65, add c:\cc65\bin to PATH. Git ataribbs code, make, badda-bing.

 

(Though I'll have to test the build when I get home)



#34 tschak909 ONLINE  

tschak909

    Stargunner

  • Topic Starter
  • 1,956 posts
  • Location:USA

Posted Thu Jul 31, 2014 4:31 PM

Ok, latest code committed and pushed. And as promised, here's a youtube vid of it accepting "calls"



-Thom

#35 bf2k+ OFFLINE  

bf2k+

    Stargunner

  • 1,755 posts
  • Location:Boot Factory BBS 2k+

Posted Thu Jul 31, 2014 4:35 PM

Cool!



#36 Android8675 OFFLINE  

Android8675

    Moonsweeper

  • 426 posts
  • Incognito'N
  • Location:Prunedale, CA, USA

Posted Thu Jul 31, 2014 5:00 PM

Ok, latest code committed and pushed. And as promised, here's a youtube vid of it accepting "calls"

-Thom

 

Gonna call you speedy...


Edited by Android8675, Thu Jul 31, 2014 5:00 PM.


#37 Albert ONLINE  

Albert

    Quadrunner

  • 34,124 posts

Posted Thu Jul 31, 2014 5:08 PM

Nice!  This will be fun to watch evolve.  Ultimately, what would I need in order to connect an Atari 8-bit to the Internet so I could put a BBS online?  I assume there are Windows and OS X ATASCII terminal emulators that can connect to 8-bit BBSs via the internet?  

 

This might be a project I'd have fun contributing to once it evolves a bit further.  Been a while since I've done 6502 Assembly, though.  I did write BBS software for the Atari ST a long time ago (company was, "Digitally Mastered Software", so it was "DMS BBS").  Never released, but we made good progress on it, the BBS was online, and you could connect to it.  The system supported connecting multiple ST systems together via MIDI as well.  I bet I still have the source for that on an ST disk somewhere that is no longer readable.  I wrote lots of mods and modules for the Carina II software I was running on my 8-bit board, although that was all in Atari BASIC.  Those were fun times!

 

What's the fastest baud rate the 8-bit can handle?  9600?

 

Man, I haven't typed "+++" in years!!!

 

 ..Al

 

PS: I like the Pitfall! background on one of your desktops.  :) 



#38 Android8675 OFFLINE  

Android8675

    Moonsweeper

  • 426 posts
  • Incognito'N
  • Location:Prunedale, CA, USA

Posted Thu Jul 31, 2014 5:18 PM

Nice!  This will be fun to watch evolve.  Ultimately, what would I need in order to connect an Atari 8-bit to the Internet so I could put a BBS online?  I assume there are Windows and OS X ATASCII terminal emulators that can connect to 8-bit BBSs via the internet?


I run ICET terminal on my 8-bit and connect via SIO2PC cable running APE on the PC, that converts the AT commands to tell APE to connect the Atari via TCP/IP. (for example, "ATDI shodan.synchro.net" would connect you to my BBS if it was up.

Easier way is to run Altirra which does the same thing.
 

This might be a project I'd have fun contributing to once it evolves a bit further.  Been a while since I've done 6502 Assembly, though.


Not Assembly, cc65 which is C for 6502 chipsets.

I did write BBS software for the Atari ST a long time ago (company was, "Digitally Mastered Software", so it was "DMS BBS").  Never released, but we made good progress on it, the BBS was online, and you could connect to it.  The system supported connecting multiple ST systems together via MIDI as well.  I bet I still have the source for that on an ST disk somewhere that is no longer readable.  I wrote lots of mods and modules for the Carina II software I was running on my 8-bit board, although that was all in Atari BASIC.  Those were fun times!


Would love to see that if you could find the source.

What's the fastest baud rate the 8-bit can handle?  9600?


19.2k is possible using the ICE-T, SIO2PC setup I mentioned above.

#39 Albert ONLINE  

Albert

    Quadrunner

  • 34,124 posts

Posted Thu Jul 31, 2014 5:23 PM

Not Assembly, cc65 which is C for 6502 chipsets.


Derp, I totally spaced on that. Well, that would certainly make it easier.
 

Would love to see that if you could find the source.


It's possible I would be embarrassed by the source at this point, as that was my first large-scale C project. :)
 

19.2k is possible using the ICE-T, SIO2PC setup I mentioned above.


Cool. Thanks for the answers!

..Al

#40 tschak909 ONLINE  

tschak909

    Stargunner

  • Topic Starter
  • 1,956 posts
  • Location:USA

Posted Thu Jul 31, 2014 6:19 PM

Yeah, the code is written in C for the CC65 compiler. (This whole project is literally a test to see _what_ I can do with CC65).

The +++, right now is a compromise.

It seems the serial API in cc65 needs a little fleshing out for the Atari device, there is an API call to do 'ioctl' calls (which are the POSIXy way of doing non-standard non-file like things to a device.), but on the driver that I have, it's unimplemented. This will have to be fleshed out to implement the ioctl's as XIO calls into CIO, as there is no way to do things like stop/start concurrent mode, or drop/raise the DTR which would be the brute force way of hanging up the MODEM.

As this coding sprint is complete, I am not adding any more features, until I debug what I currently have, as it _is_ currently buggy. I just want it to work, and work correctly. Some examples: Buffers aren't flushed after matching (this is especially messy with the CONNECT, as this is the reason why the first +++ fails, there's still data in the buffer from the previous connect string, a tail of carriage returns and line feeds.). So The insane progress you've seen will slow down as I work through these bugs.

This is usually how I approach development, sprint towards a specific goal, pushing code at the end of every day, followed by a debugging cycle, pushing code as the bits are fixed. Repeat, until enough is working, then polish. Then repeat the whole cycle.

Al, or anyone, it would be great to have a helping hand! For anyone who wants to contribute, I can help not only situating a build environment, but also helping with getting to grips with any C, etc... I understand this is not a standard language for community Atari 8-bit hacking, but I hope you all will see that it is the right choice for this package. :)

-Thom

#41 tschak909 ONLINE  

tschak909

    Stargunner

  • Topic Starter
  • 1,956 posts
  • Location:USA

Posted Thu Jul 31, 2014 10:04 PM

Ok ok.. I couldn't resist... :)



-Thom

#42 BillC OFFLINE  

BillC

    Stargunner

  • 1,718 posts
  • Location:BC Canada

Posted Thu Jul 31, 2014 11:39 PM

Nice!  This will be fun to watch evolve.  Ultimately, what would I need in order to connect an Atari 8-bit to the Internet so I could put a BBS online?  I assume there are Windows and OS X ATASCII terminal emulators that can connect to 8-bit BBSs via the internet?  

 

This might be a project I'd have fun contributing to once it evolves a bit further.  Been a while since I've done 6502 Assembly, though.  I did write BBS software for the Atari ST a long time ago (company was, "Digitally Mastered Software", so it was "DMS BBS").  Never released, but we made good progress on it, the BBS was online, and you could connect to it.  The system supported connecting multiple ST systems together via MIDI as well.  I bet I still have the source for that on an ST disk somewhere that is no longer readable.  I wrote lots of mods and modules for the Carina II software I was running on my 8-bit board, although that was all in Atari BASIC.  Those were fun times!

 

What's the fastest baud rate the 8-bit can handle?  9600?

 

Man, I haven't typed "+++" in years!!!

 

 ..Al

 

PS: I like the Pitfall! background on one of your desktops.   :)

An MIO/BB serial port can handle 19,200 baud, but this is about equal to a 9,600 baud modem with compression turned on. In the early/mid 90's I used to connect to Compuserve @ 9,600 and capture the Atari8 messages to the MIO's 1MB RAM-disk, then read through it later offline. There was software available that would index the message file and allow following the different threads.

 

BillC

IIRC Compuserve ID: 76327,1416



#43 bf2k+ OFFLINE  

bf2k+

    Stargunner

  • 1,755 posts
  • Location:Boot Factory BBS 2k+

Posted Fri Aug 1, 2014 3:33 AM

Have you tested on real hardware yet?



#44 tschak909 ONLINE  

tschak909

    Stargunner

  • Topic Starter
  • 1,956 posts
  • Location:USA

Posted Fri Aug 1, 2014 5:28 AM

No. I don't have the setup.

It will not work on real hardware yet, because of the concurrent mode limitation (except maybe on a MIO or BB serial port).

-Thom

#45 w1k OFFLINE  

w1k

    Stargunner

  • 1,660 posts
  • Location:martin, slovakia

Posted Fri Aug 1, 2014 6:57 AM

its possible to download ATR?



#46 tschak909 ONLINE  

tschak909

    Stargunner

  • Topic Starter
  • 1,956 posts
  • Location:USA

Posted Fri Aug 1, 2014 7:12 AM

its possible to download ATR?


I could make one..but, not sure how useful it would be to anyone. ;) It barely answers the phone at this point. Do you want to poke around with the code?

also, for the reasons I've outlined above, the code won't work on a real 850, yet...not until I figure out how to deal with the oddities in the serial driver.

-Thom

#47 w1k OFFLINE  

w1k

    Stargunner

  • 1,660 posts
  • Location:martin, slovakia

Posted Fri Aug 1, 2014 9:34 AM

i want test it with APE, SIO2PC, DRAGON cart..etc :)



#48 tschak909 ONLINE  

tschak909

    Stargunner

  • Topic Starter
  • 1,956 posts
  • Location:USA

Posted Fri Aug 1, 2014 10:11 AM

It'll most likely fail for now outside of anything not Altirra or Atari800 emulator.

Do you have a PC or Mac that can run cc65?

-Thom

(as an aside commentary, that Dragon Cart seems like a terrible design. It's a barely smart ethernet-on-a-chip, which requires a fully functional TCP/IP stack on the host, mind you that a fully functional IP stack to do anything useful takes at least 32K of RAM in my personal experience... Why oh why is there a fucking insistence that it had to be a pure 6502 solution? If you want ethernet on an 8-bit, plop a beefy microcontroller+ethernet SoC on, with a chunk of SRAM for buffer, and tie that to either cartridge or PBI, keep the TCP/IP stack on the cart's firmware, and just expose a lightweight register set to do different functions!)

-Thom

#49 Shawn Jefferson OFFLINE  

Shawn Jefferson

    Stargunner

  • 1,986 posts
  • Location:Victoria, Canada

Posted Fri Aug 1, 2014 9:52 PM

There is also good extended memory support (Shawn Jefferson wrote a 130XE banked driver that I can extend to support up to the 1088K RAMBO XL on the U1MB, which, would be a lot of wonderful breathing room.)

 
If you do extend the driver, or clean up/optimize the one I wrote, submit it to the cc65 Atari library maintainer.  My driver was really just a quick hack that I haven't touched since, and I'm sure (positive) it can be optimized and cleaned up a bit.

PS. The driver was written to give the Atari an extended memory driver, since it didn't have one and the other platforms were making it jealous. The driver adheres to the cc65 "standard", so all extended memory accesses go through a small 256 byte window (since cc65 functions strive to be cross platform and that's what this driver is for.)

You will get better performance just writing your own extended memory functions, but if you want cross platformness, or quick prototyping, the cc65 memory driver works fine.

Edited by Shawn Jefferson, Fri Aug 1, 2014 10:46 PM.


#50 Shawn Jefferson OFFLINE  

Shawn Jefferson

    Stargunner

  • 1,986 posts
  • Location:Victoria, Canada

Posted Fri Aug 1, 2014 10:42 PM

For example, I see you return values for most functions are int. With cc65, int is 16-bits and 16-bit operations are slow on a 6502. Everytime you evaluate the return value, it does 16-bit operations. It's better to use (unsigned) char. IIRC cc65 never promotes it to 16-bits, only when it is really needed (this is non-standard behaviour for a C compilers).


Yes, you should always use unsigned char variables unless you absolutely need something else. If you're programming much in cc65, just get used to using them. :)
 

If I were you, I'd replace the global config structs and pointers and all, completely with separate variables. Loads and stores will turn into lda/sta combinations instead of indirect addressing.


This is not true (anymore anyway). Using global structs will generate code that uses absolute addressing mode (since the address of all the struct elements is known at link time). It's true for local structs, as all local variables are put on the stack (by default), and cc65 uses C stack offsets to access local variables.
 

Have a look at the static locals command line option. All functions that do not need to be re-entrant better not have their local variables on the stack (which is slow). Functions that really do need to be reentrant can be sandwiched between #pragma statements to override the command line option.


Static locals can be a good thing, but personally, I'd get the software running, and then start optimizing (in C), by making some variables register variables (you have 6 you can use in each function), and then global zeropage variables, replacing function variables with global variables (so you get absolute addressing modes), and on. You can get some good speedups by just doing some smarter C coding, before having to rewrite in ASM.
 

And for for-loops, if you do not exceed 255, also use an unsigned char instead of an int. Basically, use chars unless you really cannot.


Agree, and look at making your loop counters register variables, and always use pre-increment! There are some tips on the cc65 page(s) that help in generating better code. http://cc65.github.i...doc/coding.html
 

There might be more, but this is just what came to mind :)


When in doubt, use the source! -T and --listing will be your friends here, and you already know to look at the library source to see what cc65 is doing behind the scenes for you.

Edited by Shawn Jefferson, Fri Aug 1, 2014 11:19 PM.






Also tagged with one or more of these keywords: bbs, software, cc65, github

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users