20 January 2023, 17:51 | #1 |
Registered User
Join Date: Feb 2015
Location: Sweden
Age: 50
Posts: 2,954
|
GPT and what it can do for the Amiga
I thought I'd find a thread like this by now, but didn't see one.
While playing around with ChatGTP I decided to check what it knows about Amiga coding. My request: Can you write code for an Amiga demo in assembly. The demo should show a bouncing ball on a static screen. Answer: Sure, here's an example of assembly code that could be used to create a simple demo on the Commodore Amiga, featuring a bouncing ball on a static screen. The code is written in 68k assembly language, which is the assembly language used on the Amiga. And the Code: ; Bouncing ball demo for Commodore Amiga ; Written in 68k assembly language ; Set up the screen and display a static background move.l #$00c0c0c0, $dff000 ; background color (light gray) move.w #$0100, $dff01c ; set up screen mode move.w #$0800, $dff01c ; set up screen resolution ; Set up the ball position and color move.l #$000000ff, ball_color ; ball color (blue) move.w #$0020, ball_x ; ball starting x position move.w #$0020, ball_y ; ball starting y position ; Set up the ball movement move.w #1, ball_x_dir ; ball x direction (positive) move.w #1, ball_y_dir ; ball y direction (positive) move.w #2, ball_x_speed ; ball x speed (2 pixels per frame) move.w #2, ball_y_speed ; ball y speed (2 pixels per frame) ; Main loop mainloop: ; Draw the ball move.l ball_color, $dff180 ; select ball color move.w ball_x, $dff182 ; move to x position move.w ball_y, $dff184 ; move to y position move.w #1, $dff186 ; draw pixel ; Update ball position add.w ball_x_speed, ball_x ; update x position add.w ball_y_speed, ball_y ; update y position ; Check for screen boundaries cmp.w #$0140, ball_x ; compare x position to screen width bcs.s change_x_dir ; if x position is greater than screen width, change x direction cmp.w #$0140, ball_y ; compare y position to screen height bcs.s change_y_dir ; if y position is greater than screen height, change y direction ; Wait for next frame move.w #$4e71, $4e75 ; wait for next frame bra.s mainloop ; loop back to mainloop ; Change direction of ball when it hits a screen boundary change_x_dir: neg.w ball_x_speed ; negate the x speed to change direction change_dir: rts change_y_dir: neg.w ball_y_speed ; negate the y speed to change direction bra change_dir ; jump to change_dir ; Data ball_color: dc.l 0 ball_x: dc.w 0 ball_y: dc.w 0 ball_x_dir: dc.w 0 ball_y_dir: dc.w 0 ball_x_speed: dc.w 0 ball_y_speed: dc.w 0 --- I have no idea if that works, can someone with a asm compiler check what happens if you use the code above? On a broader note, this is pretty interesting stuff indeed. Could it have an impact on people who want to create more content for the Amiga but are a bit "rusty" when it comes to their coding skills..? Obviously AI will have a huge impact on our work in the future, what do you think of it as a tool to revive retro coding? |
20 January 2023, 17:56 | #2 |
HOL/FTP busy bee
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,668
|
|
20 January 2023, 19:17 | #3 |
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,154
|
|
20 January 2023, 19:51 | #4 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,246
|
newsflash: this code is complete trash.
. no need to build it. It will display nothing and wil lock your machine in an infinite loop. It could also crash the system by writing to address 4e75 (the opcode for rts...). The illusion of usefulness... |
20 January 2023, 20:03 | #5 | |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,776
|
It absolutely doesn't.
Quote:
I think it's absolutely terrible, and the same goes for AI that produces 'art'. Just shit out stuff without effort Thank goodness none of it is even remotely good enough for general use (as above example shows). In the case of programming it's also dangerous. If it already can't do this properly, how do you know that improved versions of this AI didn't royally screw up somewhere in a million line program? Right now this kind of AI is a lot of A and very little I, and still needs massive improvements if that's going to change. |
|
20 January 2023, 20:08 | #6 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,246
|
Right now, ChatGPT is mostly used to cheat at exams and to give the illusion that you master a subject by using super good phrase constructs, that come from some internet content that you're plagiarizing without even realizing it.
It has/can have some useful usages, but they're very specific. |
20 January 2023, 20:56 | #7 |
Registered User
Join Date: Aug 2014
Location: England
Posts: 231
|
How far off is the code from working?
|
20 January 2023, 21:39 | #8 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,246
|
almost every line is wrong. The conditions on X and Y are okay, except that the loop doesn't either as when directions change, the program branches to a routine that uses RTS so it exits from the program.
Note that there are no graphics provided for the ball, it's writing coords in the custom color registers, it's writing nonsense at nonsense address. Useless shit, but if you don't code you can be fooled That's what happens when the A.I. interpolates on existing programs and relies on probabilities of sequences... Good for generated poetry, or paraphrase, or powerpoint slides... Like the chinese 68060s... |
20 January 2023, 21:43 | #9 |
Registered User
Join Date: Nov 2020
Location: Michigan
Posts: 661
|
We tested some various things in chatGPT in fields that were not common knowledge but which our friend group had someone with expert knowledge in (like accessibility based UI design on web sites and in depth WW1 military tactics ).
We also tested making characters for some not super mainstream tabletop RPGs. In all cases it produced text that sounded plausible enough to someone who did not know anything about the topic, but failed completely when examined by someone who knew how the field works. |
20 January 2023, 21:45 | #10 |
Junior Member
Join Date: Sep 2001
Location: No(R)Way
Age: 41
Posts: 3,210
|
Yeah it posts so much wrong information it is just crazy! But lets see if it gets better in the coming years.. Skynet ?
|
20 January 2023, 21:45 | #11 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,502
|
Very far.
But quite impressive is that it seems to be able to write real m68k instructions without many syntax errors. And it also produced correct code to update the ball_x and ball_y position variables, including reverting the ball_x_speed and ball_y_speed at 320x320 borders. But it has no knowledge about the Amiga's custom chipset. The $dffxxx addresses used are in the right region, but they don't have the meaning which the source suggest. |
20 January 2023, 21:49 | #12 |
Registered User
Join Date: Feb 2015
Location: Sweden
Age: 50
Posts: 2,954
|
I suspected code was useless, mostly because I assume it had a very limited data set for training on 68k asm compared to (probably) a zillion times more data on python, javascript etc..
ChatGPT3.5 is based on the most advanced language model humanity has created but it doesn't help if the data its trained on sucks, I guess.. I get why some ppl are bashing the results, but keep in mind its not "real intelligence" but a pretrained transformer so it could get much better if it was trained on the proper data sets. I have no idea how much useful asm code there's out in the wild to train it on though.. It really amazing at some things, and I'm willing to bet its going so slowly sneak into all our lives in one way or another. What we have seen now is still a beta.. Give it a year... |
21 January 2023, 09:51 | #13 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,328
|
Anyway if it is free, you're the merchandise.
Ask it why registration so badly wants a phone number, and not a VoIP one. |
21 January 2023, 10:35 | #14 | |
HOL/FTP busy bee
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,668
|
Quote:
|
|
21 January 2023, 10:42 | #15 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,328
|
They think it is, probably because it confidently replies to any question and (more often than not) provides a result that remotely looks correct.
... but of course rarely is. It's not for nothing AI-generated answers have been banned on Stack Overflow. |
21 January 2023, 11:02 | #16 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,246
|
Just imagine a Zork-like text adventure connected to such an A.I...
For stackoverflow, let me confirm that us moderators delete several ChatGPT answers a day, and users who abuse the system are temporarily suspended. At first they just copy/pasted answers but now they're more sneaky and edit the too obvious "bot" parts. But we catch them anyway |
21 January 2023, 11:48 | #17 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,776
|
|
21 January 2023, 12:19 | #18 |
Registered User
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 289
|
In France, we actually have a chatGPT called Macron. Even Elon Musk like it.
|
21 January 2023, 12:44 | #19 | |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
It's a chat-bot... why would it be able to do anything for the Amiga?
Quote:
|
|
21 January 2023, 13:26 | #20 | |
Registered User
Join Date: Feb 2015
Location: Sweden
Age: 50
Posts: 2,954
|
Quote:
That is the topic at hand… But hopefully because ppl with more creative minds not stuck in their 90’s understanding of chat-bots will find ways to make it useful, provide meaningful assistance, replace boring repetitive tasks, increase productivity. Help create variations to unlock creative lock-ups… However if that is of any actual benefit to a retro community who likes things as they were in the 90s remains to be seen of course Time will tell, ey? Last edited by eXeler0; 21 January 2023 at 15:11. Reason: spelling... |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|