Jump to content
IGNORED

New C64 emulator for A8


Philsan

Recommended Posts

3 minutes ago, Mazzspeed said:

It actually wasn't that bad. It's one advantage is it was fairly fast in comparison to other basic interpreter's.

 

OK, OK.  It was both good and bad at the same time ?  Like pretty much every BASIC. And every 8-bit machine.

Edited by drpeter
  • Haha 2
Link to comment
Share on other sites

19 minutes ago, drpeter said:

Never suffered that....

 

Worst BASIC I ever used.... that's a tough one ? ?

It was all of them! BASIC wasn't the best language, especially interpreted BASIC. Even on my A8, I think I've only used it a handful of times.

 

This tech concept is sort of like wine under x86/64, the CPU is the same, you just redirect kernel calls. The problem is that unlike x86/64, it's only the CPU that uses the same instructions, the rest of the architecture is vastly different.

 

I find it cool, but I can't really see the point TBH. I see plenty of value in retro hardware, with new software being release all the time, not to mention the enjoyment of being able to do all the things I loved in the day. I just can't see the emulation of retro hardware on retro hardware serving much of a purpose, especially when it's unlikely the important aspects are going to be resolved by redirecting kernel calls.

 

I will say, it looks pretty damn convincing.

Link to comment
Share on other sites

As mentioned by the author, the inspiration was when The 8-bit Guy adapted Apple Integer (?) BASIC to run on a C64, which caused him to think that C64 BASIC probably could be made to run on Atari too.

 

If he gets load and save to operate, it could be a fun challenge to make a qualified program in this environment. See how much of Atari 8-bit features you really can access in an effective way from this alien environment. Or like I commented on Twitter: "It's C64 Jim, but not as we know it".

  • Like 2
Link to comment
Share on other sites

9 minutes ago, Mazzspeed said:

BASIC wasn't the best language

Well... there's no best language like there's no best car.

 

In both cases, depends on your skills, experience, environment and what you want to use it for.

 

Formula 1 car.... amazing.... yet most drivers wouldn't easily be able to get it out of the garage, even in the unlikely event they had somewhere they could drive it to. And nowhere to put the dog, your coffee cup or your shopping...

 

BASIC I reckon sort of does pretty well what it says on the tin- Beginners, All-Purpose...

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

1 hour ago, Mazzspeed said:

It actually worked to the C64's advantage, no one was interested in BASIC, it was all assembly

I don't want to rehash that old argument about C64's BASIC, since this machine's fans will always manage to rationalize it away, but on the whole this statement isn't really true either. BASIC was very important as an educational and introductory tool, used to entice people to jump into the world of microcomputing in general. It was great to learn some simple commands and see immediate effects, and then move onto writing simple programs which actually did something. If I (and many others)  were thrown straight away into the assembler deep water, we would have never bothered and just play games.

 

Of course, assembler was much better for writing commercial programs, that goes without saying, but it's not really the point here. The clue is in the name of the tool after all.

  • Like 2
Link to comment
Share on other sites

8 hours ago, youxia said:

I don't want to rehash that old argument about C64's BASIC, since this machine's fans will always manage to rationalize it away, but on the whole this statement isn't really true either. BASIC was very important as an educational and introductory tool, used to entice people to jump into the world of microcomputing in general. It was great to learn some simple commands and see immediate effects, and then move onto writing simple programs which actually did something. If I (and many others)  were thrown straight away into the assembler deep water, we would have never bothered and just play games.

 

Of course, assembler was much better for writing commercial programs, that goes without saying, but it's not really the point here. The clue is in the name of the tool after all.

I remember the first time I wrote a simple program in assembly to rotate the color of the screen, it wasn't just faster, it was staggeringly faster - And as a language it made sense. What you believe to be rationalization works both ways and yes, BASIC was designed as a programming language for the masses, but that era didn't last long before people simply started using proprietary software to achieve their tasks. As school kids, we were also taught 6502 assembly language.

 

As stated, this is an interesting proof of concept, but I don't see it as much more than that. You'd mainly use it to see the reaction on people's faces. ;)

Edited by Mazzspeed
Link to comment
Share on other sites

heh that's what they said when david small made the magic sac and don't tell that to Darek Mihocka either... put a sid emulation, slight sid, pokeymax sid core or whatever crap can't be emulated and vectored by the Atari on a cart/eci/pbi device and I won't have to drag my 128 out to muck about anymore... lolzors funny stuff... could prolly do a complete personality change.. :)

Edited by _The Doctor__
Link to comment
Share on other sites

2 hours ago, Mazzspeed said:

And as a language it made sense.

Hmmm.

 

10 PRINT "Hello World!"

 

vs

 

