Author Topic: Getting started programming?  (Read 4153 times)

DarkKobold

  • Hero Member
  • *****
  • Posts: 1198
Re: Getting started programming?
« Reply #15 on: November 01, 2016, 05:35:49 PM »
Well, I started with the 6502 mostly because I do have a hard time sticking with a language. My spare time right now is filled with repairing these consoles and learning Russian.
...
These systems hold my interest far more than Java does so learning 6502 seemed logical.

The thing is ... these systems are basically blank when you turn them on.

You've got to understand the hardware, and know what you want to write.



... Oh thank god for HuC :D
Hey, you.

TheOldMan

  • Hero Member
  • *****
  • Posts: 958
Re: Getting started programming?
« Reply #16 on: November 01, 2016, 06:20:43 PM »
Quote
... Oh thank god for HuC :D

Roflmao.
Learn real C, then come back to HuC.

megatron-uk

  • Full Member
  • ***
  • Posts: 219
Re: Getting started programming?
« Reply #17 on: November 02, 2016, 06:25:08 AM »
Yep, then running screaming away from it.  :lol:

It is easy to get something up and running, but if you do want to port anything or do something slightly approaching ANSI standard it's a big pain in the bum. One of the reasons I never got around to finishing the FAT filesystem driver for the Everdrive is the lack of struct support, so doing anything with the FAT table was a pain, calculating offset after offset for table entries... argh!

That and the lack of 'long' support. Yes, I know it is slow on a 8bit cpu, but my word, when you don't have 32bit integer support these days you do feel it!

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: Getting started programming?
« Reply #18 on: November 14, 2016, 04:02:00 PM »
As a side note, if you want good 6502

read Assembly Lines for Apple II, or Programming the C64 by Butterfield.

They are both 6502 books, and will teach you alot of important things.   The authors of those books are excellent at explaining things that will apply even to PCE
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

ccovell

  • Hero Member
  • *****
  • Posts: 2245
Re: Getting started programming?
« Reply #19 on: November 17, 2016, 06:12:59 PM »
Well, I've put together a video for a PCE assembly / tech tutorial:


This first video is just a general overview of the PCE hardware / CPU / VDC capabilities.

It took a while to get some quiet time around the house / get over technical obstacles (M$ f**kers!) but anyway.  This video is still unlisted, so feel free to post your comments & criticism here!

[edit] I recommend using a YouTube downloader to download the video at its highest size (720 HD or whatever) and watch it in your free time.
« Last Edit: November 22, 2016, 10:40:42 AM by ccovell »

esteban

  • Hero Member
  • *****
  • Posts: 24063
Re: Getting started programming?
« Reply #20 on: November 17, 2016, 09:00:59 PM »
Covell: You had me at "PCE"...
  |    | 

elmer

  • Hero Member
  • *****
  • Posts: 2148
Re: Getting started programming?
« Reply #21 on: November 18, 2016, 03:29:37 AM »
Nice!  :)

Gredler

  • Guest
Re: Getting started programming?
« Reply #22 on: November 18, 2016, 04:58:11 AM »
oh man this is awesome, thanks so much!

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: Getting started programming?
« Reply #23 on: November 18, 2016, 05:59:05 AM »
Dude..! Your voice is perfect. Keep doing these :D

ccovell

  • Hero Member
  • *****
  • Posts: 2245
Re: Getting started programming?
« Reply #24 on: November 19, 2016, 12:23:40 AM »
OK, if nobody has any problems with the content or delivery, then this thing's going live soon.

ccovell

  • Hero Member
  • *****
  • Posts: 2245
Re: Getting started programming?
« Reply #25 on: November 22, 2016, 10:40:01 AM »
My 2nd video (first half, anyway) is up:

I cover how some of the greatest PCE soundtracks get their rich sound.

elmer

  • Hero Member
  • *****
  • Posts: 2148
Re: Getting started programming?
« Reply #26 on: November 22, 2016, 12:04:45 PM »
I cover how some of the greatest PCE soundtracks get their rich sound.

