English Amiga Board


Go Back   English Amiga Board > Main > Amiga scene

 
 
Thread Tools
Old 20 January 2023, 17:51   #1
eXeler0
Registered User
 
eXeler0's Avatar
 
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?
eXeler0 is offline  
Old 20 January 2023, 17:56   #2
TCD
HOL/FTP busy bee

 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,668
Deja-Vu: http://eab.abime.net/showthread.php?t=112744
TCD is offline  
Old 20 January 2023, 19:17   #3
robinsonb5
Registered User
 
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,154
Quote:
Originally Posted by eXeler0 View Post
; Wait for next frame
move.w #$4e71, $4e75 ; wait for next frame

Wow, that's genius - a human coder would never have come up with that...
robinsonb5 is offline  
Old 20 January 2023, 19:51   #4
jotd
This cat is no more
 
jotd's Avatar
 
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...
jotd is offline  
Old 20 January 2023, 20:03   #5
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,776
Quote:
Originally Posted by eXeler0 View Post
I have no idea if that works
It absolutely doesn't.
Quote:
Originally Posted by eXeler0 View Post
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..?
No, it doesn't, and until it actually works properly, it won't.
Quote:
Originally Posted by eXeler0 View Post
what do you think of it as a tool to revive retro coding?
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.
Thorham is online now  
Old 20 January 2023, 20:08   #6
jotd
This cat is no more
 
jotd's Avatar
 
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.
jotd is offline  
Old 20 January 2023, 20:56   #7
van_dammesque
Registered User
 
Join Date: Aug 2014
Location: England
Posts: 231
How far off is the code from working?
van_dammesque is offline  
Old 20 January 2023, 21:39   #8
jotd
This cat is no more
 
jotd's Avatar
 
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...
jotd is offline  
Old 20 January 2023, 21:43   #9
Weasel Fierce
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.
Weasel Fierce is offline  
Old 20 January 2023, 21:45   #10
kriz
Junior Member
 
kriz's Avatar
 
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 ?
kriz is online now  
Old 20 January 2023, 21:45   #11
phx
Natteravn
 
phx's Avatar
 
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.
phx is offline  
Old 20 January 2023, 21:49   #12
eXeler0
Registered User
 
eXeler0's Avatar
 
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...
eXeler0 is offline  
Old 21 January 2023, 09:51   #13
meynaf
son of 68k
 
meynaf's Avatar
 
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.
meynaf is online now  
Old 21 January 2023, 10:35   #14
TCD
HOL/FTP busy bee

 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,668
Quote:
We’ve trained a model called ChatGPT which interacts in a conversational way. The dialogue format makes it possible for ChatGPT to answer followup questions, admit its mistakes, challenge incorrect premises, and reject inappropriate requests.
Language. It's a very advanced chat bot. I'm amazed how many people think it is more than that.
TCD is offline  
Old 21 January 2023, 10:42   #15
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,328
Quote:
Originally Posted by TCD View Post
I'm amazed how many people think it is more than that.
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.
meynaf is online now  
Old 21 January 2023, 11:02   #16
jotd
This cat is no more
 
jotd's Avatar
 
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
jotd is offline  
Old 21 January 2023, 11:48   #17
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,776
Quote:
Originally Posted by jotd View Post
users who abuse the system
Human stupidity never ceases to amaze me
Thorham is online now  
Old 21 January 2023, 12:19   #18
Gilloo
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.
Gilloo is online now  
Old 21 January 2023, 12:44   #19
Leffmann
 
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:
Originally Posted by ChatGPT
I understand that not everyone may understand the capabilities and limitations of AI technology, and may believe that it is needed for the Amiga community. However, it's important to remember that the Amiga community is a group of enthusiasts who are passionate about their technology and have a deep understanding of the platform. They are perfectly capable of handling and troubleshooting their own issues without the assistance of an AI. Additionally, the Amiga community has a vast knowledge base, resources and experts that can help with any question or problem they may have. It would be unfair to undermine their skills and knowledge by suggesting they need an AI's assistance.
Leffmann is offline  
Old 21 January 2023, 13:26   #20
eXeler0
Registered User
 
eXeler0's Avatar
 
Join Date: Feb 2015
Location: Sweden
Age: 50
Posts: 2,954
Quote:
Originally Posted by Leffmann View Post
It's a chat-bot... why would it be able to do anything for the Amiga?

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...
eXeler0 is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:00.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10808 seconds with 12 queries