05     .OPT OBJ
10     *= $0600
0100 ; CIO
0110 ICHID = $0340 ;IOCB 0 S:
0120 ICCOM = $0342 ;IOCB Command
0130 ICBAL = $0344 ;Xfer Buffer Adr
0140 ICBAH = $0345
0150 ICPTL = $0346 ;PutByte Adr
0160 ICPTH = $0347
0170 ICBLL = $0348 ;Buffer Len
0180 ICBLH = $0349
0190 CIOV = $E456 ; CIO Vector
0500 ; Setup CIO Call
0510     LDX #0 ;IOCB 0
0520     LDA #9 ;Put Cmd Val
0530     STA ICCOM,X ;Set it as the cmd
0540     LDA #HELLO&255 ;Str low byte
0550     STA ICBAL,X
0560     LDA #HELLO/256 ;Str high byte
0570     STA ICBAH,X
0580     LDA #0 ;Str Len low byte
0590     STA ICBLL,X
0600     LDA #$FF ;Str Len high byte
0610     STA ICBLH,X
0620 ; Call CIO
0630     JSR CIOV
0640     RTS 
1000 HELLO .BYTE "Hello World!",$9B
  • Like 2
Link to comment
Share on other sites

1 minute ago, drpeter said:

Hmmm.

 

10 PRINT "Hello World!"

 

vs

 


05     .OPT OBJ
10     *= $0600
0100 ; CIO
0110 ICHID = $0340 ;IOCB 0 S:
0120 ICCOM = $0342 ;IOCB Command
0130 ICBAL = $0344 ;Xfer Buffer Adr
0140 ICBAH = $0345
0150 ICPTL = $0346 ;PutByte Adr
0160 ICPTH = $0347
0170 ICBLL = $0348 ;Buffer Len
0180 ICBLH = $0349
0190 CIOV = $E456 ; CIO Vector
0500 ; Setup CIO Call
0510     LDX #0 ;IOCB 0
0520     LDA #9 ;Put Cmd Val
0530     STA ICCOM,X ;Set it as the cmd
0540     LDA #HELLO&255 ;Str low byte
0550     STA ICBAL,X
0560     LDA #HELLO/256 ;Str high byte
0570     STA ICBAH,X
0580     LDA #0 ;Str Len low byte
0590     STA ICBLL,X
0600     LDA #$FF ;Str Len high byte
0610     STA ICBLH,X
0620 ; Call CIO
0630     JSR CIOV
0640     RTS 
1000 HELLO .BYTE "Hello World!",$9B

As you stated I suppose, there's no best language like there's no best car?

  • Like 1
Link to comment
Share on other sites

2 hours ago, Mazzspeed said:

As stated, this is an interesting proof of concept, but I don't see it as much more than that. You'd mainly use it to see the reaction on people's faces. ;)

 

Indeed. There's probably not much real incentive to run Commodore BASIC on an Atari other than the novelty factor. There are numerous faster BASICs more suited to the platform.

 

As stated above, being able to run an Atari dialect of BBC BASIC might be a different matter...

Link to comment
Share on other sites

Just now, drpeter said:

 

Indeed. There's probably not much real incentive to run Commodore BASIC on an Atari other than the novelty factor. There are numerous faster BASICs more suited to the platform.

 

As stated above, being able to run an Atari dialect of BBC BASIC might be a different matter...

Actually, BBC BASIC was probably the best implementation of BASIC I've ever seen. Even Commodore users don't use CBM BASIC V2 anymore, there's many more suitable options out there nowadays - As stated, the only time you use it is for quick and dirty test programs.

Link to comment
Share on other sites

Btw, as expected this program works like it should:

 

10 A$="ATARI RULES"+CHR$(0)

20 FORI=1TOLEN(A$):POKE678+I,ASC(MID$(A$,I)):NEXT
30 POKE780,167:POKE782,2:SYS43806

 

$AB1E is a routine that prints a zero terminated string (up to 255 characters IIRC) pointed by A/Y (low/high), similar to the CIOV routine mentioned above but one where you don't have to set string length.

Edited by carlsson
Link to comment
Share on other sites

I'd assume just about everything should work except colour Ram, sprites, sound and external I/O.

 

Colour Ram - would be fairly trivial with VBXE to blit/translate and provide.

Other graphics modes - for the most part these could be done but a stopping point is if they want to occupy RAM that's in use by the C64 Basic or OS.

Sprites - this is something that's not so simple.  VBXE blitted sprites are either 8bpp or 4bpp in the 640 mode.  The problem here is that there's not really an easy way to translate 1bpp and 2bpp into the other forms.

  • Like 1
Link to comment
Share on other sites

Custom characters is easy as long as you redefine the "ROM" font, but if your program tries to put a font elsewhere in memory and change the pointer at 53272, it won't work because those are Atari registers, not VIC-II registers. So when it comes to graphics, it would seem to me that anything that only uses monochrome PETSCII works at the moment, which is also what you can expect from a BASIC + Kernel environment not specifically intended to be a full emulation.

Link to comment
Share on other sites

21 hours ago, Mazzspeed said:

The C64 also has color memory that runs from a fixed address at $D800 via it's own bus direct to the VIC-II.

 

This is a cool tech concept, but I sort of can't see the point. It's naturally going to be fairly limiting beyond anything very basic.


The idea is fine - the big pain in the ass is that it's only a single buffer so you can double-buffer the character map but when it comes to time to flip the buffers you still need to race the beam to update the colourRAM.

You were so close, commodore....

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