That was really fun to watch, thanks! :D

It's great to see all of those clever techniques in use.

ccovell

  • Hero Member
  • *****
  • Posts: 2245
Re: Getting started programming?
« Reply #27 on: November 22, 2016, 02:11:12 PM »
Video 02, second half is up, making your own waveforms & sounds:

XtoF

  • Newbie
  • *
  • Posts: 3
Re: Getting started programming?
« Reply #28 on: November 29, 2016, 03:05:52 AM »
@ccovell Quite nice and interesting videos!  8)

To answer the original question, what would you think about using the CC65 compiler/assembler suite, as an alternative to 100% hand coded ASM?
I never coded anything targeting the PCE, but I'm currently using it to learn the Apple II. Of course the performance of the compiled C code is bad, but I find it sufficient in the non-critical loops.
And it's easier to experiment in C than in ASM  :wink:

elmer

  • Hero Member
  • *****
  • Posts: 2148
Re: Getting started programming?
« Reply #29 on: November 29, 2016, 04:59:34 AM »
Learn real C, then come back to HuC.


Yep, then running screaming away from it.  :lol:

It is easy to get something up and running, but if you do want to port anything or do something slightly approaching ANSI standard it's a big pain in the bum. One of the reasons I never got around to finishing the FAT filesystem driver for the Everdrive is the lack of struct support, so doing anything with the FAT table was a pain, calculating offset after offset for table entries... argh!

That and the lack of 'long' support. Yes, I know it is slow on a 8bit cpu, but my word, when you don't have 32bit integer support these days you do feel it!

Well, it does have a lot more ANSI stuff in Uli's new HuC, especially "struct"s.

That should make it easier for newcomers to pick up and use (except that there's so little documentation on it).

And as Bonknuts pointed out, there are some 32-bit math functions down deep inside that you can call from assembly language.

But ... it's still *far* from compatible with true ANSI C code, and so you'd end up doing a lot of assembly work.

HuC is really a C-lite language designed for making games.


To answer the original question, what would you think about using the CC65 compiler/assembler suite, as an alternative to 100% hand coded ASM?
I never coded anything targeting the PCE, but I'm currently using it to learn the Apple II. Of course the performance of the compiled C code is bad, but I find it sufficient in the non-critical loops.
And it's easier to experiment in C than in ASM  :wink:

If you look, you'll find threads here about CC65/CA65.

There are so many things that I like about it, especially all the work that has gone into optimizing it, and into making it fully ANSI-compatible.

But, the price that has been paid in terms of code-generation complexity, and performance is a little bit too high for my comfort.

There's also little support in their libraries and system for the PCE's memory model and CD usage ... support of the PCE is at an early "work-in-progress" stage.

CA65 itself (especially when used with CC65) currently has some problems when it comes to zero-page variables that I've been trying to sort out with the guys there.

The root-problem itself is buried deep within the core of CA65, and I'm not sure when it will be fixed.

If you want to use C on the PC Engine, then I'd have to currently recommend HuC over CC65, especially after the work that Uli did on improving the ANSI-compatibility.

Unfortunately, the documentation on HuC, and how to get the best use out of it, is sadly lacking.

I'm a programmer ... I'd rather have a root-canal than write documentation, and this is one stand-out area where I've got to tip my hat to the CC65 guys!  :clap:


<EDIT>

I never coded anything targeting the PCE, but I'm currently using it to learn the Apple II.

BTW ... I ran across your blog a few weeks ago, and enjoyed reading it!  :)

If you choose to try writing something for the PCE, then you'll find it to be a much more powerful machine than the Apple II, and the Hu6280 processor really adds some nice intructions to the 6502 architecture that make it so much more pleasant to work with.

That's another problem that I have with CC65 ... it takes very little advantage of the 65C02 improvements, and has no optimization at all for the Hu6280 improvements.
« Last Edit: November 29, 2016, 05:14:01 AM by elmer »